---
updatedAt: 2025-11-13T14:13:04.000Z
agentTools:
  siteIndex: https://docs.affirm.com/llms.txt
  projectIndex: https://docs.affirm.com/developers/llms.txt
---

# Store

Initiate an Affirm checkout directly with your customers by having Affirm send a link via text or email. The /store endpoint is commonly used for in-store solutions and can be used alongside our webhooks to follow the customer’s checkout status in real-time.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Checkout API",
    "version": "2.0"
  },
  "security": [
    {
      "basicAuth": []
    }
  ],
  "paths": {
    "/checkout/store": {
      "post": {
        "tags": [
          "Checkout"
        ],
        "operationId": "Store",
        "summary": "Store",
        "description": "Initiate an Affirm checkout directly with your customers.",
        "requestBody": {
          "description": "Returns the `checkout` object.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreRequest",
                "description": "Returns the `checkout` object."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "HTTP 200 OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Store"
                }
              }
            }
          },
          "400": {
            "description": "HTTP 400 Bad Request",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "HTTP 401 Unauthorized",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorUnauthorized"
                }
              }
            }
          },
          "404": {
            "description": "HTTP 404 Not Found",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorNotFound"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://sandbox.affirm.com/api/v2"
    },
    {
      "url": "https://api.affirm.com/api/v2"
    }
  ],
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    },
    "schemas": {
      "ErrorBadRequest": {
        "properties": {
          "message": {
            "description": "The error message.",
            "example": "Bad Request",
            "type": "string"
          },
          "status_code": {
            "description": "The HTTP status code.",
            "example": 400,
            "type": "integer"
          },
          "type": {
            "description": "The error type.",
            "example": "BAD_REQUEST",
            "type": "string"
          },
          "code": {
            "description": "The error type.",
            "example": "BAD_REQUEST",
            "type": "string"
          }
        }
      },
      "ErrorNotFound": {
        "properties": {
          "message": {
            "description": "The error message.",
            "example": "Not Found",
            "type": "string"
          },
          "status_code": {
            "description": "The HTTP status code.",
            "example": 404,
            "type": "integer"
          },
          "type": {
            "description": "The error type.",
            "example": "NOT_FOUND",
            "type": "string"
          },
          "code": {
            "description": "The error type.",
            "example": "NOT_FOUND",
            "type": "string"
          },
          "token": {
            "description": "The error response embedded in a JWT token",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ErrorUnauthorized": {
        "properties": {
          "message": {
            "description": "The error message.",
            "example": "Unauthorized",
            "type": "string"
          },
          "status_code": {
            "description": "The HTTP status code.",
            "example": 401,
            "type": "integer"
          },
          "type": {
            "description": "The error type.",
            "example": "UNAUTHORIZED",
            "type": "string"
          },
          "code": {
            "description": "The error type.",
            "example": "UNAUTHORIZED",
            "type": "string"
          },
          "token": {
            "description": "The error response embedded in a JWT token",
            "type": "string"
          }
        },
        "type": "object"
      },
      "StoreRequest": {
        "type": "object",
        "properties": {
          "merchant": {
            "type": "object",
            "required": [
              "merchant"
            ],
            "description": "A list of items specific to the merchant.",
            "properties": {
              "public_api_key": {
                "required": [
                  "public_api_key"
                ],
                "description": "The merchant's public api key.",
                "type": "string"
              },
              "user_cancel_url": {
                "required": [
                  "user_cancel_url"
                ],
                "description": "On customer cancellation redirect them to this merchant URL.",
                "type": "string"
              },
              "user_confirmation_url": {
                "required": [
                  "user_confirmation_url"
                ],
                "description": "On customer confirmation redirect them to this merchant URL.",
                "type": "string"
              },
              "user_confirmation_url_action": {
                "description": "Supported values -'GET' -'POST'",
                "type": "string"
              },
              "name": {
                "required": [
                  "name"
                ],
                "description": "If you have multiple sites operating under a single Affirm account, you can override the external company/brand name that the customer sees. This affects all references to your company name in the Affirm UI.",
                "type": "string"
              },
              "use_vcn": {
                "description": "A flag to enable virtual card integration (default is 'false').",
                "type": "boolean"
              }
            }
          },
          "billing": {
            "type": "object",
            "required": [
              "billing"
            ],
            "description": "The customer billing information.",
            "properties": {
              "name": {
                "type": "object",
                "properties": {
                  "first": {
                    "description": "The first name of the customer.",
                    "type": "string"
                  },
                  "full": {
                    "description": "The full name of the customer, which must contain at least two words.",
                    "type": "string"
                  },
                  "last": {
                    "description": "The last name of the customer.",
                    "type": "string"
                  }
                },
                "nullable": true
              },
              "address": {
                "type": "object",
                "properties": {
                  "city": {
                    "description": "The name of the city.",
                    "example": "San Francisco",
                    "type": "string"
                  },
                  "country": {
                    "description": "The abbreviated name of the country.",
                    "example": "USA",
                    "type": "string"
                  },
                  "line1": {
                    "description": "A U.S. street address.",
                    "example": "123 Example Street",
                    "type": "string"
                  },
                  "line2": {
                    "description": "The apartment number, floor or suite that complements the street address.",
                    "example": "Apt 123",
                    "type": "string"
                  },
                  "state": {
                    "description": "The 2-letter postal abbreviation or full name of the U.S. state.",
                    "example": "CA",
                    "type": "string"
                  },
                  "zipcode": {
                    "description": "The 5-digit postal code of the address.",
                    "example": "94107",
                    "type": "string"
                  }
                }
              },
              "phone_number": {
                "description": "The phone number of the customer. It must be a valid U.S. phone number represented as a 10-digit string without any delimiters.",
                "example": "1234567890",
                "type": "string",
                "nullable": true
              },
              "email": {
                "description": "The email address of the customer.",
                "example": "test@example.com",
                "type": "string",
                "nullable": true
              }
            }
          },
          "total": {
            "required": [
              "total"
            ],
            "description": "The total amount in cents of the purchase.",
            "example": 20000,
            "type": "integer"
          },
          "order_id": {
            "description": "The merchant id for this order.",
            "example": "A1B2C3D4",
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          },
          "tax_amount": {
            "description": "The shipping tax amount.",
            "example": 700,
            "type": "integer"
          },
          "shipping_amount": {
            "description": "The amount to ship the item.",
            "example": 400,
            "type": "integer"
          },
          "shipping": {
            "required": [
              "shipping"
            ],
            "type": "object",
            "properties": {
              "name": {
                "type": "object",
                "properties": {
                  "full": {
                    "required": [
                      "full"
                    ],
                    "description": "The customer's name.",
                    "example": "John Doe",
                    "type": "string"
                  },
                  "first": {
                    "description": "The customer's first name.",
                    "example": "John",
                    "type": "string"
                  },
                  "last": {
                    "description": "The customer's last name.",
                    "example": "Doe",
                    "type": "string"
                  }
                }
              }
            }
          },
          "items": {
            "description": "An array of items.",
            "type": "array"
          },
          "discounts": {
            "description": "Discount codes",
            "type": "array"
          },
          "financing_program": {
            "description": "The applicable Affirm financing program",
            "type": "string"
          },
          "checkout_expiration": {
            "description": "A date-timestamp of when the `checkout_id` will expire.",
            "type": "string"
          }
        }
      },
      "Store": {
        "type": "object",
        "properties": {
          "redirect_url": {
            "description": "URL the consumer should be directed to in order to complete their loan.",
            "example": "https://affirm.com/checkout/ARQBLCL7NAMBTZ7F/new/HTSZAGURU7PZ8ZAG/",
            "type": "string"
          },
          "checkout_id": {
            "description": "Specific Checkout ID for the related request. This ID is embedded in the redirect_url.",
            "example": "HTSZAGURU7PZ8ZAG",
            "type": "string"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```