v1
latestOpenAPI 3.0.22026-08-061303782.1 MBSubscriptions
Create a Subscription
Create a Subscription to charge a Payment Instrument on a recurring schedule. Without a trial period, the first Transfer is created within 60 minutes of the Subscription being created.
Optional features:
- Trial period - include trial_details to delay the first charge; first_charge_at in the response shows when billing begins. If the Subscription is based on a Subscription Plan, trial_details do not override those from the plan.
- Discount phase - include discount_phase_details with a reduced amount and a billing_interval_count to apply a discounted price for a set number of cycles before full billing resumes. If the Subscription is based on a Subscription Plan, discount_phase_details do not override the plan's values.
- Subscription Plan - provide a subscription_plan_id to base the Subscription on a Subscription Plan template (inherits amount, billing_interval, and more). You cannot set the amount field when you use a Subscription Plan.
- Future start - set start_subscription_at to a future timestamp; the Subscription starts in state NOT_STARTED with subscription_phase: NONE.
- Billing cycle day - set billing_cycle_day to control which day of the month billing occurs for monthly-cycle subscriptions (e.g., MONTHLY, BIMONTHLY, QUARTERLY, SEMIYEARLY, YEARLY, BIYEARLY, TRIYEARLY). If the start date doesn't match the billing cycle day, the first invoice is prorated.
- Fixed length - set total_billing_intervals to expire the Subscription after a fixed number of billing cycles.
{% admonition type="info" %} When the Payment Instrument › type is PAYMENT_CARD, APPLE_PAY, or GOOGLE_PAY, Finix runs a $0.01 Authorization to validate the card (AVS and CVV). If validation fails, the API returns 422 and the Subscription is not created. {% /admonition %}
post/subscriptions
Headers
Finix-Versionstring
Example:2022-02-01
Specify the API version of your request. For more details, see Versioning.
Content-Typestring
Example:application/json
The data type being sent in the request body must be application/json.
Request body
Example request
{
"amount": 5000,
"billing_interval": "MONTHLY",
"buyer_details": {
"identity_id": "IDtEnKsZyJNUGK83ZTx4C45S",
"instrument_id": "PImXAVgkKVshKWWHUk4xXbve"
},
"linked_to": "MUcgYZswyRfqSSbvMsxuaHxZ",
"linked_type": "MERCHANT",
"subscription_details": {
"collection_method": "BILL_AUTOMATICALLY"
}
}Response
Subscription
Example response
{
"amount": 5000,
"billing_cycle_day": 1,
"billing_interval": "MONTHLY",
"subscription_plan_id": "subscription_plan_ctBbJ1ihsC8Hpju4RQfZE"
}