ELANLINK
  1. Acquiring
ELANLINK
  • Guides
    • Welcome
    • Interface
  • API Reference
    • Introduction
    • Endpoints
    • Data Types
    • Signing
    • 3-D Secure Verification
    • Subscription
    • Errors
    • Webhooks
    • Items Information
    • Changelog
    • Acquiring
      • Create a direct payment
        POST
      • Create a redirect (iFrame) payment
        POST
      • Capture a transaction
        POST
      • Review a transaction
        POST
      • Cancel a transaction
        POST
      • Cancel a subscription
        POST
      • Query a transaction
        POST
      • Refund a transaction
        POST
      • Search a refund transaction
        POST
      • Create a payout
        POST
      • Optimise payment methods
        POST
      • Update an order
        POST
  • Appendix
    • Test Cards
    • Bank Code
    • Country Code
    • Currency Code
    • Payment Methods
  1. Acquiring

Refund a transaction

POST
/v1/refund
Refund orders by batch up to 50 orders in a single request.
Merchant can also manually refund a transaction in Merchant Portal.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://test.your-api-server.com/v1/refund' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-raw '{
    "merchant_id": "{{merchant_id}}",
	"account_id": "{{account_id}}",
	"encryption_data": "e0570d4ba9730c85815363401fc6c0cd1501b3919c820a524529a40d0f1bfad7",
    "refund_orders":[
        {
            "transaction_id": "1379868618653958144",
		    "order_no": "1731469069933",
            "currency": "USD",
            "amount": "10.36",
            "refund_amount": "3.33",
            "refund_reason": "Interface Test"
        }
    ]
}'
Response Response Example
{
  "account_id": "701001010",
  "refund_orders": [
    {
      "amount": "10.36",
      "currency": "USD",
      "order_no": "1731469069933",
      "refund_amount": "3.33",
      "refund_message": "V0000:OK",
      "refund_reason": "Interface Test",
      "refund_reference": "",
      "refund_reference_id": "1379868618653958144-01",
      "refund_status": "1",
      "transaction_id": "1379868618653958144"
    }
  ],
  "return_message": "OK",
  "return_status": "1",
  "encryption_data": "e0570d4ba9730c85815363401fc6c0cd1501b3919c820a524529a40d0f1bfad7",
  "merchant_id": "701001"
}

Request

Header Params
Content-Type
string 
required
Example:
application/x-www-form-urlencoded
Body Params application/json
merchant_id
string 
required
Merchant Code or Merchant ID or Merchant Number
<= 7 characters
Example:
701001
account_id
string 
required
Account ID or Gateway Number
<= 10 characters
Example:
701001010
encryption_data
string 
required
Digital signatures information
encryption_data=sha256(merchant_id + account_id + transaction_id1 + transaction_id2 ...+ sign_key);
All encryption parameters need to remove spaces before encryption.
<= 64 characters
Example:
a290ea1fd6c69d69d578eb15921eb486e4b801c5b6a577df445aa8f6c592b66b
refund_orders
object 
required
List of refund orders Up to 50 orders in a single request
transaction_id
string 
required
Transaction ID generated by gateway system, the Transaction ID = Order No + '-' + 5 digits random number
<= 50 characters
Example:
1667308950627942400
order_no
string 
required
Merchant Order Number
<= 50 characters
Example:
1591067778165
currency
string 
required
Refund currency
<= 3 characters
Example:
GBP
amount
string 
required
Full order amount
<= 15 characters
Example:
100.00
refund_amount
string 
required
Refund amount
<= 15 characters
Example:
50.00
refund_reason
string 
required
Reason of refund
<= 50 characters
Example:
No stock
refund_reference
string 
optional
Merchant refund reference Refund reference defined by merchant
<= 50 characters
Example:
PI-1252-234-1111
Examples

Responses

🟢200Success
application/json
Body
account_id
string 
required
refund_orders
array [object {10}] 
required
amount
string 
optional
currency
string 
optional
order_no
string 
optional
refund_amount
string 
optional
refund_message
string 
optional
refund_reason
string 
optional
refund_reference
string 
optional
refund_reference_id
string 
optional
refund_status
string 
optional
transaction_id
string 
optional
return_message
string 
required
return_status
string 
required
encryption_data
string 
required
merchant_id
string 
required
Previous
Query a transaction
Next
Search a refund transaction