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

Request

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

Example

Request
Response
The following request fetches a collection of paypal payments:
1
curl -g -X GET \
2
'https://yourdomain.commercelayer.io/api/paypal_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": "paypal_payments",
6
"links": {
7
"self": "https://yourdomain.commercelayer.io/api/paypal_payments/xYZkjABcde"
8
},
9
"attributes": {
10
"return_url": "https://yourdomain.com/thankyou",
11
"cancel_url": "https://yourdomain.com/checkout/payment",
12
"note_to_payer": "Thank you for shopping with us!",
13
"paypal_payer_id": "ABCDEFGHG123456",
14
"name": "ABCDEFGHG123456",
15
"paypal_id": "1234567890",
16
"status": "created",
17
"approval_url": "https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-1234567890ABCDEFGHG",
18
"created_at": "2018-01-01T12:00:00.000Z",
19
"updated_at": "2018-01-01T12:00:00.000Z",
20
"reference": "ANY-EXTERNAL-REFEFERNCE",
21
"reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
22
"metadata": {
23
"foo": "bar"
24
}
25
},
26
"relationships": {
27
"order": {
28
"links": {
29
"self": "https://yourdomain.commercelayer.io/api/paypal_payments/xYZkjABcde/relationships/order",
30
"related": "https://yourdomain.commercelayer.io/api/paypal_payments/xYZkjABcde/order"
31
}
32
},
33
"payment_gateway": {
34
"links": {
35
"self": "https://yourdomain.commercelayer.io/api/paypal_payments/xYZkjABcde/relationships/payment_gateway",
36
"related": "https://yourdomain.commercelayer.io/api/paypal_payments/xYZkjABcde/payment_gateway"
37
}
38
}
39
},
40
"meta": {
41
"mode": "test"
42
}
43
},
44
{
45
"other": "... 9 paypal_payments (first page)"
46
}
47
],
48
"meta": {
49
"record_count": 140,
50
"page_count": 14
51
},
52
"links": {
53
"first": "https://yourdomain.commercelayer.io/api/paypal_payments?page[number]=1&page[size]=10",
54
"next": "https://yourdomain.commercelayer.io/api/paypal_payments?page[number]=2&page[size]=10",
55
"last": "https://yourdomain.commercelayer.io/api/paypal_payments?page[number]=14&page[size]=10"
56
}
57
}
Copied!

Sortable attributes

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