v1

latestOpenAPI 3.1.02026-07-2414085.2 KB

Create an authorization

post/purchases/ ​​​​​

Headers

Content-Typestring

application/json

Request body

amountinteger required

Amount of the purchase in cent. Required on create

referencestring required

Reference of the transaction, required on create. Max length 255 characters.

customer_ipstring required

RFC791-compliant IP address

currencystring required

Three letter ISO currency code, in UPPERCASE

card_numberstring

Required on create, unless you provide a card_token or a wallet object

card_holderstring

Name of the card holder

card_expirystring

Format: MM/YYYY Required on create, unless you provide a card_token or a wallet object

card_tokenstring

Required on create, unless you provide a card_number or a wallet object

cvvstring

CVV card number. (3/4 characters)

testboolean

Indicates if this is a test transaction

metadataobject
addendum_datastring
captureboolean required

Indicates if this purchase should be captured (true), or authorized only (false)

finalboolean

Indicates if the amount presented for the authorization is the final amount, or may be topped up or cancelled. Note: final authorizations cannot be cancelled, they will either be captured like a normal authorization, or will need to expire naturally.

Response

200

OR

Example response

{
  "successful": true,
  "response": {
    "authorization": "283293",
    "id": "071-P-18DBFFCO",
    "card_number": "512345XXXXXX2346",
    "card_holder": "Jim Smith",
    "card_expiry": "2023-05-01",
    "card_token": "fke86c5u",
    "card_type": "MasterCard",
    "card_category": "Credit",
    "card_subcategory": "Standard",
    "amount": 1000,
    "decimal_amount": 10,
    "successful": true,
    "message": "Approved",
    "reference": "c10de1d9590fca1d893380c6e039ae71",
    "currency": "AUD",
    "transaction_id": "071-P-18DBFFCO",
    "settlement_date": "2017-06-21",
    "transaction_date": "2017-06-21T15:02:46+10:00",
    "response_code": "00",
    "rrn": "071P18DBFFCO",
    "cvv_match": "M"
  }
}