Create a Subscription
Last updated
Last updated
For managing subscriptions, the first step is to create one through our , specifically in the Payment Links section. When creating the subscription, you’ll need to specify details such as the amount per period and the duration. Once the subscription is set up, you can use the ID to create subsequent Checkout Preferences, allowing new users to subscribe easily.
Go to Oneinfinite dashboard and create a subscription in payment links section
Copy the ID to be set in the payment_link_id
field.
Now you’re ready to make the request.
POST
/v1/checkout_preferences
Headers
x-api-key
<your api key>
x-api-secret
<your api secret>
Body
type
string
required
SUBSCRIPTION
payment_link_id
float
required
You can find the payment_link_id in your Oneinfinite Dashboard
origin
string
required
if use api integration use "API"
external_id
string
optional
The ID of your business
expiration_date
string
optional
Date with format RFC3339: yyyy-MM-dd'T'HH:mm:ss'Z' Ex: 2016-11-01T20:44:39Z, The expiration_date must be at most one week from the current date. If you don’t send any the expiration_date will be in 15 min.
payer
Object
optional
If you provide the payer's details, we won't request them during the checkout process.
payer.email
string
optional
Payer email ie. johndou@gmail.com
payer.name
string
optional
Payer name ie. John
payer.last_name
string
optional
Payer last_name ie. Doe
payer.phone
string
optional
Payer phone ie. +542615985699
payment_method_types
[]string
optional
List of available payment methods you want to use in your checkout preference. If you don’t send any, all payment methods will be used.
selected_payment_method_id
string
optional
If you provide the ID of a specific payment method, we won't ask to select a payment method during the checkout process
Example