> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay-881012b3.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrate With TPAP Pro

> Step-by-step guide on how to integrate with TPAP Pro.

<div style={{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.35rem 0.9rem",border:"1px solid rgba(128,128,128,0.28)",borderRadius:"0.5rem",padding:"0.45rem 0.75rem",margin:"0 0 1.25rem",fontSize:"0.875rem"}}>
  <span style={{fontWeight:600}}>Available in</span>
  <span>🇮🇳 India</span>
</div>

Integrate TPAP Pro by following these steps:

1. [Integrate TPAP Pro Flows](#1-tpap-pro-flows)
2. [Follow Go-live checklist](#2-follow-go-live-checklist)

## 1. TPAP Pro Flows

Following are the flows available on our TPAP stack:

<AccordionGroup>
  <Accordion title="Customer Onboarding">
    Customer onboarding is a process of binding and registering the customer device by validating the mobile number. The customer's payment sources are linked to ensure seamless and hassle-free transactions. Additionally, You must create a fingerprint that acts as a unique identifier generated based on various attributes of the device. Know more about [customer onboarding](/docs/api/payments/tpap-pro/customer-onboarding).

    <AccordionGroup>
      <Accordion title="Create a Device Fingerprint">
        Create an unique identifier using various attributes of the device. This identifier is used to recognise the specific device during subsequent transactions.

        To generate a device fingerprint for the customer:

        1. Create a string with the following fields separated by a pipe (|).

        | Attributes          | Description                                                                                                                           |
        | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
        | SSID                | A sim subscriber id from the native sim module.                                                                                       |
        | APP.ID              | The package name of the app.                                                                                                          |
        | device.UUID         | The advertisement id on Android.                                                                                                      |
        | mobile\_number      | Customer’s phone number present on the device.                                                                                        |
        | customer\_reference | The customer reference.                                                                                                               |
        | timestamp           | The current time in the UNIX timestamp. Ensure to pass the same timestamp in the request header for `x-device-fingerprint-timestamp`. |

        ```html Code theme={null}
        SSID|APP.ID|device.UUID|mobile_number|merchantCustomerId|timestamp
        ```

        2. Hash this string using the SHA-256 algorithm.

        ```java Java theme={null}
        deviceFingerprintPayload =      
        "<ssid|app.id|device.uuid|mobile_number|customer_reference|timestamp>"MessageDigest digest = MessageDigest.getInstance("SHA-256");
        byte[] deviceFingerprint = digest.digest(deviceFingerprintPayload.getBytes(StandardCharsets.UTF_8));
        ```

        3. Send the timestamp within the headers.
      </Accordion>

      <Accordion title="Device Binding Status">
        The following table lists the different device binding status and their description. Know more about [device binding](/docs/api/payments/tpap-pro/customer-onboarding/bind-device).

        | Status                         | Step                 | Description                                                                                                                                                                                                       |
        | ------------------------------ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
        | `mobile_verification_pending`  | mobile\_verification | The mobile number verification is still pending by the receiver. This means the PSP is yet to receive a callback from the entity that is supposed to verify the number. You must poll the API again.              |
        | `mobile_verification_expired`  | mobile\_verification | PSP did not receive a callback from the entity that is supposed to verify the number within the expiry time. Hence, the device binding has expired. This is a terminal failure status, and you must stop polling. |
        | `mobile_verification_mismatch` | mobile\_verification | The customer mobile number received from the entity that is supposed to verify the number differs from the one you passed. This is a terminal failure status, and you can stop polling.                           |
        | `verified`                     | mobile\_verification | The verification is successful.                                                                                                                                                                                   |
        | `mobile_verification_failed`   | mobile\_verification | The mobile verification is failed due to the invalid device details.                                                                                                                                              |
        | `device_already_verified`      | device\_binding      | The device is already verified.                                                                                                                                                                                   |
      </Accordion>
    </AccordionGroup>
  </Accordion>

  <Accordion title="Funds and Accounts Management">
    Funds and accounts management helps you manage payment sources and providers. The Razorpay APIs let you add more accounts, delete existing accounts and change PINs for accounts for hassle-free transactions. Know more about [managing funds and accounts](/docs/api/payments/tpap-pro/funds-account-management).
  </Accordion>

  <Accordion title="Payments">
    The Payment module enables you to make various transactions using payment APIs. Below are the supported transaction types:

    * [Make Payments](/docs/api/payments/tpap-pro/payments-flow/make-payments): Facilitate P2P (peer-to-peer) or P2M (peer-to-merchant) payments. The supported payment transfer types are:

      * Pay from a VPA to VPA.
      * Pay from a VPA to a payment source.
      * Pay from a payment source to a VPA.
      * Pay from one payment source to another.

      This API lets you enable the following payment options for customers:

      * **Scan and Pay (UPI QR & Bharat QR):** Customers can QR codes and make payments.
      * **Intent Payment:** Customers can make payment through an intent link.
      * **Payment to a PSP merchant:** Customers can make a payment using the merchant VPA.
      * **P2P Pay (VPA and Account+IFSC):** A person can pay to another person using a TPAP.
      * **Self Pay:** Customers can make transactions between their own accounts.
    * [Collect Payments](/docs/api/payments/tpap-pro/payments-flow/collect-payments): This API lets you collect payments from others.
    * [Approve Collect Requests](/docs/api/payments/tpap-pro/payments-flow/approve-collect-requests): This API lets you approve payment collect requests.
    * [Reject Collect Requests](/docs/api/payments/tpap-pro/payments-flow/reject-collect-requests): This API lets you reject payment collect requests.
  </Accordion>

  <Accordion title="Mandates">
    You can create and manage mandates using the Razorpay APIs. Know more about [managing mandates](/docs/api/payments/tpap-pro/mandate-flow).
  </Accordion>

  <Accordion title="Complaints API">
    The Complaints API enables efficient handling of transaction-related issues.

    <AccordionGroup>
      <Accordion title="Raise Complaint">
        Submit complaints about transactions to ensure prompt resolution.
      </Accordion>

      <Accordion title="Check Complaint Status">
        Track the progress and status of submitted complaints.
      </Accordion>
    </AccordionGroup>
  </Accordion>

  <Accordion title="UPI Mapper">
    UPI Mapper provides a 1:1 mapping between VPAs and mobile or UPI numbers, enabling efficient and streamlined identification.
  </Accordion>

  <Accordion title="Credit Card on UPI">
    Enable credit card payments via UPI for enhanced flexibility. All features of account management apply to credit cards as well.
  </Accordion>

  <Accordion title="UPI One-time Mandate">
    Authorise one-time payments for specific transactions, offering greater flexibility and control.
  </Accordion>

  <Accordion title="Credit Lines on UPI">
    Enable transactions using pre-approved credit lines, helping users manage finances more effectively.
  </Accordion>

  <Accordion title="UPI Lite">
    Support low-value transactions with a simplified process, ensuring quick and seamless payments.

    <AccordionGroup>
      <Accordion title="Activation of Lite Service">
        The user enables UPI Lite through their UPI app, and the request is processed via PSP, NPCI, and the bank, ensuring activation.

        <img src="https://razorpay.com/docs/build/browser/assets/images/tpap-upilite-activation.jpg" alt="TPAP Pro UPI Lite Activation Flow" width="800" />
      </Accordion>

      <Accordion title="Payment via UPI Lite">
        The user makes a low-value transaction using UPI Lite, where the amount is deducted instantly from their Lite balance without requiring bank authentication.

        <img src="https://razorpay.com/docs/build/browser/assets/images/payment-via-upilite.jpg" alt="Payment VIA UPI Lite" width="800" />
      </Accordion>

      <Accordion title="Disabling UPI Lite Service with Non-Zero Balance">
        If the user disables UPI Lite with a remaining balance, the amount is credited back to their linked bank account before deactivation.

        <img src="https://razorpay.com/docs/build/browser/assets/images/disabling-upilite-services.jpg" alt="Disabling UPI Lite Service with Non-Zero Balance" width="800" />
      </Accordion>
    </AccordionGroup>
  </Accordion>

  <Accordion title="Global UPI">
    Enable international UPI payments, making cross-border transactions smooth and hassle-free.
  </Accordion>
</AccordionGroup>

## 2. Follow Go-live Checklist

Consider the following steps before taking your integration live.

<AccordionGroup>
  <Accordion title="Switch Test API Keys With Live API Keys">
    After confirming if your integration is working successfully, you can take the integration live by switching the Test Mode API Keys with the Live Mode Keys.
  </Accordion>

  <Accordion title="Subscribe to Webhooks">
    [Set up Razorpay Webhooks](/docs/webhooks/setup-edit-payments) to configure and receive notifications when a specific event occurs. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL.
  </Accordion>
</AccordionGroup>

## Header Information

Below are the headers you should pass while polling different APIs.

| Header Name                    | Data Type | Mandatory/Optional | Description                                                                          |
| ------------------------------ | --------- | ------------------ | ------------------------------------------------------------------------------------ |
| Authorisation                  | string    | Mandatory          | The standard authorisation.                                                          |
| Content Type                   | string    | Mandatory          | The content type. Supported value: `application/json`.                               |
| x-device-fingerprint           | string    | Mandatory          | The device fingerprint used to validate the request coming from the expected device. |
| x-device-fingerprint-timestamp | string    | Mandatory          | The UNIX timestamp to generate the device fingerprint.                               |
| x-customer-reference           | string    | Mandatory          | The unique identifier of the customer created by TPAP.                               |
