Give partial refund

This method is used to return part of deposited funds to a shopper.

Request example

POST /v1/{{API_KEY}}/transactions/{{id}}/refund/10
Content-Type: application/json
Host: api-sandbox.bridgerpay.com
Authorization: Bearer {{ACCESS_TOKEN}}

post
Refund

<URL>/v1/{{API_KEY}}/transactions/{{id}}/refund/{{amount}}
This method is used to initiate a partial refund for a shopper.
Request
Response
Request
Path Parameters
API_KEY
required
string
Software-level credentials that identify a merchant and ensure secure access to sensitive information; provided by BridgerPay
id
required
string
Transaction ID within the BridgerPay system
amount
required
string
Amount to be refunded
Headers
Content-Type
required
string
Data format to present information in the response; only "application/json" is supported
Host
optional
string
Web domain host
Authorization
required
string
Authorization mechanism: Bearer {{ACCESS_TOKEN}}
Response
200: OK
Successful response
{
"response": {
"status": "OK", //Response status
"code": 200, //Response code
"message": "200" //Comment associated with the response code
},
"result": {
"refund_transaction_id": "8ac7a...60f", //Refund transaction ID within the BridgerPay system
"amount": 10.0, //Transaction amount
"processing_date": "2020-08-06T08:41:47.3921711Z",//Date and time when the transaction was processed by BridgerPay
"decline_code": "", //Declination reason code
"decline_reason": "", //Reason of why the transaction was declined
"status": "approved", //Transaction status
"currency": "EUR", //Transaction currency
"created_by": "[email protected]" //User on the merchant's side who initiated the transaction (identified by the email address used as a login name)
}
}
400: Bad Request
1) Attempt to refund a not-captured or non-refundable payment or a payment that has already been fully refunded 2) Attempt to refund more than available
{
"response": {
"status": "BadRequest",
"code": 400,
"message": "Amount '10' is higher than the available amount for refund '3.0'"
},
"result": null
}
401: Unauthorized
1) Attempt to access the resource without authorization (empty response) 2) No API_KEY or invalid API_KEY provided to access the resource
{
"response": {
"code": 401,
"message": "merchant api key '<API_KEY>' is invalid"
}
}
415: Unsupported Media Type
Content-Type header parameter has not been provided, or the specified value is not supported by BridgerPay (empty response)