---
updatedAt: 2026-05-07T18:17:26.000Z
agentTools:
  projectIndex: https://docs.joinforage.app/llms.txt
---

# Create a Custom Payment Capture Session

A `POST` request to `/capture_sessions/` initiates a `Session` of the Forage Custom Payment Capture UI.

The response payload represents the [Custom Payment Capture Session](ref:forage-sessions#custom-payment-capture-session). The `ref` and `redirect_url` fields are the most important:

  - `ref` represents the `Order`
    - Store this `ref` so that you can pass it in a future request to [Create an `Order` Payment](ref:create-order-payment), or to check the status of the `Order` via a `GET` to [`/orders/{order_ref}/`](ref:get-order)
  - `redirect_url` is the URL that launches the front-end, customer-facing Forage UI
    - Point customers to this URL to enter their PIN to complete checkout

If PIN entry is successful, then Forage points the customer to the `success_redirect_url` specified in the request body. Forage directs the customer to the `cancel_redirect_url` if they cancel the balance inquiry from the Forage UI.

To check the status of an `Order` after the customer completes the Forage UI, send a `GET` to [`/orders/{order_ref}/`](ref:get-order).

> 📘 Use customer_id For Better Performance
>
> Pass `customer_id` in the request to Create a Capture Session.
>
> Forage automatically adds the `customer_id` to the Session's corresponding `Order` and `OrderPayments`.
>
> `customer_id` helps Forage's servers more quickly identify and associate the correct customer with the `Session`. While `customer_id` is not technically a required parameter, if you omit it then the request to create the Session could take longer to process. **It is strongly recommended to pass `customer_id`.**
>
> When the same `customer_id` is provided for a returning customer, Forage will retrieve and reuse their stored payment method, if available. Alternatively, passing the same `ebt_payment_method` can also pre-fill the stored payment method in the checkout session.
>
> Each customer should only have one unique `customer_id`. For example, if you create both a Capture Session and a `PaymentMethod` for the same customer, then the `customer_id` should be the same in both requests to ensure continuity of stored payment methods.


# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": false
  },
  "info": {
    "title": "Forage Payments API",
    "description": "The Forage Payments API is a REST API for processing Electronic Benefits Transfer (EBT) payments (SNAP and EBT Cash) in your e-commerce or in-store application.\n\nProcessing any EBT payment, or checking an EBT card's balance, requires the cardholder's PIN. Federal regulations require all PIN entry to happen through a PCI-compliant, USDA-approved interface. Forage provides that interface, so EBT PIN collection always happens through a Forage-hosted surface (Forage Checkout or a Forage SDK), never directly in your own form. Some endpoints (for example, capture and balance) are only reachable through that surface because they require PIN data in the request.\n\nEBT rarely covers an entire order: items like delivery fees and non-eligible products can't be paid with SNAP or EBT Cash. You decide how to handle the remaining balance (split tender) and any credit or debit processing alongside the EBT portion.\n\nForage offers four integration options. Pick the one that fits your platform and engineering resources:\n\n1. **Fully Hosted Checkout.** Forage processes EBT and credit/debit through a Forage-hosted Checkout UI. Lowest engineering effort, and Forage absorbs most error handling. See the [Fully Hosted Checkout guide](https://docs.joinforage.app/docs/fully-hosted).\n2. **Custom Checkout.** Forage processes EBT; you handle split tender, taxes, and credit/debit in your own checkout flow. Best when you want minimal changes to your existing UX. See the [Custom Checkout guide](https://docs.joinforage.app/docs/custom).\n3. **Online SDKs.** Client-side SDKs for [web](https://docs.joinforage.app/docs/forage-js), [iOS](https://docs.joinforage.app/docs/ios), and [Android](https://docs.joinforage.app/docs/android) that collect EBT PINs in your app while keeping you out of PCI scope.\n4. **POS Terminal SDK.** Accept in-person EBT payments on an Android POS device. See the [POS Terminal guide](https://docs.joinforage.app/docs/forage-terminal-android).\n\nAs a general principle, any data created by your requests, or by your customers on a Forage-hosted surface, is retrievable through GET requests to the appropriate resource.\n\nHave more questions? Use our [contact form](https://www.joinforage.com/get-in-touch) to reach our sales and engineering support teams.\n",
    "contact": {
      "name": "API Support",
      "email": "engineering@joinforage.com"
    },
    "version": "2025-08-04"
  },
  "externalDocs": {
    "description": "Forage documentation",
    "url": "https://docs.joinforage.app/"
  },
  "servers": [
    {
      "url": "https://{environment}.joinforage.app",
      "variables": {
        "environment": {
          "default": "api.sandbox",
          "enum": [
            "api",
            "api.sandbox"
          ]
        }
      }
    }
  ],
  "security": [],
  "paths": {
    "/api/capture_sessions/": {
      "parameters": [
        {
          "$ref": "#/components/parameters/AuthenticationBearerTokenHeader"
        },
        {
          "$ref": "#/components/parameters/MerchantAccountHeader"
        },
        {
          "$ref": "#/components/parameters/IdempotencyKeyHeader"
        },
        {
          "$ref": "#/components/parameters/APIVersionHeader"
        }
      ],
      "post": {
        "tags": [
          "Custom Sessions"
        ],
        "summary": "Create a Custom Payment Capture Session",
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl --request POST \\\n    --url https://api.sandbox.joinforage.app/api/capture_sessions/ \\\n    --header 'Authorization: Bearer <api_key>' \\\n    --header 'Merchant-Account: <merchant-id>' \\\n    --header 'Idempotency-Key: <idempotency-key>' \\\n    --header 'accept: application/json' \\\n    --header 'content-type: application/json' \\\n    --data '\n{\n  \"success_redirect_url\": \"https://www.your-app.com/?status=SUCCEEDED\",\n  \"cancel_redirect_url\": \"https://www.your-app.com/?status=CANCELED\",\n  \"delivery_address\": {\n    \"city\": \"San Francisco\",\n    \"country\": \"US\",\n    \"line1\": \"1856 Market St.\",\n    \"zipcode\": \"94106\",\n    \"state\": \"CA\"\n  },\n  \"is_delivery\": true,\n  \"payment_details\": {\n    \"snap_payment\": {\n      \"amount\": 20.12,\n      \"payment_method\": \"fsdf45345\",\n      \"description\": \"A SNAP payment\",\n      \"funding_type\": \"ebt_snap\",\n      \"metadata\": {}\n    }\n  },\n  \"customer_id\": \"cus_1234567890\",\n  \"external_order_id\": \"<external-order-id>\"\n}\n'\n"
            }
          ]
        },
        "description": "A `POST` request to `/capture_sessions/` initiates a `Session` of the Forage Custom Payment Capture UI.\n\nThe response payload represents the [Custom Payment Capture Session](https://docs.joinforage.app/reference/forage-sessions#custom-payment-capture-session). The `ref` and `redirect_url` fields are the most important:\n\n  - `ref` represents the `Order`\n    - Store this `ref` so that you can pass it in a future request to [Create an `Order` Payment](https://docs.joinforage.app/reference/create-order-payment), or to check the status of the `Order` via a `GET` to [`/orders/{order_ref}/`](https://docs.joinforage.app/reference/get-order)\n  - `redirect_url` is the URL that launches the front-end, customer-facing Forage UI\n    - Point customers to this URL to enter their PIN to complete checkout\n\nIf PIN entry is successful, then Forage points the customer to the `success_redirect_url` specified in the request body. Forage directs the customer to the `cancel_redirect_url` if they cancel the balance inquiry from the Forage UI.\n\nTo check the status of an `Order` after the customer completes the Forage UI, send a `GET` to [`/orders/{order_ref}/`](https://docs.joinforage.app/reference/get-order).\n\n> 📘 Use customer_id For Better Performance\n>\n> Pass `customer_id` in the request to Create a Capture Session.\n>\n> Forage automatically adds the `customer_id` to the Session's corresponding `Order` and `OrderPayments`.\n>\n> `customer_id` helps Forage's servers more quickly identify and associate the correct customer with the `Session`. While `customer_id` is not technically a required parameter, if you omit it then the request to create the Session could take longer to process. **It is strongly recommended to pass `customer_id`.**\n>\n> When the same `customer_id` is provided for a returning customer, Forage will retrieve and reuse their stored payment method, if available. Alternatively, passing the same `ebt_payment_method` can also pre-fill the stored payment method in the checkout session.\n>\n> Each customer should only have one unique `customer_id`. For example, if you create both a Capture Session and a `PaymentMethod` for the same customer, then the `customer_id` should be the same in both requests to ensure continuity of stored payment methods.\n",
        "operationId": "Create capture session",
        "security": [
          {
            "OAuth2": [
              "pinpad_only"
            ]
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CaptureSession"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CustomPaymentCapture200"
          },
          "400": {
            "description": "__Bad request__ - The request was not accepted because of an error in the request body or path.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseObject"
                },
                "examples": {
                  "cannot_parse_request_body": {
                    "summary": "Cannot Parse Request Body",
                    "value": {
                      "path": "/api/capture_sessions/",
                      "errors": [
                        {
                          "code": "cannot_parse_request_body",
                          "message": "Parsing 'payment_details' field failed with message: This field is required.",
                          "source": {
                            "resource": "Sessions",
                            "ref": ""
                          }
                        }
                      ]
                    }
                  },
                  "invalid_input_data": {
                    "summary": "Invalid Input Data",
                    "value": {
                      "path": "/api/capture_sessions/",
                      "errors": [
                        {
                          "code": "invalid_input_data",
                          "message": "Query parameter missing or incomplete.",
                          "source": {
                            "resource": "Sessions",
                            "ref": ""
                          }
                        }
                      ]
                    }
                  },
                  "invalid_merchant_account": {
                    "summary": "Invalid Merchant Account",
                    "value": {
                      "path": "/api/capture_sessions/",
                      "errors": [
                        {
                          "code": "invalid_merchant_account",
                          "message": "Merchant account Merchant ID not valid.",
                          "source": {
                            "resource": "Merchants"
                          }
                        }
                      ]
                    }
                  },
                  "missing_idempotency_key": {
                    "summary": "Missing Idempotency Key",
                    "value": {
                      "path": "/api/capture_sessions/",
                      "errors": [
                        {
                          "code": "missing_idempotency_key",
                          "message": "You must include a value for the IDEMPOTENCY-KEY header in your requests to this endpoint.",
                          "source": {
                            "resource": "Idempotency_Key"
                          }
                        }
                      ]
                    }
                  },
                  "missing_merchant_account": {
                    "summary": "Missing Merchant Account",
                    "value": {
                      "path": "/api/capture_sessions/",
                      "errors": [
                        {
                          "code": "missing_merchant_account",
                          "message": "No merchant account was provided.",
                          "source": {
                            "resource": "Merchants"
                          }
                        }
                      ]
                    }
                  },
                  "unknown_fields_error": {
                    "summary": "Unknown Fields Error",
                    "value": {
                      "path": "/api/capture_sessions/",
                      "errors": [
                        {
                          "code": "unknown_fields_error",
                          "message": "Unknown field(s) provided: {unknown_fields}",
                          "source": {
                            "resource": "Sessions"
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseObject"
                },
                "examples": {
                  "invalid_token": {
                    "summary": "Invalid Token",
                    "value": {
                      "path": "/api/capture_sessions/",
                      "errors": [
                        {
                          "code": "invalid_token",
                          "message": "Incorrect authentication credentials.",
                          "source": {
                            "resource": "Accounts",
                            "ref": ""
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseObject"
                },
                "examples": {
                  "cannot_change_request": {
                    "summary": "Cannot Change Request",
                    "value": {
                      "path": "/api/capture_sessions/",
                      "errors": [
                        {
                          "code": "cannot_change_request",
                          "message": "Two requests were submitted with the same idempotency key, but slightly different request bodies. Please use a new idempotency key if you intended to change the request body",
                          "source": {
                            "resource": "Idempotency_Key"
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "423": {
            "$ref": "#/components/responses/Error423"
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseObject"
                },
                "examples": {
                  "too_many_requests": {
                    "summary": "Too Many Requests",
                    "value": {
                      "path": "/api/capture_sessions/",
                      "errors": [
                        {
                          "code": "too_many_requests",
                          "message": "Request was throttled, please try again later.",
                          "source": {
                            "resource": "Sessions",
                            "ref": ""
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseObject"
                },
                "examples": {
                  "unknown_server_error": {
                    "summary": "Unknown Server Error",
                    "value": {
                      "path": "/api/capture_sessions/",
                      "errors": [
                        {
                          "code": "unknown_server_error",
                          "message": "Unknown exception from EBT network",
                          "source": {
                            "resource": "Unknown"
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorsArray": {
        "type": "array",
        "description": "An array with information about the error.",
        "items": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "description": "A short string that represents the error."
            },
            "message": {
              "type": "string",
              "description": "A developer-facing message with more details about the error, not to be displayed to customers."
            },
            "source": {
              "type": "object",
              "properties": {
                "resource": {
                  "type": "string",
                  "description": "The type of the Forage resource involved in the error."
                },
                "ref": {
                  "type": "string",
                  "description": "If applicable, the ten character reference hash of the Forage resource that caused the error. An empty string if no specific individual resource was involved."
                }
              }
            },
            "details": {
              "type": "object",
              "description": "Additional details about the error, if applicable."
            }
          }
        },
        "example": []
      },
      "ErrorResponseObject": {
        "type": "object",
        "description": "An object that includes details about the error.",
        "properties": {
          "path": {
            "type": "string",
            "description": "The requested endpoint."
          },
          "errors": {
            "$ref": "#/components/schemas/ErrorsArray"
          }
        }
      },
      "CustomCaptureSessionRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SessionRequest"
          },
          {
            "type": "object",
            "required": [
              "payment_details"
            ],
            "properties": {
              "payment_details": {
                "type": "object",
                "description": "A list of `snap_payment` and/or `ebt_cash_payment` object(s) that Forage uses to create `OrderPayments`. In the response, Forage adds a unique `ref` identifier to every payment in the list.  Only use this field if you have a pre-existing `PaymentMethod` `ref` that should be used in this session.\n\n**You must build with Forage Version `2024-03-05` to use `payment_details`.** Either pass `2024-03-05` as the API-Version header on a per request basis, or set the version for all requests in the Forage dashboard.\n",
                "properties": {
                  "snap_payment": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/PaymentDetail"
                      }
                    ]
                  },
                  "ebt_cash_payment": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/PaymentDetail"
                      }
                    ]
                  }
                }
              }
            },
            "example": {
              "delivery_address": {
                "city": "San Francisco",
                "country": "US",
                "line1": "1856 Market St.",
                "state": "CA",
                "zipcode": "94102"
              },
              "is_delivery": false,
              "payment_details": {
                "snap_payment": {
                  "amount": 20.12,
                  "metadata": {},
                  "payment_method": "fsdf45345",
                  "description": "A SNAP payment"
                },
                "ebt_cash_payment": {
                  "amount": 25.99,
                  "metadata": {},
                  "payment_method": "fsdf45345",
                  "description": "An EBT Cash payment"
                }
              },
              "customer_id": "cus_1234567890",
              "supported_benefits": [
                "snap",
                "non_ebt"
              ],
              "success_redirect_url": "https://www.your-app.com/?status=SUCCEEDED",
              "cancel_redirect_url": "https://www.your-app.com/?status=CANCELED"
            }
          }
        ]
      },
      "CustomCaptureSessionRequestBody": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CustomCaptureSessionRequest"
          },
          {
            "type": "object",
            "properties": {
              "capture_type": {
                "type": "string",
                "enum": [
                  "immediate",
                  "deferred"
                ],
                "default": "immediate",
                "description": "An optional field that controls when the payment for the `Session` is captured. Defaults to `immediate` when the field is omitted. `deferred` requires an additional server-side request to actually capture the order."
              }
            }
          }
        ]
      },
      "SessionRequest": {
        "type": "object",
        "description": "This object starts a Forage Session, an instance of the ready-to-use Forage Checkout UI. It either initiates a Custom Capture Session, if passed as is to the /capture_sessions/ endpoint, or a Fully Hosted Session, if passed to the /sessions/ endpoint. Refer to each endpoint's documentation for details.\n",
        "required": [
          "delivery_address",
          "success_redirect_url",
          "cancel_redirect_url"
        ],
        "properties": {
          "success_redirect_url": {
            "type": "string",
            "description": "The URL that Forage should redirect your customer to if the `Order` is completed successfully."
          },
          "cancel_redirect_url": {
            "type": "string",
            "description": "The URL that Forage should redirect your customer to if the `Order` is cancelled."
          },
          "delivery_address": {
            "$ref": "#/components/schemas/DeliveryAddressData"
          },
          "is_delivery": {
            "type": "boolean",
            "description": "Whether the order is for delivery or pickup. Optional — defaults to `false`. Forage reports this value to FNS for regulatory purposes."
          },
          "is_commercial_shipping": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the order is to be shipped commercially. FNS uses this value in its database for statistics."
          },
          "supported_benefits": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list that limits the types of payment methods that can be applied at checkout, including any or all of the values in: `[\"snap\", \"ebt_cash\", \"non_ebt\"]`. Use `supported_benefits` **only** if you want to restrict the possible payment method types. Omit this field in all other cases. For example, pass `[\"snap\", \"non_ebt\"]` if you want to accept SNAP and credit card payments only (excluding EBT Cash).\n"
          },
          "platform_fee": {
            "type": "number",
            "format": "decimal",
            "description": "An optional field, for use by a platform supporting multiple merchants, that indicates the percentage cut of each payment that the platform charges as a fee.",
            "example": 0.05
          },
          "customer_id": {
            "$ref": "#/components/schemas/CustomerIDField"
          },
          "external_order_id": {
            "$ref": "#/components/schemas/ExternalOrderIDField"
          },
          "external_location_id": {
            "$ref": "#/components/schemas/ExternalLocationIDField"
          }
        }
      },
      "PaymentDetail": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "format": "currency",
            "description": "A positive decimal number that represents how much to charge the `PaymentMethod` in USD. Precision is supported to the penny. To charge multiple balances, add both a `snap_payment` and `ebt_cash_payment` object to the `payment_details` list.\n\nThe minimum amount that can be charged is `0.01`.\n"
          },
          "metadata": {
            "$ref": "#/components/schemas/MetadataObject"
          },
          "payment_method": {
            "type": "string",
            "description": "The unique reference hash for the existing Forage [`PaymentMethod`](https://docs.joinforage.app/reference/payment-methods) that is to be charged in this transaction."
          },
          "description": {
            "type": "string",
            "description": "A string that describes the payment."
          },
          "funding_type": {
            "type": "string",
            "description": "A string that represents the type of tender. Use `ebt_cash` for `ebt_cash_payment` and `ebt_snap` for `snap_payment`.\n"
          }
        },
        "required": [
          "amount",
          "metadata",
          "payment_method",
          "description"
        ]
      },
      "SessionResponse": {
        "description": "The common properties across all Session endpoint response payloads.",
        "type": "object",
        "properties": {
          "ref": {
            "type": "string",
            "description": "A unique reference hash for the `Order` created for this `Session`.",
            "example": "93410bcaff"
          },
          "status": {
            "type": "string",
            "description": "The status is always `draft` at the start.",
            "enum": [
              "draft",
              "processing",
              "failed",
              "succeeded",
              "canceled"
            ],
            "example": "draft"
          },
          "success_date": {
            "type": "string",
            "format": "date-time",
            "description": "A UTC timestamp that indicates when all of the `Payments` associated with the `Order` are successfully charged, represented as an [ISO 8601 date-time](https://www.iso.org/iso-8601-date-and-time-format.html) string.",
            "example": "2021-06-16T00:11:50.000000Z"
          },
          "receipt": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ReceiptData"
              },
              {
                "example": null
              }
            ]
          },
          "expires_at": {
            "type": "string",
            "description": "A UTC timestamp of when the `Order` associated with the Payment Capture Session will expire if it is not captured or canceled, set to 30 minutes from when the `Order` is created.",
            "example": "2024-02-05T19:41:37.334897Z"
          },
          "is_commercial_shipping": {
            "type": "boolean",
            "description": "Whether the order is to be shipped commercially. FNS uses this value in its database for statistics."
          },
          "redirect_url": {
            "type": "string",
            "format": "url",
            "description": "The URL that launches the Forage Session UI. Point a customer to this URL when they are ready to complete checkout.",
            "example": "https://checkout.joinforage.app/payment?order=93410bcaff&merchant=1234567&payment_methods=62b4f98001&payment_methods=7401bea819"
          },
          "previous_errors": {
            "$ref": "#/components/schemas/ErrorsArray"
          }
        }
      },
      "BalanceResponse": {
        "type": "object",
        "description": "An object that represents an EBT cardholder's account balance.",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The unique identifier for the balance record.",
            "example": 12345
          },
          "snap": {
            "type": "string",
            "format": "currency",
            "description": "The available SNAP balance in USD on the customer’s EBT Card, represented as a numeric string."
          },
          "non_snap": {
            "type": "string",
            "format": "currency",
            "description": "The available EBT Cash balance in USD on the customer's EBT Card, represented as a numeric string."
          },
          "updated": {
            "type": "string",
            "format": "date-time",
            "description": "A UTC timestamp that indicates when the funds in the account last changed, represented as an [ISO 8601 date-time](https://www.iso.org/iso-8601-date-and-time-format.html) string."
          },
          "sequence_number": {
            "type": "string",
            "description": "A transaction number for this `PaymentMethod`'s most recent balance check. Returned only for POS Terminal transactions; omitted from online merchant balance checks."
          }
        }
      },
      "DeliveryAddressData": {
        "type": "object",
        "required": [
          "line1",
          "zipcode"
        ],
        "description": "⚠️ **Exception**: If the purchase is made in-store via a POS Terminal, then a `delivery_address` is not required when creating a `Payment`.\n\nThe address for delivery or pickup of the `Order`. Per FNS regulations, this value must always be provided. If the `Order` is for pickup, then use the merchant address.\n",
        "properties": {
          "city": {
            "type": "string",
            "description": "The name of the city."
          },
          "country": {
            "type": "string",
            "description": "Either `us` or `US`. Defaults to `US` if not provided."
          },
          "line1": {
            "type": "string",
            "description": "The first line of the street address."
          },
          "line2": {
            "type": "string",
            "nullable": true,
            "description": "The second line of the street address."
          },
          "zipcode": {
            "type": "string",
            "description": "The zip or postal code."
          },
          "state": {
            "type": "string",
            "description": "The two-letter abbreviation, can be upper or lowercase, for the US state."
          }
        }
      },
      "ReceiptData": {
        "type": "object",
        "description": "Most of the information that you're required to display to the customer, according to FNS regulations.\n\nThis field is `null` if the data that populates the receipt is not yet available.\n\nThe total amount paid by the customer is `snap_amount` + `ebt_cash_amount` + `other_amount`. This amount will be settled with the merchant after applying Forage's fees.\n",
        "properties": {
          "ref_number": {
            "type": "string",
            "description": "A unique reference hash for the Forage `Order`, `Payment`, or `Refund` associated with this receipt.\n\nNote: `receipt.ref_number` equals `ref`.\n",
            "default": "45e3f12a90"
          },
          "is_voided": {
            "type": "boolean",
            "description": "Whether the transaction associated with this receipt has been voided. If `false`, then the transaction finished processing as expected. If `true`, then the transaction was reversed."
          },
          "snap_amount": {
            "type": "string",
            "description": "The USD amount charged/refunded to the SNAP balance of the EBT Card, represented as a numeric string.",
            "default": "25.99"
          },
          "ebt_cash_amount": {
            "type": "string",
            "format": "currency",
            "description": "The USD amount charged/refunded to the EBT Cash balance of the EBT Card, represented as a numeric string.",
            "default": "10.99"
          },
          "cash_back_amount": {
            "type": "string",
            "format": "currency",
            "nullable": true,
            "description": "The USD amount of cash back given to the customer, represented as a numeric string.",
            "default": "0.00"
          },
          "other_amount": {
            "type": "string",
            "format": "currency",
            "description": "The USD amount charged/refunded to any payment method that is not an EBT Card, represented as a numeric string.",
            "default": "5.99"
          },
          "sales_tax_applied": {
            "type": "string",
            "format": "currency",
            "description": "The USD amount of taxes charged to the customer’s non-EBT payment instrument, represented as a numeric string.",
            "default": "5.16"
          },
          "balance": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/BalanceResponse"
              }
            ]
          },
          "last_4": {
            "type": "string",
            "description": "The last four digits of the EBT Card number.",
            "default": "3456"
          },
          "message": {
            "type": "string",
            "description": "A message from the EBT payment network that must be displayed to the EBT cardholder.",
            "default": "Approved"
          },
          "transaction_type": {
            "type": "string",
            "enum": [
              "Order",
              "Refund",
              "Payment"
            ],
            "description": "A constant string that is used to identify the transaction type associated with the receipt.\n",
            "default": "Refund"
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "description": "A UTC timestamp of when the Forage transaction object was created, represented as an [ISO 8601 date-time](https://www.iso.org/iso-8601-date-and-time-format.html) string.",
            "default": "2021-06-16T00:11:50.000000Z"
          },
          "sequence_number": {
            "type": "string",
            "nullable": true,
            "description": "The terminal transaction sequence number for POS transactions. `null` for online (non-POS) transactions."
          }
        }
      },
      "CustomerIDField": {
        "type": "string",
        "maxLength": 64,
        "description": "**⚠️ If you’re integrating Forage with a POS Terminal, then do not use this param. It is only supported for online transactions.**\n\nA unique identifier for the end customer making the payment.\n\nForage automatically adds the `customer_id` to the Session's corresponding `Order` and `OrderPayments`.\n\nThis field helps Forage's servers more quickly identify the customer associated with the request. While `customer_id` is not technically required, if you omit it then requests could take longer to process. **It is strongly recommended to pass customer_id.**\n\nIf you're providing your internal customer ID, then we recommend that you hash the value before sending it on the payload.\n\nEach customer should only have one unique `customer_id`. For example, if you create both a `PaymentMethod` and a Forage `Session` (Fully Hosted or Custom) or `Payment` (SDK) for the same customer, then the `customer_id` should be the same in both requests to ensure continuity of stored payment methods.\n"
      },
      "ExternalOrderIDField": {
        "type": "string",
        "maxLength": 64,
        "description": "A unique identifier for the order as created by the merchant or platform (not Forage).\n\nWhen a merchant or platform passes this order ID to Forage, it persists in each Forage transaction related to the `Order`. This field enables merchants to map order IDs in their system to corresponding Forage `Order` IDs.\n\n**You must build with Forage Version `2023-05-15` or later to use `external_order_id`.** Either pass `2023-05-15` as the `API-Version` header on a per request basis, or set the version for all requests in the Forage dashboard.\n"
      },
      "ExternalLocationIDField": {
        "type": "string",
        "description": "A unique identifier, provided by the merchant or platform (not Forage), that indicates the physical fulfillment location for the order. For example, this field could specify which location of a grocery store chain fulfilled an order.\n",
        "example": "6e3b2ff7-51c8-4c64-befa-2eac90f7c3e9"
      },
      "MetadataObject": {
        "type": "object",
        "description": "A required object containing merchant-defined key-value pairs to provide additional context for the payment.\n\nMerchants should use this field to store **reference information** relevant to the transaction (for example, order details, system identifiers, or tracking data). This helps link the payment to records within their system.\n\nPass an empty object (`{}`) if no additional information is available.\n\n> ⚠️ Personally Identifiable Information\n>\n> **Do not include personally identifiable information (PII)** such as names, emails, or payment details.\n"
      }
    },
    "requestBodies": {
      "CaptureSession": {
        "description": "Pass the following fields in the body of the request to `/capture_sessions/` to initiate a Custom Capture `Session`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CustomCaptureSessionRequestBody"
            }
          }
        }
      }
    },
    "responses": {
      "CustomPaymentCapture200": {
        "description": "__OK__ - Success",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SessionResponse"
                },
                {
                  "$ref": "#/components/schemas/CustomCaptureSessionRequest"
                }
              ],
              "example": {
                "status": "draft",
                "delivery_address": {
                  "city": "San Francisco",
                  "country": "US",
                  "line1": "1856 Market St.",
                  "state": "CA",
                  "zipcode": "94102"
                },
                "is_delivery": false,
                "payment_details": {
                  "snap_payment": {
                    "ref": "b29dj92e4g",
                    "amount": 20.12,
                    "metadata": {},
                    "payment_method": "fsdf45345",
                    "description": "A SNAP payment",
                    "funding_type": "ebt_snap"
                  },
                  "ebt_cash_payment": {
                    "ref": "c4gdj92e4g",
                    "amount": 25.99,
                    "metadata": {},
                    "payment_method": "fsdf45345",
                    "description": "An EBT Cash payment",
                    "funding_type": "ebt_cash"
                  }
                },
                "supported_benefits": [
                  "snap",
                  "non_ebt"
                ],
                "ref": "b873fe62dc",
                "success_date": null,
                "receipt": null,
                "customer_id": null,
                "is_commercial_shipping": null,
                "success_redirect_url": "https://www.your-app.com/?status=SUCCEEDED",
                "cancel_redirect_url": "https://www.your-app.com/?status=CANCELED",
                "redirect_url": "https://checkout.sandbox.joinforage.app/payment?order=b873fe62dc&merchant=9000055",
                "previous_errors": []
              }
            }
          }
        }
      },
      "Error423": {
        "description": "__Locked__ - The request could not be completed because the target resource is currently locked.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponseObject"
            },
            "examples": {
              "resource_locked": {
                "summary": "Resource Locked",
                "value": {
                  "path": "/api/example_path/",
                  "errors": [
                    {
                      "code": "resource_locked",
                      "message": "Request could not be completed because the resource is currently locked. Please try again later.",
                      "source": {
                        "resource": "Idempotency_Key",
                        "ref": ""
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "AuthenticationBearerTokenHeader": {
        "name": "Authorization",
        "in": "header",
        "description": "An OAuth 2.0 [authentication token](https://docs.joinforage.app/docs/authentication#authentication-tokens) that validates the request. Send a `POST` to the [`/o/token/`](https://docs.joinforage.app/reference/create-authentication-token) endpoint to generate an authentication token. Pass the token in this header after the word `Bearer` and a whitespace, for example `Bearer <api_key>`.",
        "schema": {
          "type": "string"
        },
        "required": true
      },
      "MerchantAccountHeader": {
        "name": "Merchant-Account",
        "in": "header",
        "description": "A unique merchant ID that Forage provides during onboarding, as in `123ab45c67`. The Merchant ID can be found in the Forage [sandbox](https://dashboard.sandbox.joinforage.app/login/) or [production](https://dashboard.joinforage.app/login/) dashboard.",
        "schema": {
          "type": "string"
        },
        "required": true
      },
      "IdempotencyKeyHeader": {
        "name": "Idempotency-Key",
        "in": "header",
        "description": "An alphanumeric key that clients can use to identify repeated requests that are dropped in transit. Generate a distinct key for every unique request and only re-use keys for retries.",
        "schema": {
          "type": "string"
        },
        "required": true
      },
      "APIVersionHeader": {
        "name": "API-Version",
        "in": "header",
        "description": "The [Forage version](https://docs.joinforage.app/reference/version-history), represented as a string with the format of a `YYYY-MM-DD` date.\n\nIf not specified in the request header, then the version defaults to the value set in the Forage dashboard.\n",
        "schema": {
          "type": "string"
        },
        "required": false
      }
    },
    "securitySchemes": {
      "OAuth2": {
        "type": "oauth2",
        "description": "Pass the access token in the 'Authorization' header with the format \"Bearer ${token}\", i.e. the word \"Bearer\" and your access token from the /o/token/ API, separated by whitespace.\n",
        "flows": {
          "password": {
            "tokenUrl": "/o/token/",
            "scopes": {
              "hosted_checkout": "Scope for tokens used by merchant applications which allow Forage to manage split tender processing (i.e. EBT + Credit/Debit).\n",
              "pinpad_only": "Scope for tokens used by merchant applications which manage their own split tender (i.e. Forage Checkout is used only for EBT processing).\n"
            }
          },
          "clientCredentials": {
            "tokenUrl": "/o/token/",
            "scopes": {
              "internal": "Scope for tokens used by Forage internal applications.\n",
              "pin-protected": "Scope for tokens which can access secure storage.\n",
              "disbursement": "Scope for tokens which can disburse money to merchants.\n"
            }
          }
        }
      }
    }
  }
}
```

# Sibling pages

* [Create a Custom Balance Check Session](https://docs.joinforage.app/reference/create-custom-balance-check-session.md)
* [Retrieve a Custom Balance Check Session](https://docs.joinforage.app/reference/view-balance-session.md)