Subscriptions/Recurring Payments

Following are the APIs that are required to create, debit, and cancel a subscription.

  1. Create subscription - You can refer to the link given below to know the parameters required for creating a subscription: https://docs.rocketfuelblockchain.com/developer-guides/api-reference/generate-invoice-link

  2. Request a debit of funds for the subscription

Reminder emails are sent to the shoppers to make the pre-payment for the subscriptions with the invoice link or maintain the exchange balance equal to the bill amount.

POST /subscription/debit

Request Body

NameTypeDescription

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

NameTypeDescription

merchantId

String

merchantAuth

String

subscriptionId

String

{

status: 200,

result: { success: true }

}

Last updated