v1

latestOpenAPI 3.1.02026-07-2414085.2 KB

Create a purchase with a token

post/purchases/ ​​​

Headers

Content-Typestring

application/json

Request body

amountinteger required

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

referencestring required

Reference of the transaction. Max length 255 characters.

customer_ipstring required

RFC791-compliant IP address

currencystring required

Three letter ISO currency code, in UPPERCASE

card_tokenstring required

Card token

testboolean

Indicates if this is a test transaction

metadataobject
addendum_datastring

Response

200

successfulboolean
testboolean

Example response

{
  "successful": true,
  "response": {
    "authorization": "468422",
    "id": "071-P-97AG1LA1",
    "card_number": "424242XXXXXX4242",
    "card_holder": "Client Name",
    "card_expiry": "2022-12-31",
    "card_token": "syupxv5b1tqv4bqdsazr",
    "card_type": "VISA",
    "card_category": "Credit",
    "card_subcategory": "Credit",
    "amount": 1000,
    "decimal_amount": 10,
    "successful": true,
    "message": "Approved",
    "reference": "oiuwiouwxmnx23",
    "currency": "USD",
    "transaction_id": "071-P-97AG1LA1",
    "settlement_date": "2018-11-22",
    "transaction_date": "2018-11-22T14:10:44+11:00",
    "response_code": "00",
    "captured": true,
    "captured_amount": 1000,
    "rrn": "071P97AG1LA1",
    "cvv_match": "M"
  },
  "test": true
}