---
title: "Create a purchase using a wallet"
method: POST
path: "/purchases/"
---

# Create a purchase using a wallet

`POST /purchases/`

## Headers

- `Content-Type` string

## Request body

- object
  - `amount` integer, 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)
  - `reference` string, required — Reference of the transaction. Max length 255 characters.
  - `customer_ip` string, required — RFC791-compliant IP address
  - `currency` string, required — Three letter [ISO currency code](https://pmnts.readme.io/v1.0/docs/iso-currency-codes-1), in UPPERCASE
  - `card_holder` string, required — Name of the card holder
  - `cvv` string — CVV card number. (3/4 characters)
  - `test` boolean — Indicates if this is a test transaction
  - `wallet` object — Wallet credentials. Described below
    - `type` string, required — Name of the wallet ('ApplePay', 'GooglePay')
    - `encPaymentData` string — required for type: VISA
    - `encKey` string — required for type: VISA
    - `callid` string — required for type: VISA
    - `token` string — required for type: APPLE, GOOGLE
    - `user_id` string — required for type: MASTERPASSEXPRESS
    - `origin_url` string — required for type: MASTERPASSEXPRESS
    - `card_id` string — required for type: MASTERPASSEXPRESS
    - `address_id` string — required for type: MASTERPASSEXPRESS
    - `checkout_resource_url` string — required for type: MASTERPASS
    - `oauth_token` string — required for type: MASTERPASS
    - `oauth_verifier` string — required for type: MASTERPASS
    - `checkout_id` string — required for type: ZIP_MONEY
    - `account_id` string — required for type: ZIP_MONEY
  - `metadata` object
  - `addendum_data` string
  - `extra` object
    - `ecm` string — Specifies the transaction source and type for processing. This value is two digits, the first indicating the source (1 = Mail Order, 2 = Telephone Order, 3 = Internet) and the second indicating the payment type (1 = Single, 2 = Recurring, 3 = Instalment - not commonly supported)
    - `sli` string — The Security Level Indicator for 3DS transactions (from the MPI)
    - `xid` string — The transaction ID (XID) value of a 3D Secure authenticated transaction (from the MPI)
    - `cavv` string — The card holder authentication verification value for a 3D Secure authenticated transaction (from the MPI)
    - `par` string — The Payer Request result for a 3D Secure transaction (from the MPI)
    - `ver` string — The Verification Request result for a 3D Secure transaction (from the MPI)
    - `threeds_version` string — This presents the 3D Secure version used for this transaction. Examples are: '1.0.0', '2.0.0' etc. (from the MPI)
    - `directory_server_txn_id` string — This is the unique identifier for a 3D Secure version 2 transaction. (from the MPI)
    - `card_on_file` boolean — Indicate if this is a card on file transaction or not. Merchant initiated transactions (eg. recurring or any transaction with auth_reason) will automatically be considered as card on file transaction.
    - `auth_reason` string — Indicate what type of merchant initiated transaction it is. Valid values are: 'cardholder_initiated', 'resubmission', 'delayed_charges', 'reauthorization', 'no_show', 'account_topup', 'unscheduled'. For recurring and installment, please use extra.ecm instead. For incremental auth, please check 'Update an authorization'.
    - `stored_credential_indicator` string — For card on file transaction, indicate if it is the initial transaction to put card on file (tokenize card), or the subsequent transactions to use card that is on file already. Possible values are, "I" for initial and "S" for subsequent.
    - `authorization_tracking_id` string — This is required for all subsequent recurring or instalment transactions. This value can be found from the response from the previous / first recurring / instalment transaction. If not provided for wallet transactions, they will be rejected. Note that not all schemes (namely China UnionPay) return this value, in that case this value is not needed.

## Response `200`

200

- object
  - `successful` boolean
  - `response` object
    - `authorization` string
    - `id` string
    - `card_number` string
    - `card_holder` string
    - `card_expiry` string
    - `card_token` string
    - `card_type` string
    - `card_category` string
    - `card_subcategory` string
    - `amount` integer
    - `decimal_amount` integer
    - `successful` boolean
    - `message` string
    - `reference` string
    - `currency` string
    - `transaction_id` string
    - `settlement_date` string
    - `transaction_date` string
    - `response_code` string
    - `captured` boolean
    - `captured_amount` integer
    - `rrn` string
    - `cvv_match` string
    - `metadata` object
    - `addendum_data` object
  - `errors` unknown[]
    - unknown
  - `test` boolean

## Other responses

- `400` — 400

---

[API](https://skmtc.net/fatzebra/apis/gateway.md) · [All operations](https://skmtc.net/fatzebra/apis/gateway/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fatzebra/gateway/versions/6317ad424277/schema)
