---
title: "Create an authorization"
method: POST
path: "/purchases/ ​​​​​"
---

# Create an authorization

`POST /purchases/ ​​​​​`

## Request

- Base URL: `https://gateway.pmnts-sandbox.io/v1.0`
- URL: `https://gateway.pmnts-sandbox.io/v1.0/purchases/ ​​​​​`
- Auth: HTTP basic

## Headers

- `Content-Type` string

## Request body

- object
  - `amount` integer, required: Amount of the purchase in cent. Required on create
  - `reference` string, required: Reference of the transaction, required on create. Max length 255 characters.
  - `customer_ip` string, required: RFC791 or RFC8200 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_number` string: Required on create, unless you provide a `card_token` or a `wallet` object
  - `card_holder` string: Name of the card holder
  - `card_expiry` string: Format: `MM/YYYY` Required on create, unless you provide a `card_token` or a `wallet` object
  - `card_token` string: Required on create, unless you provide a `card_number` or a `wallet` object
  - `cvv` string: CVV card number. (3/4 characters)
  - `test` boolean: Indicates if this is a test transaction
  - `wallet` object
    - `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
  - `capture` boolean, required: Indicates if this purchase should be captured (true), or authorized only (false)
  - `final` boolean: 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`

200

- union
  - 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
  - object
    - `successful` boolean
    - `response` object
      - `authorization` unknown
      - `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` unknown
      - `reference` string
      - `currency` string
      - `transaction_id` string
      - `settlement_date` unknown
      - `transaction_date` unknown
      - `response_code` string
      - `captured` boolean
      - `captured_amount` unknown
      - `rrn` unknown
      - `cvv_match` string
      - `metadata` object
      - `addendum_data` unknown
    - `errors` string[]

---

[API](https://skmtc.dev/fatzebra/apis/gateway.md) - [All operations](https://skmtc.dev/fatzebra/apis/gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/fatzebra/apis/gateway/revisions/a62ddbae3800?raw)
