v1

latestOpenAPI 3.1.02026-07-2684271522.2 KB
Subscriptions

Get Refund Preview

Previews the prorated refund that would result from canceling a subscription. Runs the same validation as a real prorated refund but issues no refund and creates no records, so it is safe to call repeatedly. Returns the prorated amount available to refund, the amount paid on the latest invoice, the current billing period, and the card that would be refunded.

get/v1/subscriptions/{id}/refund_preview

Path parameters

idstring required
Example:fsub_01J9XR8M3K7VZ8N2YB4WJ6T0RA

Response

The result of previewing a prorated refund for a subscription cancellation, without issuing any refund. Reflects what would be refunded based on the remaining billing period.

prorated_amount_available_to_refundinteger required

Prorated amount available to refund, in the smallest currency unit (e.g., 1499 = $14.99 USD), based on the unused portion of the current billing period.

invoice_amount_paidinteger required

Total amount paid on the subscription's latest invoice, in the smallest currency unit (e.g., 2999 = $29.99 USD).

current_period_startstring required

A timestamp encoded as an RFC 3339 / ISO 8601 string (e.g. 2026-06-15T14:30:00Z).

current_period_endstring required

A timestamp encoded as an RFC 3339 / ISO 8601 string (e.g. 2026-06-15T14:30:00Z).

payment_method_idstring nullable

The payment method ID that would be refunded, if available

last4string nullable

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

Example response

{
  "prorated_amount_available_to_refund": 2500,
  "invoice_amount_paid": 2500,
  "current_period_start": "2026-06-15T14:30:00Z",
  "current_period_end": "2026-06-15T14:30:00Z",
  "payment_method_id": "fpm_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
  "last4": "4242"
}