Add Subscription
This API is used to create a unique payment link for a subscription, that can be shared with a customer. Once the user pays the requested amount through the selected payment channel, the partner gets a webhook call for a successful credit and subscription.
At the start, the subscription is in PENDING state, which means the customer can pay to activate the subscription. If the customer fails to make payment before the date derived from pendingExpire then the subscription is moved into PENDING_EXPIRED which is a terminal state after which no payment can be made on the same subscription.
Authorizations
Merchant API Key
Generated request signature
Body
Fiat currency for which request needs to be initiated.
USD, EURO, INR This is the amount in the same denomination as quoteCurrCode. This is the maximum value for which we can use the mandate for auto debit the amount. This amount will be inclusive of GST/VAT. Please configure it accordingly. Note: UPI has a maximum limit of ₹15,000 per mandate. Cards have a limit of ₹500,000 per mandate.
This URL is needed to redirect the user after the session is completed.This url will be a redirection with status, subscriptionId, and referenceId values passed in the query parameters.
Frequency of the subscription renewal period.
DAIL, WEEK, MNTH, BIMN, QURT, MIAN, YEAR, ONDM Billing Details of the customer
Items the customer wants to buy.
If the customer is already created use customerId and then email is optional parameter.
Customer's email. Require this to send an invoice. This parameter is mandatory if clientReferenceId is not passed.
Customer's reference id that the partner can pass to map it to the customer on Transact Bridge panel. If email is not passed in the request body, the customer must enter the email on the product checkout page. This parameter is mandatory if email is not passed.
The customer's Indian phone number in the format of +91-XXXXXXXX
"+91-9876543210"
PAN number of the customer
If the customer is business type then GST can be used so that the business can get input credits.
Name of the customer
This is a partner-generated ID to map a subscription. Partners can use this to query the subscriptions as well. This cannot be the same for two subscriptions. Reference ID that was passed by the partner during the generation of the session.
128We will create a userTaxId for the partner. This allows us to tax the product correctly. For example: Partners can have two different userTaxId one for 18% GST and the other for 5% GST.
If payMethod parameter is sent by the partner then on the payment page for the customer only that payment method will be visible to user.
UPI, NB, CC, DC Depending on the redirection type value, the user will either be redirected to a new page for payment or to the same window of the product page. Default value is NEW_PAGE.
SAME_PAGE, NEW_PAGE To set the subscription view
Only AUTOPAY is allowed right now.
AUTOPAY If this is true, then the subscription is prepaid based subscription and allows to deduction of money before providing the product to the end customer and generating the invoice at the start of the subscription period. If this is false then it is a postpaid subscription which creates an invoice at the end of the subscription period.
To pass the coupon object and apply different coupons on the subscription.
Number of minutes after which the status of the subscription if PENDING (Customer did not pay) it becomes PENDING_EXPIRED which is a terminal state and now customers cannot pay on the same subscription.
Max unpaid invoices allowed for the subscription. For example, if maxUnpaidInvoices is set to 2 then after 2 unpaid invoices the subscription status will be converted from ACTIVE to the status based on postMaxUnpaidInvoices.
Subscription status after maxUnpaidInvoices threshold is crossed by the customer. Default Value: PAUSED
PENDING, PENDING_EXPIRED, PAUSED, EXPIRED, CANCELLED Period of time from the issue date after which DUE invoice is converted into OVERDUE status
It allows the partner to configure the billing cycle from a fixed date. If not passed then the subscription period will start from the day the customer pays for it. For Example: if the frequency is MNTH (monthly) and billingDateAnchor is set to 2, this means that the invoice will be created on every 2nd day of each month.
Configuration of the trial mechanism
Maximum number of unpaid invoices count allowed after that the subscription is PAUSED by the system. For example, if a subscription has been paused due to 3 non payment of invoices and this parameter is set to be 2 then once the customer pays 1 invoice the subscription will be re activated.
To configure how the reattempt for failed invoices be processed.
Shipping Details of the Customer
To make the shipping address the same as the billing address. If sameAsBilling parameter value is set as true then shipTo is not mandatory, and the invoice will have the same shipping and billing address.
To add meta params in the subscription. They will be passed in the webhook and query API as well.
If this is set to be true then the response will contain token that can be used in the drop-in module. This can only be sent in the request if DropIn module has been enabled for the Partner Account.