XM

Order Checkout (Credit Card)

Path:

POST /api-order/checkout

We offer a hassle-free checkout using Credit Cards. Once the checkout is complete, the Delete Cart by ID endpoint is triggered to ensure the cart is deleted.

Note: Bank that issued the credit card will approve or reject the transaction. For an approved transaction, an order number is generated and the money is transferred to the merchant's bank account.

We also support checking out using the Affirm Card, which is another popular choice of payment.

3.0.1. Headers

Content-Type : application/json

x-site-context : {"date":"2020-06-12T13:16:09.000Z","channel":12}

3.0.2. Consumes

  • application/json

3.0.3. Produces

  • application/json

3.0.4. Parameters

Type: body

Name: Customer and Payment details

Required: true

3.0.5. Sample Request

{
"cartId": "5ef60cdebd6bf70008ab3698",
"customerEmail": "[email protected]",
"customerPhoneNumber": {
"number": "07780811973",
"kind": "Mobile"
},
"paymentDetails": [
{
"transactionDetails": {
"paymentType": "CARD",
"cardNumber": "4111111111111111",
"expDate": "1122",
"cvv": "999",
"cardHolderFullName": "tawseefahmade bhat",
"metadata": {}
},
"paymentIdentifier": {
"cardIdentifier": "1111"
},
"paymentMethod": "Visa",
"paymentKind": "Fabric User",
"amount": "11.27",
"currency": "USD",
"conversion": 1,
"billToAddress": {
"name": {
"first": "tawseef",
"last": "ahmade bhat"
},
"email": "[email protected]",
"phone": {
"number": "07780811973",
"kind": "Mobile"
},
"street1": "600 CONGRESS AVE",
"street2": "",
"city": "AUSTIN",
"state": "TX",
"country": "US",
"zipCode": "1003"
}
}
],
"estimatedTax": {
"itemsTaxes": [
{
"lineItemId": 1,
"amount": 2
}
],
"shipToTaxes": [
{
"shipToId": "5ef60ceb7d3c58000868a627",
"amount": 1.5
}
]
},
"shipFrom": {
"street1": "888 Broadway",
"street2": "",
"city": "New York",
"state": "NY",
"country": "USA",
"zipCode": "46282"
}
}

3.0.6. Response

Response Code: 200

Message: OK

Description: You will see this message when the check out is successful using the credit card.

Sample

{
"checkoutComplete": true,
"orderId": "9838-8793-23555"
}