Subscriptions/Recurring Payments
Following are the APIs that are required to create, debit, and cancel a subscription.
Create subscription - You can refer to the link given below to know the parameters required for creating a subscription: https://docs.rocketfuel.inc/developer-guides/api-reference/generate-invoice-link
Request a debit of funds for the subscription
POST
/subscription/debit
Request Body
Name
Type
Description
merchantAuth*
String
merchantId*
String
orderId
String
items
Array
subscriptionId*
String
amount*
Number
currency*
String
{
status: 200,
result: {
data: [{
transactionId: response.id,
amount: response.localAmount,
currency: response.localCurrency,
rateDivisor: response.rateDivisor,
orderId: response.meta.offerId,
status: response.status,
userId,
merchantId,
subscriptionId
}],
errors: [],
}
3. To cancel a subscription
POST
/subscription/cancel
Request Body
Name
Type
Description
merchantId
String
merchantAuth
String
subscriptionId
String
{
status: 200,
result: { success: true }
}
Last updated
Was this helpful?