search

Subscription activation - Custom Checkout

Paytm provides PCI-compliant, secure APIs ideal for the developers, entrepreneurs, and big enterprises, who want to collect payments through a mobile app or website. It gives you the liberty to design or customize your payment checkout page in compliance with your design standards and brand’s thematic guidelines to enhance the user's payment experience.

Overview of Subscription Payments via Custom Checkout

  1. User selects the subscription plan, and you get the Subscription ID and Transaction token using the Initiate Subscription API request.
  2. User selects one of the payment options such as Credit/Debit card, Wallet, Bank Mandates or UPI rendered by you on the checkout page.
  3. Based on the payment options selected by a user, you must follow the steps explained here to activate the subscription.
  4. The user enters the payment details on your App/Website to complete the authorization.
  5. After successful completion of the payment, the subscription plan becomes “Active”. You can also verify the Subscription creation status with Subscription Status API or via callback.
     

Postman Collection - Custom Checkout for Subscription

The postman collection for Subscription Custom Checkout solution lets you quickly understand the flow integration. Click the button below to download and import the APIs collection in the postman. This would also help you test the APIs on the integration environment.
 

Run in Postman


To set up the environment for using the Postman Collection, click here.

Integration Flow for Subscription Activation

Once you receive the Subscription ID and Transaction Token in the response to your Initiate Subscription API request, you must proceed with the steps below to authorize and activate the subscription plan.

 

Select Payment Instrument and Authorize Subscription

You can either display the payment methods on your own or you can use the Fetch Payments Options API to fetch and display the available payment methods to the user.

User selects one of the following payment methods to proceed with the subscription authorization:
 

  1. User selects the credit/debit card as payment method and enters the standard card details. While entering the card number, you can check the following details available on the card from Paytm using the Fetch Bin Details API.
    • Validity of Card BIN
    • Support of subscription payments on the BIN
    • Card Scheme and Issuing Bank
    • Past 15 minutes success rate of the BIN. In case of a low success rate, you can notify the user to use another payment method.
  2. After your user has entered the card details, redirect the user to the bank page for card verification & first payment deduction. You can redirect via HTML form post, parameters of the payload and HTML form post are given here.
  3. After the successful completion of authentication, the user is redirected to your mobile app or website. In parallel, Paytm would make the subscription contract “active” and sends a server to server callback to your server to confirm it to you. Alternatively, you can use the Subscription Status API to confirm the status.
     
  1. User selects Bank Mandate as payment method and enters the following bank account details to proceed with the authorisation:
    • Account Holder Name
    • Bank Account Number
    • Bank Account Type
    • Bank Name (Channel Code to be shared with Paytm) IFSC Code
    • Authentication Mode: Debit Card or Net Banking (as applicable for the bank) After the user has entered the account details, redirect the user to the bank page to complete the authorisation via net banking credentials or debit card and OTP depending on the authorization mode selected. You can redirect via HTML form post, parameters of the payload and HTML form post are given here.
  2. After the successful authorisation, the subscription contract is made ‘Authorised’ and the user is redirected to your app/website.

    Note: In the case of Bank Mandate, the subscription contract only becomes ‘Active’ after getting the confirmation from the beneficiary bank which could take up to 2 days.

  3. Once Paytm receives the confirmation from the bank, it makes the subscription contract “active” and sends a server to server callbackto confirm it to you. Alternatively, you can use the Subscription Status API to confirm the status

User selects Paytm Wallet as payment method to proceed with the authorisation:

  1. You prompt the user to enter their Paytm’s mobile number or pre-populates, if the number is already available to you.
  2. You send the phone number to Paytm using the Send OTP API and then Paytm sends the OTP to the requested mobile number.
  3. User enters the OTP sent by Paytm on your payment page and you validate the OTP using the Validate OTP API.
  4. On successful OTP validation, the state of the Transaction Token is updated with Paytm and you redirect the user to the Paytm payment page for debiting Re 1 (Or the upfront amount).
    Using the updated Transaction Token and Fetch balance API, you can fetch the user’s account balance for Paytm Wallet. In case of insufficient balance, you can confirm to the user that they could add money to their balance in the next step.
  5. You initiate a transaction to authorize the subscription via HTML form post. Parameters of the payload and HTML form post are given here. Please note that the user would be asked to add money via a different payment methods on this step in case the user did not have sufficient balance.
  6. After the successful completion of payment, the user is redirected to your mobile app or website. In parallel, Paytm would make the subscription contract “active” and sends a server to server callback to your server to confirm it to you. Alternatively, you can use the Subscription Status API to confirm the status.
  1. User selects UPI as payment method and enters the VPA (Virtual payment address) in the format ****@****. After the user enters the VPA, you can check the following using the Validate VPA API:
    • Format of the Virtual Payment Address
    • Is the Virtual Payment Address a valid one
    • Does the PSP app support subscription
    • Does the underlying default bank account support subscription? In case of a Paytm, VPA will validate all the bank accounts.
  2. Post json to initiate authentication which consecutively initiates the authorisation for subscription. Parameters of request json payload are provided here. A json bank form returns which needs to be posted as HTML. The user sees a waiting screen and receives a notification, approving which a callback will be returned.
  3. The user would get a push notification from PSP App and complete the authorisation on the app.
  4. After the successful authorisation, the user is redirected from the waiting screen to your app/website. Simultaneously, Paytm makes the subscription contract “active” and sends a server to server callback to your server to confirm it to you. Alternatively, you can use the Subscription Status API to confirm the status.
  1. User selects UPI as the payment method and you can call the Fetch Payment Options API to get the list of apps supported on UPI recurring flow. This list would be later used to filter the apps where the customer can complete the subscription authorisation.
  2. Post JSON to initiate authentication which consecutively initiates the subscription authorisation. Parameters of request JSON payload are provided here. You will get the Deeplink in the response.
    Format of Deeplink: upi://mandate?pa=&pn=&mn=&tid=&type=&validitystart=&validityend=&am=&amrule=&recur=&recurvalue=&recurtype=&tr=&url=&cu=&mc=&tn=&sign=&orgid
  3. Use this Deeplink to fetch the available UPI apps on the user’s phone. Filter these apps using the list of apps provided in the Fetch payment options API & display them to the user. On the user’s selection redirect the user to the app.
  4. After the successful authorisation, the user is redirected to your app. Simultaneously, Paytm makes the subscription contract “active” and sends a server to server callback to your server to confirm it to you. Alternatively, you can use the Subscription Status API to confirm the status.