v1

latestOpenAPI 3.0.02026-07-262561105.1 KB
Checkout

Store

Initiate an Affirm checkout directly with your customers.

post/checkout/store

Request body

totalinteger

The total amount in cents of the purchase.

order_idstring

The merchant id for this order.

tax_amountinteger

The shipping tax amount.

shipping_amountinteger

The amount to ship the item.

itemsobject

An array of items based on the cart contents.

discountsobject

An array of discount codes based on the merchant.

financing_programstring

The applicable Affirm financing program.

checkout_expirationstring

A date-timestamp of when the checkout_id will expire.

Example request

{
  "billing": {
    "phone_number": "1234567890",
    "email": "test@example.com",
    "address": {
      "city": "San Francisco",
      "country": "USA",
      "line1": "123 Example Street",
      "line2": "Apt 123",
      "state": "CA",
      "zipcode": "94107"
    }
  },
  "total": 20000,
  "order_id": "A1B2C3D4",
  "tax_amount": 700,
  "shipping_amount": 400,
  "shipping": {
    "name": {
      "full": "John Doe",
      "first": "John",
      "last": "Doe"
    },
    "address": {
      "city": "San Francisco",
      "country": "USA",
      "line1": "123 Example Street",
      "line2": "Apt 123",
      "state": "CA",
      "zipcode": "94107"
    },
    "email": "test@example.com",
    "phone_number": "1234567890"
  }
}

Response

HTTP 200 OK