Skip to main content
POST
/
v1
/
checkout
/
sessions
/
{id}
/
capture_allocation
Preview Capture Allocation
curl --request POST \
  --url https://api.withflex.com/v1/checkout/sessions/{id}/capture_allocation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "checkout_session": {
    "final_capture": false,
    "line_items": [],
    "metadata": {},
    "capture_metadata": {},
    "amount_shipping": 0,
    "amount_discount": 0,
    "amount_tax": 0
  }
}
'
{
  "allocations": [
    {
      "payment_method_id": "obj_01EXAMPLE00000000000000000",
      "last4": "4242",
      "amount": 0
    }
  ]
}

Authorizations

Authorization
string
header
required

Use a Bearer token to access this API.

Path Parameters

id
string
required
Example:

"obj_01EXAMPLE00000000000000000"

Body

application/json
checkout_session
object
required
Example:
{
"final_capture": false,
"line_items": [{ "product": "string" }],
"metadata": {},
"capture_metadata": {},
"amount_shipping": 0,
"amount_discount": 0,
"amount_tax": 0
}

Response

Success

allocations
object[]
required