This API allows the platform to create a Static QR flow using Decentro's UPI stack.
🙌 Important Note
Please use only Staging Credentials on each API Reference page to test the APIs directly from our Documentation.
Overview
This API lets a platform collect funds using Decentro's Static QR and Push to UPI ID capability on its v3 stack.
Flow
Below is the flow for using the Offline Static QR flow through Decentro.
- The platform creates a Offline Static QR API by passing the consumer_urn shared by Decentro before going live.
- The API will be enabled using the credentials provided by the Decentro team once the merchant goes live.
- Amount, VPA, and company logo are optional parameters that seamlessly integrate into Decentro's generated QR template.
- Company Logo: Provided by the merchant during onboarding for branding. The required size configuration is 500x500 pixels.
- Static QR Code: Generated via the API based on the merchant's business use case.
- Unique VPA: Issued by Decentro upon successful merchant onboarding.
- Decentro triggers the Terminal Transaction Status Callback/Webhookto the client's pre-configured endpoint with the transaction status.
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/static/upi/qr |
| Production | https://api.decentro.tech/v3/payments/static/upi/qr |
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, reconcilation, 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 as mentioned here |
| data | A list containing the specific details of the generated QR code. |
| vpa | The Virtual Payment Address (UPI ID) linked to the generated QR code. |
| template_url | The URL or pdf file which contains the customized QR code Logo image . |
| intent_url | The standard UPI intent deep-link URI used to initiate payment across supported UPI apps. |
Response Keys
Below are the response keys propagated by Decentro in the response_key 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 status of the transaction is relayed only after the payer authorizes payment.
| Response Key | Message |
|---|---|
| success_static_qr_created | Static QR created Successfully. |
| error_invalid_consumer_urn | Consumer URN does not exist. Please retry with a valid consumer_urn. |
| error_empty_consumer_urn | Consumer URN cannot be empty. Hint: consumer_urn (string). |
| error_invalid_format_consumer_urn | Consumer URN is not of type string. Hint: consumer_urn (string). |
| error_invalid_amount | Please pass the amount value with up to two decimals places only. Hint: amount (float). |
| error_invalid_format_amount | Amount is not of type int or float. Hint: amount (INT, float). |
| error_incorrect_range_amount | Amount needs to be between INR and . |
| error_merchant_onboarding | Unable to create the static QR : Please reach out to [email protected] |
| error_merchant_onboarding | Configuration is missing for this specific consumer and merchant. |
| error_invalid_vpa | VPA does not exist. Please retry with a valid VPA ID. |
| error_invalid_format_vpa | VPA address is not of type string. Hint: consumer_urn (string). |
