Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

User can refund any existing transaction after being settled. It can only be performed on transactions, which have been authorised and settled. Authenticate this request using HTTP Basic Auth by adding a bearer token to the header, e.g. Authentication: Bearer {{access_token}}. You can get the {{access_token}} from the create token request.



Refund Transactions

POST /pay/v1/transactions/{transaction_id}/refunds

Headers

Content-Type string
Content type.

Authorization string
Access token generated from create token request.

 

Attributes

partial_refund boolean

If the transaction is a partial refund, then it set to be true. Default value is false.

refund_amount float (optional)

Refund amount is required if it’s a partial refund. The amount must not be greater than the original received amount minus any already refunded amount.

reference string (optional)
Refund note (if any).

Request

POST https://secure.blinkpayment.co.uk/api/pay/v1/transactions/BL-2349AGB/refunds HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbG...

{
    "partial_refund": true,
    "refund_amount": 1.01,
    "reference": "refund note"
}

Response

HTTP/1.1 200 OK
Content-Type: application/json

{
    "success": true,
    "message": "Refunded successfully",
    "amount" : "1.01",
    "reference": "refund note",
    "transaction_id": "BL-2349AGB"
}
  • No labels