Skip to main content
POST
/
api
/
v2
/
refund
/
{transactionId}
Refund
curl --request POST \
  --url https://gateway.paybyrd.com/api/v2/refund/{transactionId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "isoAmount": 100
}
'
{
  "isoAmount": 100,
  "amount": "1.00",
  "code": "BYRD200",
  "description": "Operation successfully completed",
  "sourceTransaction": {
    "amount": "3.00",
    "isoAmount": 300,
    "refundedAmount": "1.00",
    "isoRefundedAmount": 100,
    "remainingAmount": "2.00",
    "isoRemainingAmount": 200,
    "transactionId": "c16ce479-319d-4e7b-a966-7735c34b2cc5"
  },
  "transactionId": "fa1db27d-7869-403f-b9cf-4306bf0162d8"
}

Authorizations

x-api-key
string
header
required

Path Parameters

transactionId
string
required

The transaction identification to be refunded

Body

application/json
isoAmount
integer<int64>
required

The amount in ISO format, with the following pattern "2500"

amount
string
required
deprecated

Please use the 'isoAmount' field. This is essential due to our multi-currency support.

Response

200

amount
string

The value that has been refunded.

Example:

"1.00"

isoAmount
integer<int64>

The value that has been refunded.

Example:

100

code
enum<string>

Represents the Paybyrd code of the web request. To see more details check in Return Codes [blocked] page.

Available options:
BYRD010,
BYRD200,
BYRD201,
BYRD203,
BYRD205,
BYRD206,
BYRD207,
BYRD208,
BYRD230,
BYRD231,
BYRD240,
BYRD290,
BYRD291,
BYRD292,
BYRD294,
BYRD299,
BYRD401,
BYRD403,
BYRD900,
BYRD901,
BYRD999
Example:

"BYRD200"

description
enum<string>

Represents a textually the description of the Paybyrd code of the web request. To see more details check in Return Codes [blocked] page

Available options:
Request accepted,
Operation successfully completed,
Payment being processed. Waiting for shopper,
An error occurred while processing the payment. Please query the transaction to confirm its status,
Operation rejected,
Operation blocked by velocity,
Pending redirect,
Payment canceled by the shopper,
Payment already refunded,
The refund amount exceeds the remaining balance of the original payment,
Token is expired,
An error occurred while pre processing the transaction. Please review your request and try again,
An error occurred during while preparing transaction for acquiring. Please review your request and try again,
No payment methods available for this operation. Please contact Paybyrd's support,
Transaction could not be updated. Please review your request and try again,
Operation could not be completed. Please review your request and try again,
Resource access is forbidden,
Resource access unauthorized,
Invalid input,
Resource not found,
Operation failed
Example:

"Operation successfully completed"

sourceTransaction
object
transactionId
string

The unique identifier that represents the new transaction that is created by the refund.

Example:

"fa1db27d-7869-403f-b9cf-4306bf0162d8"