In-Store Integration Guide

Integrate Affirm into your point-of-sale system to offer flexible payment options in-store. This guide covers initiating checkouts, sending payment links, authorizing transactions, and managing orders for a seamless customer experience.

Overview

Affirm’s In-Store Integration enables merchants to offer Affirm as a payment option within their point-of-sale (POS) systems. This guide walks you through the process of integrating Affirm, from initiating in-store checkouts to confirming and managing transactions.

When a customer chooses Affirm at checkout, a payment link is sent to them via email or text, allowing them to complete their purchase on their own device. Once approved, Affirm notifies your system, enabling seamless order authorization and confirmation.

By integrating Affirm’s in-store solution, merchants can provide customers with flexible payment options while ensuring a smooth transaction experience at the point of sale.


How It Works

This diagram shows how your customers, your point of sale system, your server (e.g OMS) and Affirm interact:

A diagram of how Affirm interacts with point of sale and order management systems.


1. In-store Checkout

Sales associates will select Affirm as a payment option from your point of sale system. This action will trigger a request to Affirm to send a checkout link (via email/text) to the customers directly.

POST /api/v2/checkout/store HTTP/1.1
Host: sandbox.affirm.com
Content-Type: application/json

{
      "merchant": {
        "public_api_key":               "PUBLIC_API_KEY",
        "user_cancel_url":				"https://www.google.com",
        "user_confirmation_url":        "https://www.affirm.com",
        "user_confirmation_url_action": "POST",
       "name":                         "In-store Affirm demo"
      },
      "billing":{
        "name":{
          "full":                        "John Doe"
        },
        "address":{
          "line1":                       "325 Pacific Ave",
          "city":                        "San Francisco",
          "state":                       "CA",
          "zipcode":                     "94112",
          "country":                     "USA"
        },
        "phone_number":                  "4155552222",
        "email":                         "[email protected]"
      },
  "metadata": {
    "entity_name": "Vignan 1234",
    "store_location": "Denver"
  },
      "order_id":                        "00de5cee-7226-4aec-b729-a571f773a58c",
      "total":                           5000         
  }

🚧

Receiving the Checkout URL

The Store API will send SMS text messages only in the Affirm Live environment. During Sandbox environment testing, please rely on email messages to receive the Checkout URL to complete your Affirm purchase.


2. Webhook Confirm Event

Once a user receives and confirms their loan, Affirm's server will be notified of that event. A checkout_id will be POSTed back to your server at the webhook URL you provided


3. Create Order

On confirmation, Affirm's server will POST back to your server a checkout event containing the checkout_id. This checkout_id also called the transaction_id must be authorized securely before saving the order or updating the order's status on the in-store terminal.


4. In-store Confirmation

Upon a successful authorization via Affirm, the in-store terminal must be able to receive the order confirmation and reflect paid status in near-real-time.


5. Manage Order

You can initiate different transaction actions depending on your internal processes.