This API allows the platform to create an Intent link using Decentro's Penny pull stack.
Important Note
Please use only Staging Credentials on each API Reference page to test the APIs directly from our Documentation.
Overview
This API empowers platforms to authenticate the bank account information of their customers by leveraging Decentro's Penny Pull/Reverse Penny Drop stack capability through the intent flow where the payer doesn't have to enter a VPA (UPI ID).
Flow
Below is the flow for using the Penny pull intent link/intent flow through Decentro.
- The platform creates a penny pull intent link using this API.
- The platform can use the shortened link directly on a web/app flow or use individual deep links by passing generate_psp_uri as true.
- Decentro relays the status of the link creation using response keys and the Decentro transaction ID, which can be used to check the status through the Get Transaction Status API or map the same from the callback triggered by Decentro to the platform.
- The platform sends the shortened link directly to the end customer via SMS, WhatsApp, etc., or can embed it on its web/app.
- The payer clicks on the link and authenticates the payment by entering their UPI MPIN on the app of their choice.
- Decentro triggers the Terminal Transaction Status Callback to the client's pre-configured endpoint with the transaction status.
- Alternatively, the platform can check the status of the Intent link using the Get Transaction Status API, which can be done using Decentro's transaction ID, which is available as the response in this API.
- The payer gets a refund of their INR 1 transaction if successful within 3 working days of the transaction being completed.
Key Points
Below are the key points about the intent link workflow.
- If the payer uses the link to land on a UPI app within the expiry time of 60 minutes, the payer should be able to complete the transaction, unless you define a custom expiry period.
- If the payer uses the link to land on a UPI app after the expiry time, the payer will not be able to complete the transaction.
- If the payer clicks on the link after expiry, the payer will not be redirected to any UPI app, or shown the UPI QR code. Instead the link will be marked as expired and the same will be shown to the payer on the landing page.
API Endpoints
Below are the API endpoints to be used by the platform basis the environments.
Environment | Endpoint |
---|---|
Staging / Sandbox | https://staging.api.decentro.tech/v3/payments/rpd/intent |
Production | https://api.decentro.tech/v3/payments/rpd/intent |
Simulation Data
Below is the test data that can be used by platforms to test out standard scenarios for this API.
The platform is expected to pass the parameters as-is to get the intended scenario.
Note - Simulation Data
To test Simulation Staging data for Penny Pull - Intent API, please use the following API Endpoint: https://staging.api.decentro.tech/v3/payments/rpd/intent
Steps to use this data:
- In the request body, pass request values as shared below in the table, depending on the scenario to be tested.
- Trigger the Create Intent API with the choice(s) chosen in Step 1.
- Based on the values provided in Step 1 for each request parameter, the API response will confirm the creation of a short link, QR code, and PSP-specific deep links.
- In the API response, locate the field labeled decentro_txn_id and make a note of it. This decentro_txn_id will be utilised to retrieve the transaction status using the Get Transaction Status API, indicating whether the payer has completed the payment or not.
Request body | Request value | Test case |
---|---|---|
expiry_time | 60 | Successful transaction with provider callback after 1 minute |
expiry_time | 59 | Failed transaction with provider callback after 1 minute |
expiry_time | 58 | Failed transaction, rejected by NPCI, with provider callback after 1 minute |
expiry_time | 31 | Pending transaction status in GTS. No callback will be propagated. The status will be marked as EXPIRED after 31 minutes. |
expiry_time | 41 | 422 Response. |
Response Parameters
Below are the parameters propagated by Decentro in the response.
Parameters | Description |
---|---|
decentro_txn_id | A unique transaction ID from Decentro for checking the transaction status, refund, etc. |
api_status | Status of the API hit. Note that this is not the status of the transaction. |
message | API status message. Note that this is not about the status of the transaction. |
response_key | Response key documenting the status of the API hit and various errors. |
response_code | Response code documenting the status of the API hit and various errors. |
validation_link | A UPI protocol-based link that the payer can use to pay using any app. |
gpay_uri | A Google Pay protocol-based link that the payer can use to pay using Google Pay. |
phonepe_uri | A PhonePe protocol-based link that the payer can use to pay using Phonepe Pay |
paytm_uri | A PayTm protocol-based link that the payer can use to pay using PayTm. |
Response Keys
Below are the response keys propagated by Decentro in the responseKey parameter, which cover all the scenarios a platform can encounter.
Please note that the below keys don't include transaction-related response keys since the transaction status is relayed only after the payer authorizes payment.
Scenario | Response Key | Response Message |
---|---|---|
Success Scenario | success_validation_link_created | Validation Link created Successfully. |
Consumer/Company is disabled | error_account_disabled | Your account has been disabled. Please reach out to support |
Malformed Request | error_malformed_request | Malformed request detected. |
Empty Request | error_empty_request | The request body is empty. Kindly check the payload and retry. |
Invalid HTTP method | error_invalid_method | The method is not allowed for the requested URL. |
Unsanitized values are passed | error_unsanitized_values | Unsanitized values detected for key(s): <KEY NAME(s)>. Kindly sanitise the corresponding values by removing unicode, non-ascii, and special characters such as . @ # $ % ^ & * ! ; : ' " ~ ` ? = + ) ( and retry. |
Invalid Client ID | error_invalid_client_id | Authentication failed. Please use a valid Client ID. |
Empty Client ID | error_empty_client_id | Client ID cannot be empty. Hint: client_id (string) |
Client ID is passed in an invalid format | error_invalid_format_client_id | Client ID is not of type string. Hint: client_id (string) |
Invalid Client Secret | error_invalid_client_secret | Authentication failed. Please use a valid Client Secret. |
Empty Client Secret | error_empty_client_secret | Client Secret cannot be empty. Hint: client_secret (string) |
Client secret is passed in an invalid format | error_invalid_format_client_secret | Client Secret is not of type string. Hint: client_secret (string) |
Invalid JWT token | error_invalid_jwt | Authentication failed. Token either expired or invalid. |
Empty JWT token | error_empty_jwt | JWT cannot be empty. Hint: JWT (JSON) |
JWT Token is passed in an invalid format | error_invalid_format_jwt | JWT is not of type JSON. Hint: JWT (JSON) |
Consumer URN is not valid | error_invalid_consumer_urn | Consumer URN passed is not valid. |
Consumer URN is empty | error_empty_consumer_urn | Consumer URN cannot be empty. Hint: consumer_urn (string) |
Consumer URN is not in the correct format | error_invalid_format_consumer_urn | Consumer URN is not of type string. Hint: consumer_urn (string) |
Reference ID is not valid | error_invalid_reference_id | Reference ID is not valid. |
Reference ID is empty | error_empty_reference_id | Reference ID cannot be empty. Hint: reference_id (string) |
Reference ID is not in the correct format | error_invalid_format_reference_id | Reference ID is not of type string. Hint: reference_id (string) |
Duplicate Reference ID | error_duplicate_reference_id | Duplicate Reference ID. Please pass an unique value. |
Reference ID value length is incorrect | error_incorrect_length_reference_id | Reference ID needs to be between 5 and 50 characters |
Expiry Time is not valid | error_invalid_expiry_time | Expiry Time needs to be strictly greater than 0. Hint: expiry_time (int) |
Expiry Time is empty | error_empty_expiry_time | expiry_time cannot be empty. Hint: expiry_time (int) |
Expiry Time is not in the correct format | error_invalid_format_expiry_time | Expiry Time should be of type integer. Hint: expiry_time (int) |
Expiry Time is below or above the max/min limit | error_incorrect_length_expiry_time | Expiry Time cannot exceed minutes. |
Incorrect value passed for the generate_qr flag | error_invalid_generate_qr_value | Invalid value entered for Generate QR field. Generate QR can be either true or false.Hint : generate_qr (boolean) |
Invalid value entered for Generate PSP URI flag | error_invalid_generate_psp_uri_value | Invalid value entered for Generate PSP URI field. Generate PSP URI can be either true or false. Hint : generate_psp_uri (boolean) |
Both generate_qr and generate_psp_uri are passed as 'true' | error_output_type_conflict | Only one of generate_psp_uri or generate_qr can be true for request |
Provider API throws an error | error_provider_error | We faced an unexpected error when logging the request with the service provider. Please try again. |