Skip to main content
POST
/
v1
/
checkout
/
sessions
/
{id}
/
refund_allocation
Preview Refund Allocation
curl --request POST \
  --url https://api.withflex.com/v1/checkout/sessions/{id}/refund_allocation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "checkout_session": {
    "line_items": [
      {
        "product": "<string>",
        "amount_to_refund": 1
      }
    ],
    "refund_metadata": {},
    "amount_tax": 123,
    "amount_shipping": 123,
    "amount_discount": 123,
    "payment_methods": [
      {
        "payment_method_id": "<string>",
        "amount": 123
      }
    ]
  }
}
'
{
  "allocations": [
    {
      "payment_method_id": "<string>",
      "last4": "<string>",
      "amount": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Use a Bearer token to access this API.

Body

application/json
checkout_session
object
required

Response

allocations
object[]
required