Search…
API Reference
Resources
List all braintree payments
How to fetch a collection of braintree payments via API
To fetch a collection of braintree payments, send a GET request to the /api/braintree_payments endpoint.

Request

GET https://yourdomain.commercelayer.io/api/braintree_payments

Example

Request
Response
The following request fetches a collection of braintree payments:
1
curl -g -X GET \
2
'https://yourdomain.commercelayer.io/api/braintree_payments/' \
3
-H 'Accept: application/vnd.api+json' \
4
-H 'Authorization: Bearer your-access-token'
Copied!
On success, the API responds with a 200 OK status code, returning a paginated collection of resource objects:
1
{
2
"data": [
3
{
4
"id": "xYZkjABcde",
5
"type": "braintree_payments",
6
"links": {
7
"self": "https://yourdomain.commercelayer.io/api/braintree_payments/xYZkjABcde"
8
},
9
"attributes": {
10
"client_token": "xxxx.yyyy.zzzz",
11
"payment_method_nonce": "xxxx.yyyy.zzzz",
12
"payment_id": "xxxx.yyyy.zzzz",
13
"local": true,
14
"options": {
15
"customer_id": "1234567890"
16
},
17
"created_at": "2018-01-01T12:00:00.000Z",
18
"updated_at": "2018-01-01T12:00:00.000Z",
19
"reference": "ANY-EXTERNAL-REFEFERNCE",
20
"reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
21
"metadata": {
22
"foo": "bar"
23
}
24
},
25
"relationships": {
26
"order": {
27
"links": {
28
"self": "https://yourdomain.commercelayer.io/api/braintree_payments/xYZkjABcde/relationships/order",
29
"related": "https://yourdomain.commercelayer.io/api/braintree_payments/xYZkjABcde/order"
30
}
31
},
32
"payment_gateway": {
33
"links": {
34
"self": "https://yourdomain.commercelayer.io/api/braintree_payments/xYZkjABcde/relationships/payment_gateway",
35
"related": "https://yourdomain.commercelayer.io/api/braintree_payments/xYZkjABcde/payment_gateway"
36
}
37
}
38
},
39
"meta": {
40
"mode": "test"
41
}
42
},
43
{
44
"other": "... 9 braintree_payments (first page)"
45
}
46
],
47
"meta": {
48
"record_count": 140,
49
"page_count": 14
50
},
51
"links": {
52
"first": "https://yourdomain.commercelayer.io/api/braintree_payments?page[number]=1&page[size]=10",
53
"next": "https://yourdomain.commercelayer.io/api/braintree_payments?page[number]=2&page[size]=10",
54
"last": "https://yourdomain.commercelayer.io/api/braintree_payments?page[number]=14&page[size]=10"
55
}
56
}
Copied!

Sortable attributes

The list of braintree payments can be sorted by the following attributes:
  • id
  • created_at
  • updated_at
  • reference
  • reference_origin
Last modified 23d ago