Give full refund

This method is used to return funds to a shopper.

Request example

POST /v1/{{API_KEY}}/transactions/{{id}}/refund
Content-Type: application/json
Host: {{API_URL}}
Authorization: Bearer {{ACCESS_TOKEN}}

post
Refund

<URL>/v1/{{API_KEY}}/transactions/{{id}}/refund
This method is used to initiate a full refund for a shopper or a refund of what is available after partial refunds.
Request
Response
Request
Path Parameters
API_KEY
required
string
Software-level credentials that identify a merchant and ensure access to sensitive information; provided by BridgerPay
id
required
string
Transaction ID within the BridgerPay system
Headers
Content-Type
required
string
Data format to present information in the response; only "application/json" is supported
Host
optional
string
Web domain identifier
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...405", //Refund transaction ID within the BridgerPay system
"amount": 10.0, //Transaction amount
"processing_date": "2020-08-06T07:39:22.6470842Z",//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
Attempt to refund a not-captured or non-refundable payment or a payment that has already been refunded
{
"response": {
"status": "BadRequest",
"code": 400,
"message": "transaction: '<id>' is not allowed to refund, check the mid for 'AllowRefunds' to be true"
},
"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)