v1

latestOpenAPI 3.1.02026-07-1342112262.5 KB
Payments

Fetch a payment

Fetch a payment

Required scope: business/orders:read

get/v1/payments/{payment_id}

Path parameters

payment_idstring required

The unique identifier of the payment.

The unique identifier of the payment.

Response

Successful Response

idstring required

The unique identifier of the payment.

client_transaction_idstring nullable required

The identifier provided when creating the transaction via the SDK.

display_namestring required

A human-friendly label for the payment.

receipt_numberstring required

The receipt number of the payment.

order_idstring nullable required

A reference to the original order.

staff_idstring nullable

The unique identifier of the staff member who took the payment. Matches the id returned by the Staff API. null when no staff member is associated with the payment.

created_atstring date-time required

The payment creation date and time in ISO 8601 format.

updated_atstring date-time nullable required

The date and time the payment was last modified in ISO 8601 format.

currencystring required

The currency code in ISO 4217 format.

notestring nullable required

An optional note attached to the payment.

status'approved' | 'cancelled' | 'failed' | 'pending' required
payment_method'card' | 'cash' | 'instant_eft' | 'gift_voucher' | 'other' required
payment_source'card_machine' | 'checkout' | 'invoice' | 'other' | 'payment_link' | 'shopify' | 'wix' | 'woocommerce' required
checkout_idstring nullable required

The checkout ID for online payments. Only present for payments from online checkouts.

external_idstring nullable

The customer-defined identifier provided when creating the checkout. Only present for payments from online checkouts when an external ID has been specified.

card_machine_idstring nullable

The unique identifier of the card machine that processed the payment. Only present for payments taken on a card machine.

Example response

{
  "amount_excl_tip": {
    "amount": 25000,
    "currency": "ZAR"
  },
  "card_machine_id": "1743683416648-616bc018-c572-430b-9c07-4e813ed03eb4",
  "checkout_id": "ch_J2xYWl4m7B6DsKAPCM9SRDEd",
  "client_transaction_id": "5f29b4cf-5650-4c71-b7e5-f70eb892e55f",
  "created_at": "2024-11-19T15:27:02+00:00",
  "currency": "ZAR",
  "display_name": "Payment receipt #491352",
  "external_id": "order-123",
  "id": "1732194482873-c777dc85-035e-40de-9820-765fde5ded7b",
  "note": "This is a note on this payment.",
  "order_id": "1585232943682-9f7e2dbe-a09e-4fa8-aa4a-72290c513f1d",
  "payment_method": "card",
  "payment_source": "payment_link",
  "receipt_number": "491352",
  "refunded_amount": {
    "amount": 0,
    "currency": "ZAR"
  },
  "refunds": [
    {
      "client_transaction_id": "rfd_765fde5ded7bxd",
      "created_at": "2024-11-19T15:27:02+00:00",
      "currency": "ZAR",
      "display_name": "Refund receipt #491352",
      "id": "1732188199292-2a8752ab-db45-4507-9d85-fcc6049beef3",
      "note": "This is a note on this refund.",
      "order_id": "1585232943682-9f7e2dbe-a09e-4fa8-aa4a-72290c513f1d",
      "original_order_id": "1585232943682-9f7e2dbe-a09e-4fa8-aa4a-72290c513f1d",
      "original_order_number": "10542623",
      "payment_id": "1732194482873-c777dc85-035e-40de-9820-765fde5ded7b",
      "payment_method": "card",
      "processed_at": "2024-11-20T16:27:23+00:00",
      "processing_fees": [
        {
          "amount": {
            "amount": 27800,
            "currency": "ZAR"
          },
          "type": "initial"
        }
      ],
      "receipt_number": "491352",
      "refund_type": "auth_reversal",
      "refunded_processing_fees": [
        {
          "amount": {
            "amount": 27800,
            "currency": "ZAR"
          },
          "type": "initial"
        }
      ],
      "staff_id": "1739522553-a7769044-ff8c-410d-b660-84e6727c70b9",
      "status": "approved",
      "total_amount": {
        "amount": 4500,
        "currency": "ZAR"
      },
      "updated_at": "2024-11-19T16:27:23+00:00"
    }
  ],
  "staff_id": "1739522553-a7769044-ff8c-410d-b660-84e6727c70b9",
  "status": "approved",
  "tip_amount": {
    "amount": 2500,
    "currency": "ZAR"
  },
  "total_amount": {
    "amount": 27500,
    "currency": "ZAR"
  },
  "updated_at": "2024-11-19T16:27:23+00:00"
}