Issue Refund

This API is under development. Details will be added once the APIs are signed off in staging/QA.

Overview

This API can be used by the platform to refund a transaction back to the source i,e the VPA from which payer undertook a transaction.

This can be processed for any transaction undertaken through the below modes.

Flow

Below is the flow for initiating the refunds through Decentro's stack.

  • The platform consumes this API to refund a successful transaction using the Decentro transaction ID received from Generate payment link API, Generate Dynamic QR, or Issue collect request by passing the value under originaldecentro txn_id parameter.
  • The platform can choose to refund the complete transaction or part of it by passing the requisite value under the amount parameter.
  • Decentro checks the platform's available balance and initiates the refund to the source VPA (payer VPA) if the transaction is found.
  • Decentro rejects the request for a refund if the transaction is not found at its end due to an invalid value passed in the "original_decentro_transaction_id" parameter.

API Endpoints

Below are the API endpoints to be used by the platform basis the environments.

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 KeyMessage
success_refund_status_pendingTransaction refund request processed successfully
success_refund_status_failedTransaction refund request processed successfully
success_refund_status_successTransaction refund request processed successfully
error_invalid_reference_idReference URL is not of type string
error_duplicate_reference_idDuplicate Request Reference ID
error_malformed_requestMalformed request detected.
error_unsanitized_valuesUnsanitized values detected for key(s): purpose_message. Kindly sanitize the corresponding values by removing special characters such as . @ # $ % ^ & * ! ; : ' " ~ ` ? = + ) ( and retry.
error_invalid_purpose_message_lengthPurpose message needs to be between 5 and 50 characters
error_invalid_purpose_messagePurpose Message is not of type string. Hint : purpose_message (string)
error_missing_reference_idRequest reference id cannot be null or empty. Hint: reference_id (string)
error_missing_purpose_messagePurpose Message cannot be null or empty. Hint : purpose_message (string)
error_invalid_credentialsInvalid authentication credentials
error_missing_credentialsNo API key found in request
error_invalid_client_credentialsAuthentication failed. Please use valid Client ID and Client Secret.
error_empty_client_secretClient Secret cannot be empty. Hint: client_secret (string)
error_company/account_disabledUPI Credit transactions are disabled for the company/account.
error_no_transaction_foundNo such transaction found at our end. Please check the values and retry
error_no_transaction_identifier_foundAny one value should be present out of transaction_id, original_reference_id and bank_reference_number.Please check the documentation and provide values accordingly.
error_provider_errorUnexpected response received from underlying provider
error_refund_attempt_not_identifiedMultiple successful attempts detected for this payment. Please pass the original_attempt_decentro_txn_id for refunding the attempt.
Language
Click Try It! to start a request and see the response here!