Paytm Custom Checkout

Paytm Custom Checkout is ideal for developers and merchants who want to collect payments in a mobile app or website with a custom designed payment experience that is coherent with your brand.

With Paytm Custom Checkout, you dont have to worry about PCI compliance. Custom Checkout enables payment acceptance via Paytm (Wallet, Postpaid, Payments Bank), Debit/Credit cards, Net Banking, BHIM UPI and EMI in your mobile app or website. Additionally, Custom Checkout supports auto-read bank OTP in mobile apps. Custom Checkout is coupled with over 100 million saved cards in Paytm and hence ensures a fast and frictionless payment experience for your customers.

Demo of Paytm Custom Checkout

Overview of payment processing via Paytm Custom Checkout

  1. User visits your website or mobile application
  2. User adds goods/services into the shopping/order cart and proceeds to checkout
  3. You call the Initiate Transaction API
  4. Paytm shares a Transaction Token with you
  5. Your website or mobile application calls Fetch Payment Option API
  6. Paytm returns all supported Payment Options for that transaction
  7. You render the payment page with these options on your website or mobile app
  8. User selects a payment option to complete payment
  9. You call the respective API to validate and get the details of payment option
  10. Once user submit the details (like card number and CVV for card payments), call Process transaction API
  11. Paytm processes the transaction with customer’s bank and returns transaction response
  12. Call the Transaction Status API to verify the transaction response
  13. Notify the payment status to user and proceed with the order/service fulfillment

Steps in processing payments via Paytm Custom Checkout

STEP 1: Get your authentication keys

  • MID: A unique merchant identifier issued by Paytm for your account
  • Merchant Key: A 16-digit unique identifier issued by Paytm for your account

STEP 2: Get Transaction Token

  • When user clicks Pay on your website or mobile app, create an order in your backend system and call Initiate Transaction API
  • Paytm validates your details and return the TXN_Token
  • Send this TXN_Token to your website or mobile app
transaction token img

STEP 3: Create Payment Page

  • Your website or mobile app uses this TXN_Token to call Fetch Payment Option API
  • Paytm validate the TXN_Token and returns all available payment options for this transaction
  • You render the payment page with these options on your website or mobile app
paytmcc
create payment img

STEP 4: Get Payment Instrument Details

After your customer selects an option on the payment page, call respective payment instrument API to get further details -

Customer selects following options for Payments:

Customer selects Paytm for payment: If your user has a Paytm account, he/she can pay via these methods subject to balance availability - Wallet, Postpaid, Saved Cards, Paytm Payments Bank and Paytm UPI.
  • Start by calling Paytm Login Send OTP followed by Login Validate OTP
    paytmccpaytmcc
    login img
  • Get available balance: To get the balance of Paytm Wallet, Paytm Postpaid and Paytm Payments Bank, call Fetch Balance Info API
    paytmcc
    login img
  • Get Paytm UPI: To get user’s saved VPA on Paytm, call Fetch Payment Option API
    login img
  • Get Paytm Saved Cards: Call Fetch Payment Option API to get all the saved debit and credit cards user has with Paytm with following details
    • Card network type (VISA, Master, AMEX etc.)
    • Card issuing bank
    • First 6 and last 4 digits of card no
    • CVV required
      for maestro cards CVV and expiry is not required for transaction
    • CVV length
    • Current success rate of payments on this card
      you can consume the same and display the message to end consumer so he can choose any other payment method
    saved card img

STEP 5: Process Payment via Banks

  • After your user has selected a payment option, call the process transaction API
    • Paytm Wallet, Paytm postpaid :

      Paytm processes the transaction and returns the status (success/pending/failed). You should always call Transaction Status API to validate this status response.
      pay with wallet img
    • Paytm Payment Bank, Net Banking, EMI, BHIM UPI Collect :

      Paytm returns the bank redirection URL using which you redirect the user to bank page to complete payment. After payment, bank redirects user back to Paytm and we redirect user back to your payment confirmation page.
      pay with nb img
    • Saved and new Credit/Debit/Prepaid cards :

      Paytm supports two flows here -
      • Collect and verify bank OTP on your page in your website or mobile app so the user is never redirected to the bank page to complete payment. This is currently supported only for ICICI, HDFC, Citibank, Axis and SBI. Paytm returns a set of supported functions for validating bank OTP. Call the Direct Bank Request API to validate bank OTP in your app or website
      • Collect and verify OTP on bank page
        1. You redirect the user to bank page
        2. User completes the transaction on bank page
        3. Bank redirects user back to Paytm
        4. Paytm Redirects the user back on your payment confirmation page
      pay with card img
    • UPI Intent :

      Paytm returns the UPI Intent URL
      • As per user user selection, call the user’s UPI App with this URL
      • User completes the transaction on the installed UPI App
      • You call Transaction Status API to verify the transaction status
      pay with upi img
  • In case you need to update the order Amount or details then call the Paytm Update Transaction Detail API before the process transaction API

Step 6: Validating Checksum

Checksumhash received in response of transaction needs to be verified on merchant server using Paytm library with all the parameters in key value pairs.


STEP 7: Verifying Payment

You should always validate transaction response via server-side request using Transaction status API. This API requires checksumhash in request and response. You must verify the Order Id and Amount with your DB entries. The status should be treated as the final status of the transaction in all cases.

On completion of your integration

Post completion of integration on your staging environment, do a complete transaction from order summary page on your website or mobile app

  1. Attempt a test transaction using test paymodes credentials
  2. Ensure you re-verify transaction response withTransaction Status API via server to server call in payment flow and not separately as a one time activity
  3. See the transaction details in “Test Data” mode on your dashboard

Once the test transaction is complete, move your code to live environment with production account details. Note that production accounts details are available after you have activated your account on the dashboard

Lastly, it's recommended that you read about Managing Refunds and late payment notifications

In case of any issues with integration, please get in touch