Issue a refund against a purchase or standalone

post/refunds

Request

  • Base URL
    https://gateway.pmnts-sandbox.io/v1.0
  • URL
    https://gateway.pmnts-sandbox.io/v1.0/refunds
  • Auth
    HTTP basic

Request body

amountinteger required

A positive integer representing how much to refund, in the smallest currency unit (e.g. 100 to charge $1.00, or 100 to Charge ¥100, a zero decimal currency).

referencestring required

Merchant's reference for the refund. Must be unique per refund. Max length 255 characters.

transaction_idstring

ID of the original transaction to be refunded (XXX-P-YYYYYY). Required for an associated refund.

card_tokenstring

Token of the card being refunded. Required unless transaction_id or card details are provided.

card_numberstring

Number of the card being refunded. Required unless transaction_id or card_token are provided.

card_expirystring

Expiry of the card being refunded. Required unless transaction_id or card_token are provided.

card_holderstring

Name on the card being refunded. Required unless transaction_id or card_token are provided.

descriptionstring

Description for the refund.

currencystring

Currency being refunded. Ignored if transaction_id is present.

descriptorstring

Deprecated — use extra.descriptor instead. Description that appears on the customer's statement.

metadataobject

Metadata for the refund.

Response

200

successfulboolean
testboolean

Example response

{
  "successful": true,
  "response": {
    "authorization": "1536806650",
    "id": "071-R-6RQJEWXV",
    "amount": 50,
    "refunded": "Approved",
    "message": "Approved",
    "card_holder": "Jim Smith",
    "card_number": "512345XXXXXX2346",
    "card_expiry": "2023-05-31",
    "card_type": "MasterCard",
    "transaction_id": "071-R-6RQJEWXV",
    "reference": "ed67e06731a2f98e8f5b3f5bc8540b80",
    "currency": "USD",
    "successful": true,
    "transaction_date": "2018-09-13T12:44:10+10:00",
    "response_code": "00",
    "settlement_date": "2018-09-14",
    "rrn": "071R6RQJEWXV"
  },
  "test": true
}

Changes