v1

latestOpenAPI 3.0.02026-07-2431146358.7 KB
Refund

Create Refund

A refund can be initiated for a transaction using the Create Refund API.

Multiple refund requests can be initiated against the same transactionid such that the sum of the refund amounts do not exceed the transaction amount.

post/payments/ve1_2/refunds/create

Headers

BD-Traceidstring required
Example:20201203182838

BD-TraceID is a unique identifier passed by the merchant to ensure request idempotency. Requests with identical BD-TraceID within a 24 hour window would fail.

BD-Timestampstring required
Example:20201203182838

Request timestamp to identify date and time of origin of request. Example, a value of BD-Timestamp 20210113180403 identifies the request to have originated on 13th January 2021 at 06:04:03 PM.

Content-Typestring required
Example:application/json

Request Content-Type to take the values application/jose

Acceptstring required
Example:application/jose

Accept Response Content-Type to take the values application/jose

Request body

transactionidstring required

Unique transactionid created by BillDesk

orderidstring required

Unique ID generated by the merchant for each request

mercidstring required

Unique identifier as defined by BillDesk for each merchant

transaction_datestring date-time required

BillDesk transaction date and time in YYYY-MM-DDThh:mm:ssTZD format

txn_amountstring required

Original transaction amount in two decimals

refund_amountstring required

Refund amount in two decimals

currencystring required

ISO currency of the transaction amount, for INR this value will be 356

merc_refund_ref_nostring required

Unique reference number created by the merchant for the refund request

Example request

{
  "transactionid": "U4560001099939",
  "orderid": "TEST0000009005",
  "mercid": "BDMERCID",
  "transaction_date": "2023-03-14T15:14:39+05:30",
  "txn_amount": "2400.00",
  "refund_amount": "1100.00",
  "merc_refund_ref_no": "REFTS14RTEST001",
  "split_payment": {
    "mercid": "BDMERCID",
    "txn_amount": "299.28",
    "refund_amount": "299.28"
  }
}

Response

OK

objectid'transaction' | 'authentication' | 'mandate' | 'invoice' | 'cardaccount' | 'validatevpa' | 'dispute' | 'settlement' | 'altid' | 'mandate_token' | 'accountvalidation'

String representing the object's type. Objects of the same type share the same value.

refundidstring

Unique refundid created by BillDesk for each refund request

transactionidstring

Unique transactionid created by BillDesk

orderidstring

Unique ID generated by the merchant for each request

mercidstring

Unique identifier as defined by BillDesk for each merchant

transaction_datestring date-time

BillDesk transaction date and time in YYYY-MM-DDThh:mm:ssTZD format

txn_amountstring

Original transaction amount in two decimals

refund_amountstring

Refund amount in two decimals

currencystring

ISO currency of the transaction amount, for INR this value will be 356

refund_datestring date-time

BillDesk refund date and time in YYYY-MM-DDThh:mm:ssTZD format

merc_refund_ref_nostring

Unique reference number created by the merchant for the refund request

refund_status'0699' | '0799'

Represents the refund status with the following values: • 0799 – categorized as a refund, where the original transaction has been already settled • 0699 – categorized as a cancellation, where the original transaction has not been settled

Example response

{
  "refundid": "X45604776418751",
  "transactionid": "U4560001099939",
  "orderid": "TEST0000009005",
  "mercid": "BDMERCID",
  "transaction_date": "2023-03-14T15:14:39+05:30",
  "txn_amount": "2400.00",
  "refund_amount": "1100.00",
  "merc_refund_ref_no": "REFTS14RTEST001"
}