Create a new subscription. The subscription is typically returned in incomplete status; the customer must complete first-payment authorization via the returned checkout_url before the subscription transitions to active (or trialing).
Documentation Index
Fetch the complete documentation index at: https://docs.stablepayfi.ai/llms.txt
Use this file to discover all available pages before exploring further.
Bearer API Key, for example Bearer sk_live_xxx.
Unix timestamp in seconds. Must be within 5 minutes of server time.
Replay-protection nonce, 16-64 characters. Use a fresh UUID per request.
Lowercase hex HMAC-SHA256 of {timestamp}.{nonce}.{requestBody} signed with the merchant API Secret. For GET requests, requestBody is an empty string.
Merchant-generated idempotency key, up to 128 characters. Retrying with the same key returns the first created subscription.
128Unix timestamp in seconds. Must be within 5 minutes of server time.
Replay-protection nonce, 16-64 characters. Use a fresh UUID per request.
16 - 64Lowercase hex HMAC-SHA256 of {timestamp}.{nonce}.{requestBody} signed with the merchant API Secret. For GET requests, requestBody is an empty string.
Subscription items. Exactly one item is currently supported.
1 elementExternal customer ID from the merchant system.
Customer email.
Customer phone number.
Customer name.
255Subscription currency. Currently only USD is supported; can be omitted and derived from price_data.currency.
USD, usd Subscription description.
500Redirect URL after the initial payment succeeds. Maximum 512 characters.
512Redirect URL after the initial payment is canceled. Maximum 512 characters.
512Trial end time, Unix seconds. Mutually exclusive with billing_cycle_anchor.
Billing cycle anchor, Unix seconds. Mutually exclusive with trial_end; in non-trial scenarios it must be in the future, or now/past for immediate first charge.
Scheduled cancellation time, Unix seconds. Must be in the future and is mutually exclusive with iterations.
Automatically cancel after N billing cycles. Must be greater than 0 and is mutually exclusive with cancel_at.
x >= 1Merchant metadata.
Subscription created. Reusing the same Idempotency-Key returns the first created subscription.
Subscription object.
Subscription ID.
"subscription"
External customer ID.
Store ID.
Currency.
Subscription description.
Subscription status.
incomplete, trialing, active, past_due, canceled, incomplete_expired Subscription items.
Default payment method ID.
Billing cycle anchor, Unix seconds.
Current period start, Unix seconds.
Current period end, Unix seconds.
Cancellation time, Unix seconds.
Scheduled cancellation time, Unix seconds.
Latest invoice ID.
Full invoice object returned when expand=latest_invoice.
Full customer object returned when expand=customer.
Full payment method object returned when expand=payment_method.
Initial-payment checkout URL, returned on creation.
Merchant metadata.
Creation time, Unix seconds.