XM

Order Checkout (Affirm)

Path:

POST /api-order/checkout

Apart from Credit Card, Affirm Card is another popular choice of payment. This endpoint supports checking out using an Affirm card. Once the transaction is approved, the payment is transferred to the merchant's bank account.

Headers

Content-Type : application/json

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

Consumes

  • application/json

Produces

  • application/json

Parameters

Type: body

Name: Payment details

Required: true

Sample Request

{
"cartId": "5ec54437307eda0007c76400",
"customerEmail": "[email protected]",
"customerPhoneNumber": {
"number": "+448049381593",
"kind": "Mobile"
},
"paymentDetails": [{
"transactionDetails": {
"paymentType": "NON_CARD",
"tokenizedPaymentMethod": "1P0P5B4WFZDB2T97"
},
"paymentIdentifier": {
"cardIdentifier": "QWfXNQNFXWp07Xu2"
},
"paymentMethod": "affirm",
"paymentKind": "affirm",
"amount": "18.54",
"currency": "USD",
"conversion": 1,
"billToAddress": {
"name": {
"first": "tawseef",
"last": "ahmade bhat"
},
"email": "[email protected]",
"phone": {
"number": "+448049381593",
"kind": "Mobile"
},
"street1": "600 CONGRESS AVE",
"street2": "",
"city": "AUSTIN",
"state": "TX",
"country": "US",
"zipCode": "78701-3238"
}
}],
"estimatedTax": {
"orderTotalTax": 1.43,
"itemsTaxes": [{
"lineItemId": 1,
"amount": 1.13
}],
"shipToTaxes": [{
"shipToId": "5ec4cb2a0d83ed0008d17848",
"amount": 0.3
}]
},
"shipFrom": {
"street1": "888 Broadway",
"street2": "",
"city": "New York",
"state": "NY",
"country": "USA",
"zipCode": "10003"
}
}

Response

Response Code: 200

Message: OK

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

Sample

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

Changelog

  • July-2020 last updated