v1

latestOpenAPI 3.1.02026-07-2684271522.2 KB
Checkout Sessions

Preview Capture Allocation

Computes how a capture would be allocated across the Checkout Session's payment methods, without executing any capture. Takes the same request body as the capture endpoint and returns the per-payment-method allocations so you can preview a split-cart capture before committing.

post/v1/checkout/sessions/{id}/capture_allocation

Path parameters

idstring required
Example:fcs_01J9XR8M3K7VZ8N2YB4WJ6T0RA

Request body

Example request

{
  "checkout_session": {
    "final_capture": false,
    "metadata": {
      "order_id": "8842",
      "channel": "shopify"
    },
    "capture_metadata": {
      "order_id": "8842",
      "channel": "shopify"
    },
    "amount_shipping": 2500,
    "amount_discount": 2500,
    "amount_tax": 2500
  }
}

Response

Preview of how a capture would be distributed across the session's payment methods.

Example response

{
  "allocations": [
    {
      "payment_method_id": "fpm_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
      "last4": "4242",
      "amount": 2500
    }
  ]
}