post https://staging.api.decentro.tech/v3/payments/transaction/action
This API is under development. Details will be added once the APIs are signed off in staging/QA.
Overview
This API will allow a platform to Release or Capture a payment attempt that is currently on "HOLD".
Flow
Below is the flow for using the Release/Capture API.
- The platform will trigger the Release/Capture API by passing any one of the following transaction identifiers in the request payload:
- original_attempt_transaction_id
- original_transaction_id
- original_reference_id
- If the action specified by the platform was 'CAPTURE', our system will update the status of the payment attempt as “SUCCESS“ and map the action as “CAPTURED“.
- The transaction amount will be settled with the platform in the next eligible settlement cycle
- If the action specified by the platform was 'RELEASE', our system will update the status of the payment attempt as “SUCCESS“ and map the action as RELEASED“
- The transaction amount will be refunded to the source account of the payer
- The Transaction Status Callback and Account Balance Callback will be sent after the action, specified by the platform, was successfully performed.
- In case of "RELEASED" transactions, the platform will receive an additional Transaction Status and Account Balance callback against the Refund transaction which was initiated by our system.
Key Points
- This API can only be used when 'Auto-Refund' configuration is disabled for the platform
- If multiple attempts are on HOLD, the API should will respond with an error.
- In such a scenario, please pass the "original_attempt_transaction_id" to help identify the correct payment attempt.
- This value will be shared via our Transaction Status Callback or can be fetched via the Get Transaction Status Advance API.
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/transaction/action |
Production | https://api.decentro.tech/v3/payments/transaction/action |
Response Parameters
Parameters | Description |
---|---|
decentro_txn_id | A unique transaction ID from Decentro for this action request |
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 mentioned here. |
data | The JSON object containing the details of the 'action' performed by the platform. |
decentro_txn_id | Value corresponding to the original_transaction_id. It is the Decentro Transaction ID received in the initiate collect request/ generate payment link/ generate QR API response. |
transaction_status | The Status of the Payment Request |
attempt_decentro_txn_id | Value corresponding to the original_attempt_transaction_id. It is the Attempt Decentro Transaction ID received in the Transaction Status Callback or GTS Advance response. |
action_status | Specifies if the action was successfully performed or not. |
action_status_description | Message associated with the action status. |
attempt_status | The updated payment attempt status. |
original_bank_reference_number | The unique transaction reference number from the bank partner mapped to payment attempt. |
Response Keys
Response Key | Message |
---|---|
success_transaction_release_success | Transaction released successfully |
success_transaction_release_pending | Transaction release is in pending. Please check after sometime |
success_transaction_release_failed | Transaction release is failed. Please re-initiate the release. |
success_transaction_capture_success | Transaction captured successfully |
error_transaction_not_on_hold | The specified transaction or transaction attempt is not on HOLD. |
error_transaction_capture_failed | Transaction capture is failed. Please re initiate the capture. |
error_invalid_consumer_urn_value | Invalid value entered for consumer_urn. |
error_invalid_reference_id | Reference URL is not of type string |
error_duplicate_reference_id | Duplicate Request Reference ID |
error_malformed_request | Malformed request detected. |
error_unsanitized_values | Unsanitized values detected for key(s): purpose_message. Kindly sanitize the corresponding values by removing special characters such as . @ # $ % ^ & * ! ; : ' " ~ ` ? = + ) ( and retry. |
error_missing_reference_id | Request reference id cannot be null or empty. Hint: reference_id (string) |
error_missing_consumer_urn | consumer_urn cannot be null or empty. |
error_missing_action_value | Either release or capture has to be passed. |
error_invalid_credentials | Invalid authentication credentials |
error_missing_credentials | No API key found in request |
error_invalid_client_credentials | Authentication failed. Please use valid Client ID and Client Secret. |
error_empty_client_secret | Client Secret cannot be empty. Hint: client_secret (string) |
error_company/account_disabled | UPI Credit transactions are disabled for the company/account. |
Responses