Refunds

Refunding a Purchase

In order to refund a purchase the following details are required:

Definition

Authentication: Basic xxxxxxxxxxxxx
POST /v1.0/refunds HTTP/1.1

Example Request

  $ curl https://gateway.sandbox.fatzebra.com.au/v1.0/refunds -u TEST:TEST -d" \
  { \
    \"transaction_id\": \"55355\", \
    \"amount\": 349, \
    \"reference\": \"ORD22547095\" \
  }"

Responses

Successful — HTTP 200
{
  "successful": true,
  "response": {
    "authorization": "1392269829",
    "id": "001-R-D76NCBN8",
    "amount": -100,
    "refunded": "Approved",
    "message": "Approved",
    "card_holder": "James Smith",
    "card_number": "512345XXXXXX2346",
    "card_expiry": "2023-10-31",
    "card_type": "MasterCard",
    "successful": true,
    "transaction_date": "2014-02-13T16:37:08+11:00",
    "response_code": "00"
  },
  "errors": [

  ],
  "test": true
}
Failed (bad data) — HTTP 400
{
  "successful": false,
  "response": {
    "authorization": null,
    "id": null,
    "amount": null,
    "refunded": null,
    "message": null,
    "card_holder": "Harrold Smith",
    "card_number": "XXXXXXXXXXXX4444",
    "card_expiry": "2023-05-31",
    "card_type": "MasterCard",
    "successful": false
  },
  "errors": [
    "Reference can't be blank"
  ],
  "test": true
}

Retrieve a Refund

Definition

Authentication: Basic xxxxxxxxxxxxx
GET /v1.0/refunds/{REFUND_ID} HTTP/1.1

Example Request

$ curl https://gateway.sandbox.fatzebra.com.au/v1.0/refunds/001-R-ZX8J9K -u TEST:TEST

Responses

Successful — HTTP 200
{
    "successful": true,
    "response":     {
      "authorization": "1392269829",
      "id": "001-R-ZX8J9K",
      "amount": -100,
      "refunded": "Approved",
      "message": "Approved",
      "card_holder": "James Smith",
      "card_number": "512345XXXXXX2346",
      "card_expiry": "2023-10-31",
      "card_type": "MasterCard",
      "successful": true,
      "transaction_date": "2014-02-13T16:37:08+11:00",
      "response_code": "00"
    },
    "test": true
    "errors": []
}
Failed (Not Found) — HTTP 404
{
    "successful": false,
    "response": null,
    "test": true
    "errors": ["Purchase not found"]
}