XM
Members
Retrieve Payment
This documentation is now outdated, please find the latest docs for this endpoint here
Path:
1
GET https://{baseurl}/api-payment/payment/{cartId}
Copied!
Enables you to retrieve payment details, by cart ID. Query parameters such as offset and limit can be specified to narrow down the results. When no payment intent is associated with the cart, the response includes a blank array of payments.

Headers

Content-Type : application/json
x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox" }

Parameters

Type : path
Name : The 24 character cart ID (from the Add Items to Cart or Retrieve Cart by userAuthToken API)
Required: true
Type : query
Name: The offset and limit values to retrieve order details in a paginated response. When no value is specified, the default value used are 0 and 10, respectively.
Required: true

Sample Request

1
GET https://{baseurl}/api-payment/payment/60b90dd7308ded0008ee3c5d?offset=1&limit=1
Copied!

Response

Response Code: 200
Message: OK
Description: You'll see this message when the cart details are successfully retrieved.
1
{
2
"query": {
3
"limit": 3,
4
"offset": 1,
5
"count": 3
6
},
7
"payments": [
8
{
9
"_id": "60b931403de01200093818cd",
10
"paymentDetails": {
11
"transactionDetails": {
12
"paymentType": "CARD_STRIPE",
13
"paymentToken": "pi_1IyMTI2YBvYaVyBQS18E6wWG"
14
},
15
"paymentStatus": {
16
"cardHolderFullName": "First Last",
17
"paymentMethod": "visa",
18
"last4": "4242",
19
"amountCapturable": 119900,
20
"status": "cancelled"
21
},
22
"amount": 0,
23
"currency": "USD"
24
},
25
"billToAddress": {
26
"name": {
27
"first": "John",
28
"last": "Smith"
29
},
30
"phone": {
31
"number": "07780811973",
32
"kind": "mobile"
33
},
34
"email": "[email protected]",
35
"street1": "600 Congress Ave",
36
"street2": "suite 219",
37
"city": "Austin",
38
"state": "Tx",
39
"country": "US",
40
"zipCode": "10033"
41
},
42
"isValid": false,
43
"cartId": "60b90dd7308ded0008ee3c5d",
44
"createdAt": "2021-06-03T19:45:04.070Z",
45
"updatedAt": "2021-06-03T19:48:35.151Z",
46
"__v": 0
47
},
48
{
49
"_id": "60b92ff03de01200093818cc",
50
"paymentDetails": {
51
"transactionDetails": {
52
"paymentType": "CARD_STRIPE",
53
"paymentToken": "pi_1IyMNg2YBvYaVyBQZ3tXWJ4R"
54
},
55
"paymentStatus": {
56
"cardHolderFullName": "First Last",
57
"paymentMethod": "visa",
58
"last4": "4242",
59
"amountCapturable": 1199,
60
"status": "succeeded"
61
},
62
"amount": 11.99,
63
"currency": "USD"
64
},
65
"billToAddress": {
66
"name": {
67
"first": "John",
68
"last": "Smith"
69
},
70
"phone": {
71
"number": "07780811973",
72
"kind": "mobile"
73
},
74
"email": "[email protected]",
75
"street1": "600 Congress Ave",
76
"street2": "suite 219",
77
"city": "Austin",
78
"state": "Tx",
79
"country": "US",
80
"zipCode": "10033"
81
},
82
"isValid": true,
83
"cartId": "60b90dd7308ded0008ee3c5d",
84
"createdAt": "2021-06-03T19:39:28.680Z",
85
"updatedAt": "2021-06-03T19:39:28.680Z",
86
"__v": 0
87
}
88
]
89
}
Copied!
Error Code: 404
Message: Not found
Description: You will see this error when the specified cart ID doesn't exist in the system.
1
{
2
"code": "CART_NOT_FOUND",
3
"message": "Cart not found."
4
}
Copied!
Error Code: 500
Message: Internal Server Error
Description: You will see this error when the account number is incorrect in the x-site-context (for a multi-tenent client).

Change Log

  • June - 2021 First updated
Last modified 1mo ago
Copy link
Contents
Change Log