Skip to main content
GET
/
v1
/
subscriptions
/
{id}
/
refund_preview
Get Refund Preview
curl --request GET \
  --url https://api.withflex.com/v1/subscriptions/{id}/refund_preview \
  --header 'Authorization: Bearer <token>'
{
  "prorated_amount_available_to_refund": 0,
  "invoice_amount_paid": 0,
  "current_period_start": "2024-01-01T00:00:00Z",
  "current_period_end": "2024-01-01T00:00:00Z",
  "payment_method_id": "obj_01EXAMPLE00000000000000000",
  "last4": "4242"
}

Documentation Index

Fetch the complete documentation index at: https://docs.withflex.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use a Bearer token to access this API.

Path Parameters

id
string
required
Example:

"obj_01EXAMPLE00000000000000000"

Response

Success

prorated_amount_available_to_refund
integer<int64>
required

Prorated amount available to refund in cents, based on remaining billing period

Example:

0

invoice_amount_paid
integer<int64>
required

Total amount paid on the latest invoice, in cents

Example:

0

current_period_start
string
required

Current billing period start

Example:

"2024-01-01T00:00:00Z"

current_period_end
string
required

Current billing period end

Example:

"2024-01-01T00:00:00Z"

payment_method_id
string | null

The payment method ID that would be refunded, if available

Example:

"obj_01EXAMPLE00000000000000000"

last4
string | null

Last 4 digits of the card that would be refunded, if available

Example:

"4242"