This Section guides you to create subscription via api.
The subscription documention will guide you, how to integrate subscription payment via api. If you want to skip the 3DS option, please contact Foloosi's support team.
NOTE,
A subscription can only be created when the API is set to live mode.
To create a subscription and send the subscription link to the customer via SMS or email, this process will skip the payment step before creating the subscription. The link will be sent after the subscription is created, and the customer can proceed with the payment.
// Create SubscriptionPOSTAPI LINK: https://api.foloosi.com/v1/subscription/create// Post Body Fields{"plan_name" : "Api new plan test",/** YOUR PLAN NAME*/"billing_type" : "month",/** value must be day/week/month/year */"billing_cycle" : 1,/** it only applicable for week and month billing type.ex Every 1 weeks */ "billing_currency" : "AED", /** it should be 3 digit code and other than AED you should enabled multi currency option from Foloosi */
"billing_amount" : "SUBSCRIPTION AMOUNT","setup_fee" : "SETUP FEE",/** Optional - which is subscription setup one time fee */"total_count" : 10,/** number of deductions */"description" : "monthly demo plan","start_date" : "dd-mm-yyyy",//which is optional param.if you given value should be in the format //Note : if you given date means .at the time of payment will be charged by transaction
//amount as you given .subscription recurring will start on the given date and given billing amount
"notify_email" : "Yes"||"No","notify_sms" : "Yes"||"No","customer" : {"name":"CUSTOMER NAME","email":"CUSTOMER EMAIL ID","phone_code":"CUSTOMER MOBILE CODE",/** Eg: +971 */"phone_number":"CUSTOMER MOBILE NO" }}//Sample response{"message": "Subscription created successfully","data": {"subscription_no":"FAPISC1234567XXXXXX122fw11" }}
Sample images
After successful subscription creation, it has to be listed in Foloosi panel. Please login to view the subscription created.
Click the subscription id to view details like below
To get the Subscription Details
For Subscription Details, you can use the Get request as below,
it only applicable for week and month billing type.ex Every 1 weeks
setup_fee
String
false
which is subscription setup one time fee
billing_amount
String
true
subscription amount
billing_currency
String
true
transaction currency
total_count
Integer
true
number of deductions
description
String
false
describe the subscription details.
start_date
Date
false
if you given date means .at the time of payment will be charged by transaction,
amount as you given .subscription recurring will start on the given date and given billing amount
Format should be in "dd-mm-yyyy".
name
String
false
customer name - auto render in payment popup if passed