v1
latestOpenAPI 3.1.02026-07-2684271522.2 KBCheckout Sessions
Preview Refund Allocation
Computes how a refund would be allocated across the Checkout Session's payment methods, without executing any refund. Takes the same request body as the refund endpoint and returns the per-payment-method allocations so you can preview a split-cart refund before committing.
post/v1/checkout/sessions/{id}/refund_allocation
Path parameters
idstring required
Example:fcs_01J9XR8M3K7VZ8N2YB4WJ6T0RA
Request body
Example request
{
"checkout_session": {
"line_items": []
}
}Response
Preview of how a refund would be distributed across the session's payment methods.
Example response
{
"allocations": [
{
"payment_method_id": "fpm_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
"last4": "4242",
"amount": 2500
}
]
}