openapi: 3.2.0 info: title: gateway Purchases API version: '1.0' servers: - url: https://gateway.pmnts-sandbox.io/v1.0 security: - sec0: [] tags: - name: Purchases paths: /purchases: post: summary: Create a purchase with fraud screening description: '' operationId: create-a-purchase-with-fraud-screening-1 parameters: - name: Content-Type in: header description: application/json schema: type: string requestBody: content: application/json: schema: type: object required: - amount - reference - customer_ip - currency - card_number - card_holder - card_expiry properties: amount: type: integer description: 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) format: int32 reference: type: string description: Reference of the transaction. Max length 255 characters. customer_ip: type: string description: RFC791-compliant IP address currency: type: string description: Three letter [ISO currency code](https://pmnts.readme.io/v1.0/docs/iso-currency-codes-1), in UPPERCASE default: AUD card_number: type: string description: Card number card_holder: type: string description: Name of the card holder card_expiry: type: string description: 'Format: `MM/YYYY`' card_token: type: string cvv: type: string description: CVV card number. (3/4 characters) metadata: type: object properties: {} addendum_data: type: string fraud: properties: device_id: type: string description: The fraud screening service device fingerprint ID. See the Device ID section below for further details device: type: object required: - uid properties: uid: type: string description: The device identifier such as IMEI in android or identifier for vendor in iOS. Maximum length is 128 characters. os_type: type: string description: 'The operating system running on the user''s device (relevant for native app only). For example: android, ios, etc' app_version: type: string description: 'The version of the merchant application which is running on the user''s device. Maximum length is 50 characters. For example: ''2.0.1''' brand: type: string description: 'The user''s device brand (relevant for native app only). For example: htc, apple, etc' model: type: string description: 'The model of the user''s device (relevant for native app only) Maximum length is 50 characters. For example: ''iPhone X'', ''Galaxy 3''.' customer: type: object description: Details about the customer required: - first_name - last_name - email - address_1 - city - state - post_code - country properties: first_name: type: string description: The customer's first name last_name: type: string description: The customer's last name email: type: string description: The customer's email address date_of_birth: type: string description: The customer's date of birth, if available format: date id: type: string description: The customer record ID in the merchant database, if available address_1: type: string description: The customer's primary address line address_2: type: string description: The customer's secondary address line (such as building name) city: type: string description: The customer's city state: type: string description: The customer's state post_code: type: string description: The customer's post code country: type: string description: The ISO 8166 alpha-3 country code for the customer existing_customer: type: boolean description: Indicates if this customer is already in the merchants records or not created_at: type: string description: The date/time that the customer record was created format: date home_phone: type: string description: The customer's primary phone number. This can be a mobile number, if a home phone number is not provided. Required field for Forter. shipping_address: type: object required: - first_name - last_name - email - home_phone - address_1 - city - state - post_code - country - shipping_method properties: first_name: type: string description: The shipping address first name last_name: type: string description: The shipping address last name email: type: string description: The shipping address email home_phone: type: string description: The shipping address phone number address_1: type: string description: The shipping address primary address line address_2: type: string description: The shipping address secondary address line (such as building name) city: type: string description: The shipping address city or suburb state: type: string description: The shipping address state post_code: type: string description: The shipping address post code country: type: string description: The ISO 3166 alpha-3 country code for the shipping address shipping_method: type: string description: 'One of the following shipping options: low_cost, same_day, overnight, express, international, pickup, other If none of these options apply choose the closest match.' recipients: type: array description: Recipients are only required if the recipient differs from the shipping address, or if the order is being multi-shipped items: properties: title: type: string description: The recipient title/salutation (e.g. Mr, Mrs, Dr) first_name: type: string description: The recipients first name last_name: type: string description: The recipients last name email: type: string description: The recipients email address address_1: type: string description: The recipients primary address line address_2: type: string description: The recipients secondary address line (such as building name) city: type: string description: The recipients city or suburb state: type: string description: The recipients state post_code: type: string description: The recipients post code country: type: string description: The recipients country code - ISO 3166 alpha-3 phone_number: type: string description: The recipients phone number required: - title - first_name - last_name - email - address_1 - city - state - post_code - country type: object items: type: array items: properties: product_code: type: string description: The product code (base level product code) sku: type: string description: The product SKU (the stock keeping unit code, for example size/color variants) description: type: string description: The description of the product. For longer descriptions (greater then 26 chars) truncate item specifics and add the truncated information to the gift_message field qty: type: integer description: The quantity of items ordered format: int32 cost: type: number description: The base-cost for the product format: double line_total: type: number description: The line total for the product (cost times quantity) format: double tracking_number: type: string description: The shipping tracking number for this item gift_message: type: string description: Addendum product description, or gift message part_number: type: string description: The manufacturers part number (if applicable) shipping_comments: type: string description: Any comments for shipping of the item required: - product_code - description - qty - cost - line_total type: object custom: properties: x: type: string description: Custom data for the fraud screening. This is usually agreed upon and configured with the fraud provider. Please discuss using these fields with Support should you require assistance. x may be numerical or a string. required: [] type: object website: type: string description: The URL for the website where the order is being placed. required: - device_id - device - customer - recipients - items - website type: object responses: '200': description: '200' content: application/json: examples: Fraud Declined: value: "{\n \"successful\": true,\n \"response\": {\n \"authorization\": \"0\",\n \"id\": \"071-P-RHN5DC15\",\n \"card_number\": \"512345XXXXXX2346\",\n \"card_holder\": \"Jim Smith\",\n \"card_expiry\": \"2023-05-31\",\n \"card_token\": \"pfjeiyx4fk0uko3ev4kd\",\n \"card_type\": \"MasterCard\",\n \"card_category\": \"Credit\",\n \"card_subcategory\": \"Standard\",\n \"amount\": 1000,\n \"decimal_amount\": 10.0,\n \"successful\": false,\n \"message\": \"Declined.\",\n \"reference\": \"Ud5CfaAlwTKJi2kfsAesdAwvIk2fpJjP\",\n \"currency\": \"USD\",\n \"transaction_id\": \"071-P-RHN5DC15\",\n \"settlement_date\": null,\n \"transaction_date\": \"2018-10-09T14:01:06+11:00\",\n \"response_code\": \"01\",\n \"captured\": false,\n \"captured_amount\": null,\n \"rrn\": \"0\",\n \"cvv_match\": \"U\",\n \"metadata\": {},\n \"addendum_data\": {},\n \"fraud_result\": \"Deny\",\n \"fraud_messages\": [\n \"An attribute associated with an Order matched a pre-configured 'Always Deny' rule.\"\n ]\n },\n \"errors\": [],\n \"test\": true\n}" schema: type: object properties: successful: type: boolean example: true default: true response: type: object properties: authorization: type: string example: '0' id: type: string example: 071-P-RHN5DC15 card_number: type: string example: 512345XXXXXX2346 card_holder: type: string example: Jim Smith card_expiry: type: string example: '2023-05-31' card_token: type: string example: pfjeiyx4fk0uko3ev4kd card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 1000 default: 0 decimal_amount: type: integer example: 10 default: 0 successful: type: boolean example: false default: true message: type: string example: Declined. reference: type: string example: Ud5CfaAlwTKJi2kfsAesdAwvIk2fpJjP currency: type: string example: USD transaction_id: type: string example: 071-P-RHN5DC15 settlement_date: {} transaction_date: type: string example: '2018-10-09T14:01:06+11:00' response_code: type: string example: '01' captured: type: boolean example: false default: true captured_amount: {} rrn: type: string example: '0' cvv_match: type: string example: U metadata: type: object properties: {} addendum_data: type: object properties: {} fraud_result: type: string example: Deny fraud_messages: type: array items: type: string example: An attribute associated with an Order matched a pre-configured 'Always Deny' rule. errors: type: array test: type: boolean example: true default: true deprecated: false x-readme: code-samples: - language: curl code: "curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d' \n { \n \"card_holder\": \"Jim Smith\", \n \"card_number\": \"5123456789012346\", \n \"card_expiry\": \"05/2023\", \n \"cvv\": \"987\", \n \"amount\": 1000, \n \"reference\": \"fd792da68ea1b8a1ba791zzzfc6f73b4\", \n \"customer_ip\": \"111.222.111.123\", \n \"currency\": \"USD\", \n \"fraud\": { \n \"device_id\": \"04003h...truncated...y16eGlPDmAXrXEYZfU=\",\n \"device\": {\n \"uid\": \"625400941054585\",\n \"os_type\": \"android\",\n \"app_version\": \"2.1\",\n \"brand\": \"Samsung\",\n \"model\": \"Galaxy 3\"\n },\n \"customer\": { \n \"address_1\": \"23 Smith Road\", \n \"city\": \"Canberra\", \n \"country\": \"AUS\", \n \"created_at\": \"2014-05-28T21:38:51+11:00\", \n \"date_of_birth\": \"1994-05-28\", \n \"email\": \"deny@email.com\", \n \"existing_customer\": true, \n \"first_name\": \"James\", \n \"home_phone\": \"0421858999\", \n \"id\": \"ABD123\", \n \"last_name\": \"Smith\", \n \"post_code\": \"2600\" \n }, \n \"items\": [ \n { \n \"cost\": 23.3, \n \"description\": \"Widgets\", \n \"line_total\": 23.3, \n \"product_code\": \"9999-A\", \n \"qty\": 1, \n \"sku\": \"9999\" \n } \n ], \n \"recipients\": [\n {\n \"address_1\": \"1 Fairfield Road\",\n \"city\": \"Austin\",\n \"country\": \"USA\",\n \"email\": \"james@smith.com\",\n \"first_name\": \"James\",\n \"last_name\": \"Smith\",\n \"phone_number\": \"555-555-55555\",\n \"post_code\": \"55555-1234\",\n \"state\": \"TX\"\n }\n ],\n \"shipping_address\": {\n \"first_name\": \"James\",\n \"last_name\": \"Smith\",\n \"email\": \"deny@email.com\",\n \"home_phone\": \"0421858999\",\n \"address_1\": \"23 Smith Road\",\n \"city\": \"Canberra\",\n \"country\": \"AUS\",\n \"state\": \"NSW\",\n \"post_code\": \"2600\",\n \"shipping_method\": \"express\"\n }, \n \"custom\": { \n \"3\": \"Facebook\" \n }, \n \"website\": \"http://www.website.com\" \n } \n }'" - language: ruby code: "FatZebra::Purchase.create(\n amount: 1000,\n card_holder: 'Jim Smith',\n card_number: '5123456789012346',\n card_expiry: '05/2023',\n cvv: '987',\n reference: 'ORD98976',\n customer_ip: '111.222.111.123'\n)" samples-languages: - curl - ruby tags: - Purchases get: summary: List purchases description: '' operationId: list-purchases parameters: - name: offset in: query description: Offset to start schema: type: integer format: int32 default: 1 - name: limit in: query description: Number of purchases in the response schema: type: integer format: int32 default: 10 - name: from in: query description: Lower bound for the time at which the purchase was created schema: type: string format: date - name: to in: query description: Upper bound for the time at which the purchase was created schema: type: string format: date - name: Content-Type in: header description: application/json schema: type: string responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"successful\": true,\n \"response\": [\n {\n \"authorization\": \"512407\",\n \"id\": \"071-P-P7OX5AF6\",\n \"card_number\": \"512345XXXXXX2346\",\n \"card_holder\": \"Matthew Savage\",\n \"card_expiry\": \"2030-02-28\",\n \"card_token\": \"fke86c5u\",\n \"card_type\": \"MasterCard\",\n \"card_category\": \"Credit\",\n \"card_subcategory\": \"Standard\",\n \"amount\": 10000,\n \"decimal_amount\": 100.0,\n \"successful\": true,\n \"message\": \"Approved\",\n \"reference\": \"73a34343849d71bca9ab1a11225a3139-1\",\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-P-P7OX5AF6\",\n \"settlement_date\": \"2017-07-03\",\n \"transaction_date\": \"2017-07-03T12:39:02+10:00\",\n \"response_code\": \"00\",\n \"captured\": true,\n \"captured_amount\": 10000,\n \"rrn\": \"071PP7OX5AF6\",\n \"cvv_match\": \"M\",\n \"metadata\": {},\n \"addendum_data\": {}\n },\n {\n \"authorization\": \"138504\",\n \"id\": \"071-P-4AXUY9Q4\",\n \"card_number\": \"512345XXXXXX2346\",\n \"card_holder\": \"Matthew Savage\",\n \"card_expiry\": \"2030-02-28\",\n \"card_token\": \"fke86c5u\",\n \"card_type\": \"MasterCard\",\n \"card_category\": \"Credit\",\n \"card_subcategory\": \"Standard\",\n \"amount\": 10000,\n \"decimal_amount\": 100.0,\n \"successful\": true,\n \"message\": \"Approved\",\n \"reference\": \"bfe2f0f43e2f6811161ae7a009b3c840-0\",\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-P-4AXUY9Q4\",\n \"settlement_date\": \"2017-07-03\",\n \"transaction_date\": \"2017-07-03T12:39:01+10:00\",\n \"response_code\": \"00\",\n \"captured\": true,\n \"captured_amount\": 10000,\n \"rrn\": \"071P4AXUY9Q4\",\n \"cvv_match\": \"M\",\n \"metadata\": {},\n \"addendum_data\": {}\n }\n ],\n \"errors\": [],\n \"records\": 2,\n \"total_records\": 2,\n \"page\": 1,\n \"total_pages\": 1\n}\n" schema: type: object properties: successful: type: boolean example: true default: true response: type: array items: type: object properties: authorization: type: string example: '512407' id: type: string example: 071-P-P7OX5AF6 card_number: type: string example: 512345XXXXXX2346 card_holder: type: string example: Matthew Savage card_expiry: type: string example: '2030-02-28' card_token: type: string example: fke86c5u card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 10000 default: 0 decimal_amount: type: integer example: 100 default: 0 successful: type: boolean example: true default: true message: type: string example: Approved reference: type: string example: 73a34343849d71bca9ab1a11225a3139-1 currency: type: string example: AUD transaction_id: type: string example: 071-P-P7OX5AF6 settlement_date: type: string example: '2017-07-03' transaction_date: type: string example: '2017-07-03T12:39:02+10:00' response_code: type: string example: '00' captured: type: boolean example: true default: true captured_amount: type: integer example: 10000 default: 0 rrn: type: string example: 071PP7OX5AF6 cvv_match: type: string example: M metadata: type: object properties: {} addendum_data: type: object properties: {} errors: type: array records: type: integer example: 2 default: 0 total_records: type: integer example: 2 default: 0 page: type: integer example: 1 default: 0 total_pages: type: integer example: 1 default: 0 deprecated: false x-readme: code-samples: - language: curl code: curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST - language: ruby code: FatZebra::DirectCredit.search samples-languages: - curl - ruby tags: - Purchases /purchases/: post: summary: Create a purchase using a wallet description: '' operationId: create-a-purchase-with-wallet parameters: - name: Content-Type in: header description: application/json schema: type: string requestBody: content: application/json: schema: type: object required: - amount - reference - customer_ip - currency - card_holder properties: amount: type: integer description: 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) format: int32 reference: type: string description: Reference of the transaction. Max length 255 characters. customer_ip: type: string description: RFC791-compliant IP address currency: type: string description: Three letter [ISO currency code](https://pmnts.readme.io/v1.0/docs/iso-currency-codes-1), in UPPERCASE default: AUD card_holder: type: string description: Name of the card holder cvv: type: string description: CVV card number. (3/4 characters) test: type: boolean description: Indicates if this is a test transaction default: false wallet: type: object description: Wallet credentials. Described below required: - type properties: type: type: string description: Name of the wallet ('ApplePay', 'GooglePay') encPaymentData: type: string description: 'required for type: VISA' encKey: type: string description: 'required for type: VISA' callid: type: string description: 'required for type: VISA' token: type: string description: 'required for type: APPLE, GOOGLE' user_id: type: string description: 'required for type: MASTERPASSEXPRESS' origin_url: type: string description: 'required for type: MASTERPASSEXPRESS' card_id: type: string description: 'required for type: MASTERPASSEXPRESS' address_id: type: string description: 'required for type: MASTERPASSEXPRESS' checkout_resource_url: type: string description: 'required for type: MASTERPASS' oauth_token: type: string description: 'required for type: MASTERPASS' oauth_verifier: type: string description: 'required for type: MASTERPASS' checkout_id: type: string description: 'required for type: ZIP_MONEY' account_id: type: string description: 'required for type: ZIP_MONEY' metadata: type: object properties: {} addendum_data: type: string extra: properties: ecm: type: string description: 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) default: '31' sli: type: string description: The Security Level Indicator for 3DS transactions (from the MPI) xid: type: string description: The transaction ID (XID) value of a 3D Secure authenticated transaction (from the MPI) cavv: type: string description: The card holder authentication verification value for a 3D Secure authenticated transaction (from the MPI) par: type: string description: The Payer Request result for a 3D Secure transaction (from the MPI) ver: type: string description: The Verification Request result for a 3D Secure transaction (from the MPI) threeds_version: type: string description: '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: type: string description: This is the unique identifier for a 3D Secure version 2 transaction. (from the MPI) card_on_file: type: boolean description: 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. default: false auth_reason: type: string description: '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: type: string description: 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: type: string description: 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. required: [] type: object responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"successful\": true,\n \"response\": {\n \"authorization\": \"295229\",\n \"id\": \"071-P-HEJJINFO\",\n \"card_number\": \"512345XXXXXX2346\",\n \"card_holder\": \"Jim Smith\",\n \"card_expiry\": \"2023-05-31\",\n \"card_token\": \"fke8swow\",\n \"card_type\": \"MasterCard\",\n \"card_category\": \"Credit\",\n \"card_subcategory\": \"Standard\",\n \"amount\": 1000,\n \"decimal_amount\": 10,\n \"successful\": true,\n \"message\": \"Approved\",\n \"reference\": \"fd792da68ea1b8a1ba791a0efc6f73b4\",\n \"currency\": \"USD\",\n \"transaction_id\": \"071-P-HEJJINFO\",\n \"settlement_date\": \"2018-07-06\",\n \"transaction_date\": \"2018-07-06T10:31:05+10:00\",\n \"response_code\": \"00\",\n \"captured\": true,\n \"captured_amount\": 1000,\n \"rrn\": \"071PHEJJINFO\",\n \"cvv_match\": \"M\",\n \"metadata\": {},\n \"addendum_data\": {}\n },\n \"errors\": [],\n \"test\": true\n}" schema: type: object properties: successful: type: boolean example: true default: true response: type: object properties: authorization: type: string example: '295229' id: type: string example: 071-P-HEJJINFO card_number: type: string example: 512345XXXXXX2346 card_holder: type: string example: Jim Smith card_expiry: type: string example: '2023-05-31' card_token: type: string example: fke8swow card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 1000 default: 0 decimal_amount: type: integer example: 10 default: 0 successful: type: boolean example: true default: true message: type: string example: Approved reference: type: string example: fd792da68ea1b8a1ba791a0efc6f73b4 currency: type: string example: USD transaction_id: type: string example: 071-P-HEJJINFO settlement_date: type: string example: '2018-07-06' transaction_date: type: string example: '2018-07-06T10:31:05+10:00' response_code: type: string example: '00' captured: type: boolean example: true default: true captured_amount: type: integer example: 1000 default: 0 rrn: type: string example: 071PHEJJINFO cvv_match: type: string example: M metadata: type: object properties: {} addendum_data: type: object properties: {} errors: type: array test: type: boolean example: true default: true '400': description: '400' content: application/json: examples: Result: value: "{\n \"successful\": false,\n \"response\": {\n \"authorization\": null,\n \"id\": \"071-P-QE2I2PCW\",\n \"card_number\": \"512345XXXXXX2346\",\n \"card_holder\": \"Jim Smith\",\n \"card_expiry\": \"2030-02-28\",\n \"card_token\": \"fke86c5u\",\n \"card_type\": \"MasterCard\",\n \"card_category\": \"Credit\",\n \"card_subcategory\": \"Standard\",\n \"amount\": 10000,\n \"decimal_amount\": 100.0,\n \"successful\": false,\n \"message\": null,\n \"reference\": \"da5d16122b831b468090a7adaf68758e\",\n \"currency\": \"XXX\",\n \"transaction_id\": \"071-P-QE2I2PCW\",\n \"settlement_date\": null,\n \"transaction_date\": null,\n \"response_code\": \"99\",\n \"captured\": false,\n \"captured_amount\": null,\n \"rrn\": null,\n \"cvv_match\": \"U\",\n \"metadata\": {},\n \"addendum_data\": null\n },\n \"errors\": [\"Currency XXX is not valid for this merchant. Permitted currencies: USD,AUD,NZD,GBP\"]\n}\n" schema: type: object properties: successful: type: boolean example: false default: true response: type: object properties: authorization: {} id: type: string example: 071-P-QE2I2PCW card_number: type: string example: 512345XXXXXX2346 card_holder: type: string example: Jim Smith card_expiry: type: string example: '2030-02-28' card_token: type: string example: fke86c5u card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 10000 default: 0 decimal_amount: type: integer example: 100 default: 0 successful: type: boolean example: false default: true message: {} reference: type: string example: da5d16122b831b468090a7adaf68758e currency: type: string example: XXX transaction_id: type: string example: 071-P-QE2I2PCW settlement_date: {} transaction_date: {} response_code: type: string example: '99' captured: type: boolean example: false default: true captured_amount: {} rrn: {} cvv_match: type: string example: U metadata: type: object properties: {} addendum_data: {} errors: type: array items: type: string example: 'Currency XXX is not valid for this merchant. Permitted currencies: USD,AUD,NZD,GBP' deprecated: false x-readme: code-samples: - language: curl code: " curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d'\n {\n \"amount\": 1000,\n \"reference\":\"ORD98976\",\n \"customer_ip\":\"111.222.111.123\",\n \"currency\":\"USD\",\n \"wallet\": {\n \"type\":\"APPLE\",\n \"token\": {\n \"paymentData\": {\n \t\"test\" :\"value\"\n }\n }\n }\n }'" name: cURL (Apple Pay) - language: curl code: "curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d'\n {\n \"amount\": 1000,\n \"reference\": \"ORD98976\",\n \"customer_ip\": \"111.222.111.123\",\n \"currency\": \"USD\",\n \"wallet\": {\n \"type\": \"GOOGLE\",\n \"token\": {\n \"protocolVersion\": \"ECv2\",\n \"signature\": \"MEUCIG39tbaQPwJe28U+UMsJmxUBUWSkwlOv9Ibohacer+CoAiEA8Wuq3lLUCwLQ06D2kErxaMg3b/oLDFbd2gcFze1zDqU\\u003d\",\n \"intermediateSigningKey\": {\n \"signedKey\": \"{\\\"keyExpiration\\\":\\\"1542394027316\\\",\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE/1+3HBVSbdv+j7NaArdgMyoSAM43yRydzqdg1TxodSzA96Dj4Mc1EiKroxxunavVIvdxGnJeFViTzFvzFRxyCw\\\\u003d\\\\u003d\\\"}\",\n \"signatures\": [\"MEYCIQDcXCoB4fYJF3EolxrE2zB+7THZCfKA7cWxSztKceXTCgIhAN/d5eBgx/1A6qKBdH0IS7/aQ7dO4MuEt26OrLCUxZnl\"]\n },\n \"signedMessage\": \"{\\\"tag\\\":\\\"TjkIKzIOvCrFvjf7/aeeL8/FZJ3tigaNnerag68hIaw\\\\u003d\\\",\\\"ephemeralPublicKey\\\":\\\"BLJoTmxP2z7M2N6JmaN786aJcT/L/OJfuJKQdIXcceuBBZ00sf5nm2+snxAJxeJ4HYFTdNH4MOJrH58GNDJ9lJw\\\\u003d\\\",\\\"encryptedMessage\\\":\\\"mleAf23XkKjj\\\"}\"\n }\n }\n }'" name: cURL (Google Pay™) samples-languages: - curl tags: - Purchases /purchases/ ​: post: summary: Create a purchase using a network token passthrough description: '' operationId: create-a-purchase-using-token-passthough parameters: - name: Content-Type in: header description: application/json schema: type: string requestBody: content: application/json: schema: type: object required: - amount - reference - customer_ip - currency - card_number - card_holder properties: amount: type: integer description: 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) format: int32 reference: type: string description: Reference of the transaction. Max length 255 characters. customer_ip: type: string description: RFC791-compliant IP address currency: type: string description: Three letter [ISO currency code](https://pmnts.readme.io/v1.0/docs/iso-currency-codes-1), in UPPERCASE default: AUD card_number: type: string description: DPAN or network scheme token card_holder: type: string description: Name of the card holder card_expiry: type: string description: 'The token expiry - format: `MM/YYYY`' cryptogram: type: string description: Cryptogram value - 28 characters network_eci: type: string description: ECI value associated with network cryptogram (required for VTS on MPGS only) default: '07' test: type: boolean description: Indicates if this is a test transaction default: false metadata: type: object properties: {} addendum_data: type: string capture: type: boolean description: Indicates if this purchase should be captured (true), or authorized only (false). Defaults to true default: true extra: properties: ecm: type: string description: 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) default: '31' required: [] type: object responses: '200': description: '200' content: application/json: examples: cURL - Scheme token or Fatzebra card token: value: "{\n \"successful\": true,\n \"response\": {\n \"authorization\": \"295229\",\n \"id\": \"071-P-HEJJINFO\",\n \"card_number\": \"555555XXXXXX5555\",\n \"card_holder\": \"Valued Cardholder\",\n \"card_expiry\": \"2027-02-28\",\n \"card_token\": \"qwer9876\",\n \"card_type\": \"MasterCard\",\n \"card_category\": \"Credit\",\n \"card_subcategory\": \"Standard\",\n \"amount\": 110,\n \"decimal_amount\": 1.1,\n \"successful\": true,\n \"message\": \"Approved\",\n \"reference\": \"fd792da68ea1b8a1ba791a0efc6f73b4\",\n \"currency\": \"USD\",\n \"transaction_id\": \"071-P-HEJJINFO\",\n \"settlement_date\": \"2018-07-06\",\n \"transaction_date\": \"2018-07-06T10:31:05+10:00\",\n \"response_code\": \"00\",\n \"captured\": true,\n \"captured_amount\": 110,\n \"rrn\": \"071PHEJJINFO\",\n \"cvv_match\": \"M\",\n \"metadata\": {},\n \"addendum_data\": {}\n },\n \"errors\": [],\n \"test\": true\n}" schema: type: object properties: successful: type: boolean example: true default: true response: type: object properties: authorization: type: string example: '295229' id: type: string example: 071-P-HEJJINFO card_number: type: string example: 555555XXXXXX5555 card_holder: type: string example: Valued Cardholder card_expiry: type: string example: '2027-02-28' card_token: type: string example: qwer9876 card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 110 default: 0 decimal_amount: type: number example: 1.1 default: 0 successful: type: boolean example: true default: true message: type: string example: Approved reference: type: string example: fd792da68ea1b8a1ba791a0efc6f73b4 currency: type: string example: USD transaction_id: type: string example: 071-P-HEJJINFO settlement_date: type: string example: '2018-07-06' transaction_date: type: string example: '2018-07-06T10:31:05+10:00' response_code: type: string example: '00' captured: type: boolean example: true default: true captured_amount: type: integer example: 110 default: 0 rrn: type: string example: 071PHEJJINFO cvv_match: type: string example: M metadata: type: object properties: {} addendum_data: type: object properties: {} errors: type: array test: type: boolean example: true default: true '400': description: '400' content: application/json: examples: Result: value: "{\n \"successful\": false,\n \"response\": {\n \"authorization\": null,\n \"id\": \"071-P-QE2I2PCW\",\n \"card_number\": \"512345XXXXXX2346\",\n \"card_holder\": \"Jim Smith\",\n \"card_expiry\": \"2030-02-28\",\n \"card_token\": \"fke86c5u\",\n \"card_type\": \"MasterCard\",\n \"card_category\": \"Credit\",\n \"card_subcategory\": \"Standard\",\n \"amount\": 10000,\n \"decimal_amount\": 100.0,\n \"successful\": false,\n \"message\": null,\n \"reference\": \"da5d16122b831b468090a7adaf68758e\",\n \"currency\": \"XXX\",\n \"transaction_id\": \"071-P-QE2I2PCW\",\n \"settlement_date\": null,\n \"transaction_date\": null,\n \"response_code\": \"99\",\n \"captured\": false,\n \"captured_amount\": null,\n \"rrn\": null,\n \"cvv_match\": \"U\",\n \"metadata\": {},\n \"addendum_data\": null\n },\n \"errors\": [\"Currency XXX is not valid for this merchant. Permitted currencies: USD,AUD,NZD,GBP\"]\n}\n" schema: type: object properties: successful: type: boolean example: false default: true response: type: object properties: authorization: {} id: type: string example: 071-P-QE2I2PCW card_number: type: string example: 512345XXXXXX2346 card_holder: type: string example: Jim Smith card_expiry: type: string example: '2030-02-28' card_token: type: string example: fke86c5u card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 10000 default: 0 decimal_amount: type: integer example: 100 default: 0 successful: type: boolean example: false default: true message: {} reference: type: string example: da5d16122b831b468090a7adaf68758e currency: type: string example: XXX transaction_id: type: string example: 071-P-QE2I2PCW settlement_date: {} transaction_date: {} response_code: type: string example: '99' captured: type: boolean example: false default: true captured_amount: {} rrn: {} cvv_match: type: string example: U metadata: type: object properties: {} addendum_data: {} errors: type: array items: type: string example: 'Currency XXX is not valid for this merchant. Permitted currencies: USD,AUD,NZD,GBP' deprecated: false x-readme: code-samples: - language: curl code: "curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d'\n {\n \"card_number\": \"55555555555555555\",\n \"card_holder\": \"Valued Cardholder\",\n \"card_expiry\": \"02/2027\",\n \"customer_ip\": \"127.0.0.1\",\n \"reference\": \"abcsd1234\",\n \"amount\": 110,\n \"currency\": \"AUD\",\n \"capture\": true,\n \"cryptogram\": \"Aaaaaa111112222223333344444==\"\n }'" name: cURL - Scheme Token - language: text code: "curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d'\n {\n \"card_token\": \"qwer9876\",\n \"customer_ip\": \"127.0.0.1\",\n \"reference\": \"abcsd1234\",\n \"amount\": 110,\n \"currency\": \"AUD\",\n \"capture\": true,\n \"cryptogram\": \"Aaaaaa111112222223333344444==\"\n }'" name: cURL - FatZebra card token samples-languages: - curl - text tags: - Purchases /purchases/ ​​: post: summary: Create a purchase using a wallet passthrough description: '' operationId: create-a-purchase-using-wallet-passthrough parameters: - name: Content-Type in: header description: application/json schema: type: string requestBody: content: application/json: schema: type: object required: - amount - reference - customer_ip - currency - card_number - card_holder properties: amount: type: integer description: 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) format: int32 reference: type: string description: Reference of the transaction. Max length 255 characters. customer_ip: type: string description: RFC791-compliant IP address currency: type: string description: Three letter [ISO currency code](https://pmnts.readme.io/v1.0/docs/iso-currency-codes-1), in UPPERCASE default: AUD card_number: type: string description: Card number decrypted from apple pay wallet card_holder: type: string description: Name of the card holder decrypted from wallet. If none is provided by the wallet, a sensible default should be used, such as 'Card Holder' , 'ApplePay Card Holder', 'GooglePay card holder' card_expiry: type: string description: 'The card expiry decrypted from wallet - format: `MM/YYYY`' wallet: type: object description: Wallet details including type and cryptogram (CAVV) required: - type properties: type: type: string description: The type of wallet being passed through (currently support 'passthrough_apple_pay' or 'passthrough_google_pay') cryptogram: type: string description: Required for ApplePay wallet transactions, optional for GooglePay. This is the cryptogram for the transaction. test: type: boolean description: Indicates if this is a test transaction default: false metadata: type: object properties: {} addendum_data: type: string capture: type: boolean extra: properties: ecm: type: string description: 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) default: '31' sli: type: string description: The Security Level Indicator. This should match the eciIndicator value of the payment data in the decrypted payload. required: [] type: object responses: '200': description: '200' content: application/json: examples: cURL - Scheme token or Fatzebra card token: value: "{\n \"successful\": true,\n \"response\": {\n \"authorization\": \"295229\",\n \"id\": \"071-P-HEJJINFO\",\n \"card_number\": \"555555XXXXXX5555\",\n \"card_holder\": \"Valued Cardholder\",\n \"card_expiry\": \"2027-02-28\",\n \"card_token\": \"qwer9876\",\n \"card_type\": \"MasterCard\",\n \"card_category\": \"Credit\",\n \"card_subcategory\": \"Standard\",\n \"amount\": 110,\n \"decimal_amount\": 1.1,\n \"successful\": true,\n \"message\": \"Approved\",\n \"reference\": \"fd792da68ea1b8a1ba791a0efc6f73b4\",\n \"currency\": \"USD\",\n \"transaction_id\": \"071-P-HEJJINFO\",\n \"settlement_date\": \"2018-07-06\",\n \"transaction_date\": \"2018-07-06T10:31:05+10:00\",\n \"response_code\": \"00\",\n \"captured\": true,\n \"captured_amount\": 110,\n \"rrn\": \"071PHEJJINFO\",\n \"cvv_match\": \"M\",\n \"metadata\": {},\n \"addendum_data\": {}\n },\n \"errors\": [],\n \"test\": true\n}" schema: type: object properties: successful: type: boolean example: true default: true response: type: object properties: authorization: type: string example: '295229' id: type: string example: 071-P-HEJJINFO card_number: type: string example: 555555XXXXXX5555 card_holder: type: string example: Valued Cardholder card_expiry: type: string example: '2027-02-28' card_token: type: string example: qwer9876 card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 110 default: 0 decimal_amount: type: number example: 1.1 default: 0 successful: type: boolean example: true default: true message: type: string example: Approved reference: type: string example: fd792da68ea1b8a1ba791a0efc6f73b4 currency: type: string example: USD transaction_id: type: string example: 071-P-HEJJINFO settlement_date: type: string example: '2018-07-06' transaction_date: type: string example: '2018-07-06T10:31:05+10:00' response_code: type: string example: '00' captured: type: boolean example: true default: true captured_amount: type: integer example: 110 default: 0 rrn: type: string example: 071PHEJJINFO cvv_match: type: string example: M metadata: type: object properties: {} addendum_data: type: object properties: {} errors: type: array test: type: boolean example: true default: true '400': description: '400' content: application/json: examples: Result: value: "{\n \"successful\": false,\n \"response\": {\n \"authorization\": null,\n \"id\": \"071-P-QE2I2PCW\",\n \"card_number\": \"512345XXXXXX2346\",\n \"card_holder\": \"Jim Smith\",\n \"card_expiry\": \"2030-02-28\",\n \"card_token\": \"fke86c5u\",\n \"card_type\": \"MasterCard\",\n \"card_category\": \"Credit\",\n \"card_subcategory\": \"Standard\",\n \"amount\": 10000,\n \"decimal_amount\": 100.0,\n \"successful\": false,\n \"message\": null,\n \"reference\": \"da5d16122b831b468090a7adaf68758e\",\n \"currency\": \"XXX\",\n \"transaction_id\": \"071-P-QE2I2PCW\",\n \"settlement_date\": null,\n \"transaction_date\": null,\n \"response_code\": \"99\",\n \"captured\": false,\n \"captured_amount\": null,\n \"rrn\": null,\n \"cvv_match\": \"U\",\n \"metadata\": {},\n \"addendum_data\": null\n },\n \"errors\": [\"Currency XXX is not valid for this merchant. Permitted currencies: USD,AUD,NZD,GBP\"]\n}\n" schema: type: object properties: successful: type: boolean example: false default: true response: type: object properties: authorization: {} id: type: string example: 071-P-QE2I2PCW card_number: type: string example: 512345XXXXXX2346 card_holder: type: string example: Jim Smith card_expiry: type: string example: '2030-02-28' card_token: type: string example: fke86c5u card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 10000 default: 0 decimal_amount: type: integer example: 100 default: 0 successful: type: boolean example: false default: true message: {} reference: type: string example: da5d16122b831b468090a7adaf68758e currency: type: string example: XXX transaction_id: type: string example: 071-P-QE2I2PCW settlement_date: {} transaction_date: {} response_code: type: string example: '99' captured: type: boolean example: false default: true captured_amount: {} rrn: {} cvv_match: type: string example: U metadata: type: object properties: {} addendum_data: {} errors: type: array items: type: string example: 'Currency XXX is not valid for this merchant. Permitted currencies: USD,AUD,NZD,GBP' deprecated: false x-readme: code-samples: - language: curl code: "curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d'\n {\n \"card_number\": \"55555555555555555\",\n \"card_holder\": \"Valued Cardholder\",\n \"card_expiry\": \"02/2027\",\n \"customer_ip\": \"127.0.0.1\",\n \"reference\": \"abcsd1234\",\n \"amount\": 110,\n \"currency\": \"AUD\",\n \"capture\": true,\n \"wallet\": {\n \t\"type\": \"passthrough_apple_pay\",\n \t\"cryptogram\": \"aaabbbcccddd111222333444=\"\n },\n \"extra\": {\n \t\"sli\":\"05\"\n },\n }'" name: cURL - Scheme Token - language: text code: "curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d'\n {\n \"card_token\": \"qwer9876\",\n \"customer_ip\": \"127.0.0.1\",\n \"reference\": \"abcsd1234\",\n \"amount\": 110,\n \"currency\": \"AUD\",\n \"capture\": true,\n \"cryptogram\": \"Aaaaaa111112222223333344444==\"\n }'" name: cURL - FatZebra card token samples-languages: - curl - text tags: - Purchases /purchases/ ​​​: post: summary: Create a purchase with a token description: '' operationId: create-a-purchase-with-a-token-1 parameters: - name: Content-Type in: header description: application/json schema: type: string requestBody: content: application/json: schema: type: object required: - amount - reference - customer_ip - currency - card_token properties: amount: type: integer description: 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) format: int32 reference: type: string description: Reference of the transaction. Max length 255 characters. customer_ip: type: string description: RFC791-compliant IP address currency: type: string description: Three letter [ISO currency code](https://pmnts.readme.io/v1.0/docs/iso-currency-codes-1), in UPPERCASE default: AUD card_token: type: string description: Card token test: type: boolean description: Indicates if this is a test transaction default: false metadata: type: object properties: {} addendum_data: type: string billing_address: type: object properties: address: type: string postcode: type: string email: type: string extra: properties: ecm: type: string description: 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) default: '31' sli: type: string description: The Security Level Indicator for 3DS transactions (from the MPI) xid: type: string description: The transaction ID (XID) value of a 3D Secure authenticated transaction (from the MPI) cavv: type: string description: The transaction ID (XID) value of a 3D Secure authenticated transaction (from the MPI) par: type: string description: The Payer Request result for a 3D Secure transaction (from the MPI) ver: type: string description: The Verification Request result for a 3D Secure transaction (from the MPI) threeds_version: type: string description: '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: type: string description: This is the unique identifier for a 3D Secure version 2 transaction. (from the MPI) card_on_file: type: boolean description: 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. default: false auth_reason: type: string description: '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: type: string description: 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: type: string description: This is required for all subsequent recurring or instalment transactions. This value can be found from the response from the 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. required: [] type: object responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"successful\":true,\n \"response\":{\n \"authorization\":\"468422\",\n \"id\":\"071-P-97AG1LA1\",\n \"card_number\":\"424242XXXXXX4242\",\n \"card_holder\":\"Client Name\",\n \"card_expiry\":\"2022-12-31\",\n \"card_token\":\"syupxv5b1tqv4bqdsazr\",\n \"card_type\":\"VISA\",\n \"card_category\":\"Credit\",\n \"card_subcategory\":\"Credit\",\n \"amount\":1000,\n \"decimal_amount\":10.0,\n \"successful\":true,\n \"message\":\"Approved\",\n \"reference\":\"oiuwiouwxmnx23\",\n \"currency\":\"USD\",\n \"transaction_id\":\"071-P-97AG1LA1\",\n \"settlement_date\":\"2018-11-22\",\n \"transaction_date\":\"2018-11-22T14:10:44+11:00\",\n \"response_code\":\"00\",\n \"captured\":true,\n \"captured_amount\":1000,\n \"rrn\":\"071P97AG1LA1\",\n \"cvv_match\":\"M\",\n \"metadata\":{},\n \"addendum_data\":{}\n },\n \"errors\":[],\n \"test\":true\n}" schema: type: object properties: successful: type: boolean example: true default: true response: type: object properties: authorization: type: string example: '468422' id: type: string example: 071-P-97AG1LA1 card_number: type: string example: 424242XXXXXX4242 card_holder: type: string example: Client Name card_expiry: type: string example: '2022-12-31' card_token: type: string example: syupxv5b1tqv4bqdsazr card_type: type: string example: VISA card_category: type: string example: Credit card_subcategory: type: string example: Credit amount: type: integer example: 1000 default: 0 decimal_amount: type: integer example: 10 default: 0 successful: type: boolean example: true default: true message: type: string example: Approved reference: type: string example: oiuwiouwxmnx23 currency: type: string example: USD transaction_id: type: string example: 071-P-97AG1LA1 settlement_date: type: string example: '2018-11-22' transaction_date: type: string example: '2018-11-22T14:10:44+11:00' response_code: type: string example: '00' captured: type: boolean example: true default: true captured_amount: type: integer example: 1000 default: 0 rrn: type: string example: 071P97AG1LA1 cvv_match: type: string example: M metadata: type: object properties: {} addendum_data: type: object properties: {} errors: type: array test: type: boolean example: true default: true deprecated: false x-readme: code-samples: - language: curl code: "curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d' \n { \n \"amount\": 1000, \n \"reference\": \"oiuwiouwxmnx23\", \n \"customer_ip\": \"111.222.111.123\", \n \"currency\": \"USD\", \n \"card_token\": \"syupxv5b1tqv4bqdsazr\" \n }'" samples-languages: - curl tags: - Purchases /purchases/ ​​​​: post: summary: Create a purchase, with fraud screening description: '' operationId: create-a-purchase-with-fraud-screening parameters: - name: Content-Type in: header description: application/json schema: type: string requestBody: content: application/json: schema: type: object required: - amount - reference - customer_ip - currency - card_holder properties: amount: type: integer description: 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) format: int32 reference: type: string description: Reference of the transaction customer_ip: type: string description: RFC791-compliant IP address currency: type: string description: Three letter [ISO currency code](https://pmnts.readme.io/v1.0/docs/iso-currency-codes-1), in UPPERCASE default: AUD card_holder: type: string description: Name of the card holder cvv: type: string description: CVV card number. (3/4 characters) test: type: boolean description: Indicates if this is a test transaction default: false wallet: type: object description: Wallet credentials. Described below required: - type properties: type: type: string description: Name of the wallet ('ApplePay', 'GooglePay') encPaymentData: type: string description: 'required for type: VISA' encKey: type: string description: 'required for type: VISA' callid: type: string description: 'required for type: VISA' token: type: string description: 'required for type: APPLE, GOOGLE' user_id: type: string description: 'required for type: MASTERPASSEXPRESS' origin_url: type: string description: 'required for type: MASTERPASSEXPRESS' card_id: type: string description: 'required for type: MASTERPASSEXPRESS' address_id: type: string description: 'required for type: MASTERPASSEXPRESS' checkout_resource_url: type: string description: 'required for type: MASTERPASS' oauth_token: type: string description: 'required for type: MASTERPASS' oauth_verifier: type: string description: 'required for type: MASTERPASS' checkout_id: type: string description: 'required for type: ZIP_MONEY' account_id: type: string description: 'required for type: ZIP_MONEY' metadata: type: object properties: {} addendum_data: type: string responses: '200': description: '200' content: application/json: examples: Result: value: "{\n successful: false,\n response: {\n authorization: null,\n id: \"071-P-QE2I2PCW\",\n card_number: \"512345XXXXXX2346\",\n card_holder: \"Jim Smith\",\n card_expiry: \"2030-02-28\",\n card_token: \"fke86c5u\",\n card_type: \"MasterCard\",\n card_category: \"Credit\",\n card_subcategory: \"Standard\",\n amount: 10000,\n decimal_amount: 100.0,\n successful: false,\n message: null,\n reference: \"da5d16122b831b468090a7adaf68758e\",\n currency: \"XXX\",\n transaction_id: \"071-P-QE2I2PCW\",\n settlement_date: null,\n transaction_date: null,\n response_code: \"99\",\n captured: false,\n captured_amount: null,\n rrn: null,\n cvv_match: \"U\",\n metadata: {},\n addendum_data: null\n },\n errors: [\"Currency XXX is not valid for this merchant. Permitted currencies: USD,AUD,NZD,GBP\"]\n}\n" schema: type: object properties: successful: type: boolean example: true default: true response: type: object properties: authorization: type: string example: '295229' id: type: string example: 071-P-HEJJINFO card_number: type: string example: 512345XXXXXX2346 card_holder: type: string example: Jim Smith card_expiry: type: string example: '2023-05-31' card_token: type: string example: fke8swow card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 1000 default: 0 decimal_amount: type: integer example: 10 default: 0 successful: type: boolean example: true default: true message: type: string example: Approved reference: type: string example: fd792da68ea1b8a1ba791a0efc6f73b4 currency: type: string example: USD transaction_id: type: string example: 071-P-HEJJINFO settlement_date: type: string example: '2018-07-06' transaction_date: type: string example: '2018-07-06T10:31:05+10:00' response_code: type: string example: '00' captured: type: boolean example: true default: true captured_amount: type: integer example: 1000 default: 0 rrn: type: string example: 071PHEJJINFO cvv_match: type: string example: M metadata: type: object properties: {} addendum_data: type: object properties: {} errors: type: array test: type: boolean example: true default: true deprecated: false x-readme: code-samples: - language: curl code: "curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d' \n { \n \"amount\": 1000, \n \"reference\": \"ORD98976\", \n \"customer_ip\": \"111.222.111.123\", \n \"currency\": \"USD\", \n \"wallet\": { \n \"type\": \"VISA\", \n \"callid\": \"4217429306843309054\", \n \"encPaymentData\": \"Y0B2qSBJSTXAamXxcBW6S5kcRE4KbpKE+MJotqxe1FA7KpsGweZcTyPsYypbzCcGN2bhIY3c63TlPf9Glv8t7C5TZ3hgd8tWqJ1k4Dsuc5Gzooi3oD/c0mlcleVX9H14yqNRJ8tn5w2o/dy1493xnJFEewt4o4Ryk5ak/3bov36XkRCLpCaYOYhR4D6pSZr8bIlRxCsEWKyuPdxwORI4BPvQeEgasjx17FJsCAR5Ta7APyXAdFAiBQrNPjm5UTbDonHPyUeWBkS/KmrSPwX8Zddh6iGbNwebGXMvqHNF70u/RIlHDeitB93p3RFxeWCpD33emESNT6u0UOyDdCe7F4E4g0RIqAnFj56rtj4yzdIYWVwvryzhb1HD1bUUgRCYNqL6L/x5VVC1bsVDkoVXELtQZk3MGM89c6foGOKt7R72kNfi6+7dXUEX7gr9l3bXAzKfVmWN1pUfy0TlZnnxK+saUYR4QtXVE0CZbS7iHzZ7rXTU37R1A4pkE9CvVSpZaZnThNN4+bzdzItMwkOAKsVJGeS3dtoVnjU2MAp4qlBAD4ChtS6CAgSBM/Vviv/hfnCgvhtvJ00+ifTVJ1933zqTlcAvdNkAcwGWYjbzwN7vOm6a3QrWXxvA2xFXbeSI2YIf8H0lHHUFdp4sj0hwtM4zvWejAvVi0wFxq6D5z3toAKFfQdMQZFgCmjKJ3OisqTL3KNZ2SE+qDMS5IqrTSdW1hZHRmNEyqMmGjC1elklt+E3+F+Hg8Z3G6RUc8nMfU6zlRAhy3Ap/ugS29eE4txh6BOMseBFU71OL2tGiOyBOrLykCkf6r1eiiG/1qwuM4hxSJ+V37cZFSLYhDR8r5C5LQlmpsfS2NzcPWiM8lUIML6yyHWipWH7+2Mnl16CB7ByeERlIWz+s5e+gKK/q7iJpWB3Rlte0e2gDPF61LHmj//5435UJTWoRRja2+o568VazquJwKkLgMTR7Y8+HFepVmiwcULbNgCUTfArNpDWPR9mJEx+mAv4oGZMxrpsIou+lwPuFIy9dxGxrvBI5C2fJaDOTawJ9KcunXXk/K78TtNSvWaAG13PUxOUOkdC3qZq6frfpfsMWx9Sw3+8p1S0B6B9D/GPcjzUFbhkKMcVQek3WhHhyIAWvIpnnA9fJP6xYjdTbo/ExM7D6KISo7BczY7QqkGgBmt69HhUrG40p686O1uNd7GnDoW3U2XtUgOlxCN+XQ7ycpxYVICleP3E55Ok1RWkB1mr1VeSmmeZJvLhJdqIl5OtkV2U2AwQvTfF4eKRBEjLpiESigcWQB58AdeXPz+/eKOhyBZrWS6hYoZ6WPLDnPJIQCCUIQc177U/MANVIY3Z6WZksowPPeAWxgVek/RnwpIs4wIX80Gaj8w25Y0UkJtaOBYvChzcGE2NzJrNDlvtv1oLMa0yXIVN05hgaHcJq9OrlOt6cnDnDRUGMg41xivngxypkGOj0sdZqLHW3lX5RLfHg0ez0W/803s/FUatPVVb/jicOz1QF9P+/SKUGXTyOd5hXpJCHjgoWN+mKK19NcnYaFFIqpPm4sZon4fhuSBp0mPY4a2R9P446qkT9rOhiWNTwcU/97fBx35TU38A0QwKGRsrpbbMYMjbTFPYHVPOtqrqtFDv1nSOJ3BEOrC3rcp4hhN0YReH0Ef4Jc1ZkNV4CFGtNgd4G61WQokX0atvC0HRLlGLFv2Qt8lxXRZA1Kmn5K4Y06NosrtrqFoPQJ3rBoKVm19uXUCCVzsA/Rq9G+YDGbTcDXur6FsPIBI45LPeKsb5rgandhqvSHIfrVd1LoUD3F2I0o8Our/2xNnrM9QIIqclUUcghDUN8emwyttGPLN4/ObthLuP6QQMZnN8trVgXqBNayMW/p9KJeoVHD4H2gcoa5L+Wu1Tz2RYwvFatOj/gvwzPjq+MNNmRbaqSRAUYqykWQwrIXsQINL5sAftLlXE=\", \n \"encKey\": \"h3tFXPop0DSYyW2VmhjZGLRhNUHA53sqK30OpDWyU/2aCDomzOL/QwB8Y96c4MfvUP1xvhoxoZR9RzAUu3MnotvM41eR5wOJAIWJ4V2ulvJC/4Esmv1Vg9r3PSn8xDpE\" \n } \n }'" name: cURL (Visa) - language: curl code: "curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d\" \\\n { \\\n \\\"amount\\\": 1000, \\\n \\\"reference\\\": \\\"ORD98976\\\", \\\n \\\"customer_ip\\\": \\\"111.222.111.123\\\", \\\n \\\"currency\\\": \\\"USD\\\", \\\n \\\"wallet\\\": { \\\n \\\"type\\\": \\\"MASTERPASS\\\", \\\n \\\"checkout_resource_url\\\": \\\"4\\\", \\\n \\\"oauth_token\\\": \\\"4\\\", \\\n \\\"oauth_verifiier\\\": \\\"4\\\" \\\n } \\\n }\"" name: cURL (Masterpass) - language: curl code: "curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d\" \\\n { \\\n \\\"amount\\\": 1000, \\\n \\\"reference\\\": \\\"ORD98976\\\", \\\n \\\"customer_ip\\\": \\\"111.222.111.123\\\", \\\n \\\"currency\\\": \\\"USD\\\", \\\n \\\"wallet\\\": { \\\n \\\"type\\\": \\\"MASTERPASS\\\", \\\n \\\"user_id\\\": \\\"4\\\", \\\n \\\"origin_url\\\": \\\"4\\\", \\\n \\\"card_id\\\": \\\"4\\\", \\\n \\\"address_id\\\": \\\"4\\\"\\\n } \\\n }\"" name: cURL (Masterpass Express) - language: curl code: "curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d\" \\\n { \\\n \\\"amount\\\": 1000, \\\n \\\"reference\\\": \\\"ORD98976\\\", \\\n \\\"customer_ip\\\": \\\"111.222.111.123\\\", \\\n \\\"currency\\\": \\\"USD\\\", \\\n \\\"wallet\\\": { \\\n \\\"type\\\": \\\"ZIP_MONEY\\\", \\\n \\\"checkout_id\\\": \\\"4\\\", \\\n \\\"account_id\\\": \\\"4\\\"\n } \\\n }\"" name: cURL (ZipMoney) - language: curl code: "curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d\" \\\n { \\\n \\\"amount\\\": 1000, \\\n \\\"reference\\\": \\\"ORD98976\\\", \\\n \\\"customer_ip\\\": \\\"111.222.111.123\\\", \\\n \\\"currency\\\": \\\"USD\\\", \\\n \\\"wallet\\\": { \\\n \\\"type\\\": \\\"APPLE\\\", \\\n \\\"token\\\": { \\\n \\\"paymentData\\\": \\\"fifteen\\\" \\\n } \\\n } \\\n }\"" name: cURL (Apple) samples-languages: - curl tags: - Purchases /purchases/ ​​​​​: post: summary: Create an authorization description: '' operationId: create-an-authorization parameters: - name: Content-Type in: header description: application/json schema: type: string requestBody: content: application/json: schema: type: object required: - amount - reference - customer_ip - currency - capture properties: amount: type: integer description: Amount of the purchase in cent. Required on create format: int32 reference: type: string description: Reference of the transaction, required on create. Max length 255 characters. customer_ip: type: string description: RFC791-compliant IP address currency: type: string description: Three letter [ISO currency code](https://pmnts.readme.io/v1.0/docs/iso-currency-codes-1), in UPPERCASE default: AUD card_number: type: string description: Required on create, unless you provide a `card_token` or a `wallet` object card_holder: type: string description: Name of the card holder card_expiry: type: string description: 'Format: `MM/YYYY` Required on create, unless you provide a `card_token` or a `wallet` object' card_token: type: string description: Required on create, unless you provide a `card_number` or a `wallet` object cvv: type: string description: CVV card number. (3/4 characters) test: type: boolean description: Indicates if this is a test transaction default: false wallet: type: object required: - type properties: type: type: string description: Name of the wallet ('ApplePay', 'GooglePay') encPaymentData: type: string description: 'required for type: VISA' encKey: type: string description: 'required for type: VISA' callid: type: string description: 'required for type: VISA' token: type: string description: 'required for type: APPLE, GOOGLE' user_id: type: string description: 'required for type: MASTERPASSEXPRESS' origin_url: type: string description: 'required for type: MASTERPASSEXPRESS' card_id: type: string description: 'required for type: MASTERPASSEXPRESS' address_id: type: string description: 'required for type: MASTERPASSEXPRESS' checkout_resource_url: type: string description: 'required for type: MASTERPASS' oauth_token: type: string description: 'required for type: MASTERPASS' oauth_verifier: type: string description: 'required for type: MASTERPASS' checkout_id: type: string description: 'required for type: ZIP_MONEY' account_id: type: string description: 'required for type: ZIP_MONEY' metadata: type: object properties: {} addendum_data: type: string capture: type: boolean description: Indicates if this purchase should be captured (true), or authorized only (false) default: true final: type: boolean description: '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.' default: false responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"successful\": false,\n \"response\": {\n \"authorization\": null,\n \"id\": \"071-P-QE2I2PCW\",\n \"card_number\": \"512345XXXXXX2346\",\n \"card_holder\": \"Jim Smith\",\n \"card_expiry\": \"2030-02-28\",\n \"card_token\": \"fke86c5u\",\n \"card_type\": \"MasterCard\",\n \"card_category\": \"Credit\",\n \"card_subcategory\": \"Standard\",\n \"amount\": 1000,\n \"decimal_amount\": 10.0,\n \"successful\": false,\n \"message\": null,\n \"reference\": \"da5d16122b831b468090a7adaf68758e\",\n \"currency\": \"XXX\",\n \"transaction_id\": \"071-P-QE2I2PCW\",\n \"settlement_date\": null,\n \"transaction_date\": null,\n \"response_code\": \"99\",\n \"captured\": false,\n \"captured_amount\": null,\n \"rrn\": null,\n \"cvv_match\": \"U\",\n \"metadata\": {},\n \"addendum_data\": null\n },\n \"errors\": [\"Currency XXX is not valid for this merchant. Permitted currencies: USD,AUD,NZD,GBP\"]\n}\n" schema: oneOf: - type: object properties: successful: type: boolean example: true default: true response: type: object properties: authorization: type: string example: '283293' id: type: string example: 071-P-18DBFFCO card_number: type: string example: 512345XXXXXX2346 card_holder: type: string example: Jim Smith card_expiry: type: string example: '2023-05-01' card_token: type: string example: fke86c5u card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 1000 default: 0 decimal_amount: type: integer example: 10 default: 0 successful: type: boolean example: true default: true message: type: string example: Approved reference: type: string example: c10de1d9590fca1d893380c6e039ae71 currency: type: string example: AUD transaction_id: type: string example: 071-P-18DBFFCO settlement_date: type: string example: '2017-06-21' transaction_date: type: string example: '2017-06-21T15:02:46+10:00' response_code: type: string example: '00' captured: type: boolean example: false default: true captured_amount: type: integer example: 0 default: 0 rrn: type: string example: 071P18DBFFCO cvv_match: type: string example: M metadata: type: object properties: {} addendum_data: type: object properties: {} errors: type: array - type: object properties: successful: type: boolean example: false default: true response: type: object properties: authorization: {} id: type: string example: 071-P-QE2I2PCW card_number: type: string example: 512345XXXXXX2346 card_holder: type: string example: Jim Smith card_expiry: type: string example: '2030-02-28' card_token: type: string example: fke86c5u card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 1000 default: 0 decimal_amount: type: integer example: 10 default: 0 successful: type: boolean example: false default: true message: {} reference: type: string example: da5d16122b831b468090a7adaf68758e currency: type: string example: XXX transaction_id: type: string example: 071-P-QE2I2PCW settlement_date: {} transaction_date: {} response_code: type: string example: '99' captured: type: boolean example: false default: true captured_amount: {} rrn: {} cvv_match: type: string example: U metadata: type: object properties: {} addendum_data: {} errors: type: array items: type: string example: 'Currency XXX is not valid for this merchant. Permitted currencies: USD,AUD,NZD,GBP' deprecated: false x-readme: code-samples: - language: curl code: "curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d' \n { \n \"card_holder\": \"Jim Smith\", \n \"card_number\": \"5123456789012346\", \n \"card_expiry\": \"05/2023\", \n \"cvv\": \"987\", \n \"amount\": 1000, \n \"reference\": \"ORD98976\", \n \"customer_ip\": \"111.222.111.123\", \n \"currency\": \"USD\", \n \"capture\": false, \n \"final\": false \n }'" - language: ruby code: "FatZebra::Purchase.create(\n amount: 1000,\n card_holder: 'Jim Smith',\n card_number: '5123456789012346',\n card_expiry: '05/2023',\n cvv: '987',\n reference: 'ORD98976',\n customer_ip: '111.222.111.123'\n)" samples-languages: - curl - ruby tags: - Purchases /purchases/{id}: put: summary: Update an authorization description: Extend, increase authorized amount operationId: update-an-authorization parameters: - name: id in: path description: id of the purchase schema: type: string required: true - name: Content-Type in: header description: application/json schema: type: string requestBody: content: application/json: schema: type: object properties: amount: type: integer description: The new amount for the authorisation (where the amount is being increased from the original authorized value) format: int32 metadata: type: string extend: type: boolean description: Indicates if an authorization extension should be processed default: false responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"successful\": false,\n \"response\": {\n \"authorization\": \"573449\",\n \"id\": \"071-P-Y7HDHLT7\",\n \"card_number\": \"512345XXXXXX2346\",\n \"card_holder\": \"Matthew Savage\",\n \"card_expiry\": \"2030-02-28\",\n \"card_token\": \"fke8n73t\",\n \"card_type\": \"MasterCard\",\n \"card_category\": \"Credit\",\n \"card_subcategory\": \"Standard\",\n \"amount\": 10000,\n \"decimal_amount\": 100.0,\n \"successful\": true,\n \"message\": \"Approved\",\n \"reference\": \"2c94f2337efe4e4b384a37a8d1e3515a\",\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-P-Y7HDHLT7\",\n \"settlement_date\": null,\n \"transaction_date\": \"2017-11-30T11:18:09+11:00\",\n \"response_code\": \"00\",\n \"captured\": false,\n \"captured_amount\": 0,\n \"rrn\": \"071PY7HDHLT7\",\n \"cvv_match\": \"M\",\n \"metadata\": {},\n \"addendum_data\": {}\n },\n \"errors\": [\"Capture amount cannot be greater then the original authorised amount\"]\n}\n" schema: oneOf: - type: object properties: successful: type: boolean example: true default: true response: type: object properties: authorization: type: string example: '283293' id: type: string example: 071-P-18DBFFCO card_number: type: string example: 512345XXXXXX2346 card_holder: type: string example: Jim Smith card_expiry: type: string example: '2023-05-01' card_token: type: string example: fke86c5u card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 10100 default: 0 decimal_amount: type: integer example: 101 default: 0 successful: type: boolean example: true default: true message: type: string example: Approved reference: type: string example: c10de1d9590fca1d893380c6e039ae71 currency: type: string example: AUD transaction_id: type: string example: 071-P-18DBFFCO settlement_date: type: string example: '2017-06-21' transaction_date: type: string example: '2017-06-21T15:02:46+10:00' response_code: type: string example: '00' captured: type: boolean example: false default: true captured_amount: type: integer example: 0 default: 0 rrn: type: string example: 071P18DBFFCO cvv_match: type: string example: M metadata: type: object properties: {} addendum_data: type: object properties: {} errors: type: array - type: object properties: successful: type: boolean example: false default: true response: type: object properties: authorization: type: string example: '573449' id: type: string example: 071-P-Y7HDHLT7 card_number: type: string example: 512345XXXXXX2346 card_holder: type: string example: Matthew Savage card_expiry: type: string example: '2030-02-28' card_token: type: string example: fke8n73t card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 10000 default: 0 decimal_amount: type: integer example: 100 default: 0 successful: type: boolean example: true default: true message: type: string example: Approved reference: type: string example: 2c94f2337efe4e4b384a37a8d1e3515a currency: type: string example: AUD transaction_id: type: string example: 071-P-Y7HDHLT7 settlement_date: {} transaction_date: type: string example: '2017-11-30T11:18:09+11:00' response_code: type: string example: '00' captured: type: boolean example: false default: true captured_amount: type: integer example: 0 default: 0 rrn: type: string example: 071PY7HDHLT7 cvv_match: type: string example: M metadata: type: object properties: {} addendum_data: type: object properties: {} errors: type: array items: type: string example: Capture amount cannot be greater then the original authorised amount deprecated: false x-readme: code-samples: - language: curl code: "curl https://gateway.pmnts-sandbox.io/v1.0/purchases/{id} -XPUT -u TEST:TEST -d' \n { \n \"amount\": 10100 \n }'" - language: ruby code: FatZebra::Purchase.find('071-P-18DBFFCO').capture samples-languages: - curl - ruby tags: - Purchases delete: summary: Release an authorization description: Void an authorization partially or completely operationId: release-an-authorization parameters: - name: id in: path description: id of the purchase schema: type: string required: true - name: Content-Type in: header description: application/json schema: type: string requestBody: content: application/json: schema: type: object properties: amount: type: integer description: The new amount for the authorisation (where the amount is being increased from the original authorized value). If this field is not provided, the `original amount` will be used. format: int32 metadata: type: string extend: type: boolean description: Indicates if an authorization extension should be processed default: false responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"successful\": false,\n \"response\": {\n \"authorization\": \"573449\",\n \"id\": \"071-P-Y7HDHLT7\",\n \"card_number\": \"512345XXXXXX2346\",\n \"card_holder\": \"Matthew Savage\",\n \"card_expiry\": \"2030-02-28\",\n \"card_token\": \"fke8n73t\",\n \"card_type\": \"MasterCard\",\n \"card_category\": \"Credit\",\n \"card_subcategory\": \"Standard\",\n \"amount\": 10000,\n \"decimal_amount\": 100.0,\n \"successful\": true,\n \"message\": \"Approved\",\n \"reference\": \"2c94f2337efe4e4b384a37a8d1e3515a\",\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-P-Y7HDHLT7\",\n \"settlement_date\": null,\n \"transaction_date\": \"2017-11-30T11:18:09+11:00\",\n \"response_code\": \"00\",\n \"captured\": false,\n \"captured_amount\": 0,\n \"rrn\": \"071PY7HDHLT7\",\n \"cvv_match\": \"M\",\n \"metadata\": {},\n \"addendum_data\": {}\n },\n \"errors\": [\"Capture amount cannot be greater then the original authorised amount\"]\n}\n" schema: oneOf: - type: object properties: successful: type: boolean example: true default: true response: type: object properties: authorization: type: string example: '283293' id: type: string example: 071-P-18DBFFCO card_number: type: string example: 512345XXXXXX2346 card_holder: type: string example: Jim Smith card_expiry: type: string example: '2023-05-01' card_token: type: string example: fke86c5u card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 10100 default: 0 decimal_amount: type: integer example: 101 default: 0 successful: type: boolean example: true default: true message: type: string example: Approved reference: type: string example: c10de1d9590fca1d893380c6e039ae71 currency: type: string example: AUD transaction_id: type: string example: 071-P-18DBFFCO settlement_date: type: string example: '2017-06-21' transaction_date: type: string example: '2017-06-21T15:02:46+10:00' response_code: type: string example: '00' captured: type: boolean example: false default: true captured_amount: type: integer example: 0 default: 0 rrn: type: string example: 071P18DBFFCO cvv_match: type: string example: M metadata: type: object properties: {} addendum_data: type: object properties: {} errors: type: array - type: object properties: successful: type: boolean example: false default: true response: type: object properties: authorization: type: string example: '573449' id: type: string example: 071-P-Y7HDHLT7 card_number: type: string example: 512345XXXXXX2346 card_holder: type: string example: Matthew Savage card_expiry: type: string example: '2030-02-28' card_token: type: string example: fke8n73t card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 10000 default: 0 decimal_amount: type: integer example: 100 default: 0 successful: type: boolean example: true default: true message: type: string example: Approved reference: type: string example: 2c94f2337efe4e4b384a37a8d1e3515a currency: type: string example: AUD transaction_id: type: string example: 071-P-Y7HDHLT7 settlement_date: {} transaction_date: type: string example: '2017-11-30T11:18:09+11:00' response_code: type: string example: '00' captured: type: boolean example: false default: true captured_amount: type: integer example: 0 default: 0 rrn: type: string example: 071PY7HDHLT7 cvv_match: type: string example: M metadata: type: object properties: {} addendum_data: type: object properties: {} errors: type: array items: type: string example: Capture amount cannot be greater then the original authorised amount deprecated: false x-readme: code-samples: - language: curl code: "curl https://gateway.pmnts-sandbox.io/v1.0/purchases/{id} -XDELETE -u TEST:TEST -d'\n { \n \"amount\": 5000 \n }'" - language: ruby code: FatZebra::Purchase.find('071-P-18DBFFCO').capture samples-languages: - curl - ruby tags: - Purchases get: summary: Fetch a purchase description: '' operationId: fetch-a-purchase parameters: - name: Content-Type in: header schema: type: string default: application/json - name: id in: path description: The ID or reference of the purchase. schema: type: string required: true responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"successful\": true,\n \"response\": {\n \"authorization\": \"283293\",\n \"id\": \"071-P-P7OX5AF6\",\n \"card_number\": \"512345XXXXXX2346\",\n \"card_holder\": \"Jim Smith\",\n \"card_expiry\": \"2023-05-01\",\n \"card_token\": \"fke86c5u\",\n \"card_type\": \"MasterCard\",\n \"card_category\": \"Credit\",\n \"card_subcategory\": \"Standard\",\n \"amount\": 10000,\n \"decimal_amount\": 100.0,\n \"successful\": true,\n \"message\": \"Approved\",\n \"reference\": \"c10de1d9590fca1d893380c6e039ae71\",\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-P-18DBFFCO\",\n \"settlement_date\": \"2017-06-21\",\n \"transaction_date\": \"2017-06-21T15:02:46+10:00\",\n \"response_code\": \"00\",\n \"captured\": true,\n \"captured_amount\": 10000,\n \"rrn\": \"071P18DBFFCO\",\n \"cvv_match\": \"M\",\n \"metadata\": {},\n \"addendum_data\": {}\n },\n \"errors\": []\n}" schema: type: object properties: successful: type: boolean example: true default: true response: type: object properties: authorization: type: string example: '283293' id: type: string example: 071-P-P7OX5AF6 card_number: type: string example: 512345XXXXXX2346 card_holder: type: string example: Jim Smith card_expiry: type: string example: '2023-05-01' card_token: type: string example: fke86c5u card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 10000 default: 0 decimal_amount: type: integer example: 100 default: 0 successful: type: boolean example: true default: true message: type: string example: Approved reference: type: string example: c10de1d9590fca1d893380c6e039ae71 currency: type: string example: AUD transaction_id: type: string example: 071-P-18DBFFCO settlement_date: type: string example: '2017-06-21' transaction_date: type: string example: '2017-06-21T15:02:46+10:00' response_code: type: string example: '00' captured: type: boolean example: true default: true captured_amount: type: integer example: 10000 default: 0 rrn: type: string example: 071P18DBFFCO cvv_match: type: string example: M metadata: type: object properties: {} addendum_data: type: object properties: {} errors: type: array '404': description: '404' content: application/json: examples: Result: value: "{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\"Could not find Purchase\"]\n}\n" schema: type: object properties: successful: type: boolean example: false default: true response: type: object properties: {} errors: type: array items: type: string example: Could not find Purchase deprecated: false x-readme: code-samples: - language: curl code: curl https://gateway.pmnts-sandbox.io/v1.0/purchases/071-P-P7OX5AF6 -u TEST:TEST - language: ruby code: FatZebra::Purchase.find('071-P-P7OX5AF6') samples-languages: - curl - ruby tags: - Purchases /purchases/{id}/capture: post: summary: Capture an authorization description: Please note, If the outer successful field is false, it means the capture was rejected at the gateway level and the errors array needs to be looked at to confirm why it failed. operationId: capture-an-authorization parameters: - name: id in: path description: id of the purchase schema: type: string required: true - name: Content-Type in: header description: application/json schema: type: string requestBody: content: application/json: schema: type: object required: - amount properties: amount: type: integer description: Amount of the purchase in the smallest unit of for the currency. format: int32 metadata: type: object properties: {} addendum_data: type: object properties: {} responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"successful\": false,\n \"response\": {\n \"authorization\": \"573449\",\n \"id\": \"071-P-Y7HDHLT7\",\n \"card_number\": \"512345XXXXXX2346\",\n \"card_holder\": \"Matthew Savage\",\n \"card_expiry\": \"2030-02-28\",\n \"card_token\": \"fke8n73t\",\n \"card_type\": \"MasterCard\",\n \"card_category\": \"Credit\",\n \"card_subcategory\": \"Standard\",\n \"amount\": 10000,\n \"decimal_amount\": 100.0,\n \"successful\": true,\n \"message\": \"Approved\",\n \"reference\": \"2c94f2337efe4e4b384a37a8d1e3515a\",\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-P-Y7HDHLT7\",\n \"settlement_date\": null,\n \"transaction_date\": \"2017-11-30T11:18:09+11:00\",\n \"response_code\": \"00\",\n \"captured\": false,\n \"captured_amount\": 0,\n \"rrn\": \"071PY7HDHLT7\",\n \"cvv_match\": \"M\",\n \"metadata\": {},\n \"addendum_data\": {}\n },\n \"errors\": [\"Capture amount cannot be greater then the original authorised amount\"]\n}\n" schema: oneOf: - type: object properties: successful: type: boolean example: true default: true response: type: object properties: authorization: type: string example: '283293' id: type: string example: 071-P-18DBFFCO card_number: type: string example: 512345XXXXXX2346 card_holder: type: string example: Jim Smith card_expiry: type: string example: '2023-05-01' card_token: type: string example: fke86c5u card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 1000 default: 0 decimal_amount: type: integer example: 10 default: 0 successful: type: boolean example: true default: true message: type: string example: Approved reference: type: string example: c10de1d9590fca1d893380c6e039ae71 currency: type: string example: AUD transaction_id: type: string example: 071-P-18DBFFCO settlement_date: type: string example: '2017-06-21' transaction_date: type: string example: '2017-06-21T15:02:46+10:00' response_code: type: string example: '00' captured: type: boolean example: true default: true captured_amount: type: integer example: 1000 default: 0 rrn: type: string example: 071P18DBFFCO cvv_match: type: string example: M metadata: type: object properties: {} addendum_data: type: object properties: {} errors: type: array - type: object properties: successful: type: boolean example: false default: true response: type: object properties: authorization: type: string example: '573449' id: type: string example: 071-P-Y7HDHLT7 card_number: type: string example: 512345XXXXXX2346 card_holder: type: string example: Matthew Savage card_expiry: type: string example: '2030-02-28' card_token: type: string example: fke8n73t card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 10000 default: 0 decimal_amount: type: integer example: 100 default: 0 successful: type: boolean example: true default: true message: type: string example: Approved reference: type: string example: 2c94f2337efe4e4b384a37a8d1e3515a currency: type: string example: AUD transaction_id: type: string example: 071-P-Y7HDHLT7 settlement_date: {} transaction_date: type: string example: '2017-11-30T11:18:09+11:00' response_code: type: string example: '00' captured: type: boolean example: false default: true captured_amount: type: integer example: 0 default: 0 rrn: type: string example: 071PY7HDHLT7 cvv_match: type: string example: M metadata: type: object properties: {} addendum_data: type: object properties: {} errors: type: array items: type: string example: Capture amount cannot be greater then the original authorised amount '422': description: '422' content: text/plain: examples: Result: value: "{\n \"successful\":false,\n \"response\":{\n \"authorization\":\"389973\",\n \"id\":\"071-P-JRQRZ0WV\",\n \"card_number\":\"512345XXXXXX2346\",\n \"card_holder\":\"Jim Smith\",\n \"card_expiry\":\"2023-05-31\",\n \"card_token\":\"0rk3edbr3h66vmk4ghm7\",\n \"card_type\":\"MasterCard\",\n \"card_category\":\"Credit\",\n \"card_subcategory\":\"Standard\",\n \"amount\":1000,\n \"decimal_amount\":10.0,\n \"successful\":true,\n \"message\":\"Approved\",\n \"reference\":\"sdojedmn8723\",\n \"currency\":\"USD\",\n \"transaction_id\":\"071-P-JRQRZ0WV\",\n \"settlement_date\":\"2018-10-01\",\n \"transaction_date\":\"2018-10-01T17:44:21+10:00\",\n \"response_code\":\"00\",\n \"captured\":true,\n \"captured_amount\":1000,\n \"rrn\":\"5b8116dd1c17\",\n \"cvv_match\":\"M\",\n \"metadata\":{},\n \"addendum_data\":{}\n },\n \"errors\":[\"Purchase has already been fully captured\"],\n \"test\":true\n}" schema: type: object properties: successful: type: boolean example: false default: true response: type: object properties: authorization: type: string example: '389973' id: type: string example: 071-P-JRQRZ0WV card_number: type: string example: 512345XXXXXX2346 card_holder: type: string example: Jim Smith card_expiry: type: string example: '2023-05-31' card_token: type: string example: 0rk3edbr3h66vmk4ghm7 card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 1000 default: 0 decimal_amount: type: integer example: 10 default: 0 successful: type: boolean example: true default: true message: type: string example: Approved reference: type: string example: sdojedmn8723 currency: type: string example: USD transaction_id: type: string example: 071-P-JRQRZ0WV settlement_date: type: string example: '2018-10-01' transaction_date: type: string example: '2018-10-01T17:44:21+10:00' response_code: type: string example: '00' captured: type: boolean example: true default: true captured_amount: type: integer example: 1000 default: 0 rrn: type: string example: 5b8116dd1c17 cvv_match: type: string example: M metadata: type: object properties: {} addendum_data: type: object properties: {} errors: type: array items: type: string example: Purchase has already been fully captured test: type: boolean example: true default: true deprecated: false x-readme: code-samples: - language: curl code: "curl https://gateway.pmnts-sandbox.io/v1.0/purchases/071-P-18DBFFCO/capture -u TEST:TEST -d'\n { \n \"amount\": 1000 \n }'" - language: ruby code: FatZebra::Purchase.find('071-P-18DBFFCO').capture samples-languages: - curl - ruby tags: - Purchases /purchases/void: post: summary: Void a purchase description: '' operationId: void-a-purchase parameters: - name: Content-Type in: header schema: type: string default: application/json - name: id in: query description: ID of the purchase to be voided schema: type: string responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"successful\": true,\n \"response\": {\n \"authorization\": \"283293\",\n \"id\": \"071-P-AK1MSTA2\",\n \"card_number\": \"512345XXXXXX2346\",\n \"card_holder\": \"Jim Smith\",\n \"card_expiry\": \"2023-05-01\",\n \"card_token\": \"fke86c5u\",\n \"card_type\": \"MasterCard\",\n \"card_category\": \"Credit\",\n \"card_subcategory\": \"Standard\",\n \"amount\": 10000,\n \"decimal_amount\": 100.0,\n \"successful\": true,\n \"message\": \"Voided\",\n \"reference\": \"c10de1d9590fca1d893380c6e039ae71\",\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-P-AK1MSTA2\",\n \"settlement_date\": \"2017-06-21\",\n \"transaction_date\": \"2017-06-21T15:02:46+10:00\",\n \"response_code\": \"00\",\n \"captured\": true,\n \"captured_amount\": 10000,\n \"rrn\": \"071PAK1MSTA2\",\n \"cvv_match\": \"M\",\n \"metadata\": {},\n \"addendum_data\": {}\n },\n \"errors\": []\n}" schema: type: object properties: successful: type: boolean example: true default: true response: type: object properties: authorization: type: string example: '283293' id: type: string example: 071-P-AK1MSTA2 card_number: type: string example: 512345XXXXXX2346 card_holder: type: string example: Jim Smith card_expiry: type: string example: '2023-05-01' card_token: type: string example: fke86c5u card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 10000 default: 0 decimal_amount: type: integer example: 100 default: 0 successful: type: boolean example: true default: true message: type: string example: Voided reference: type: string example: c10de1d9590fca1d893380c6e039ae71 currency: type: string example: AUD transaction_id: type: string example: 071-P-AK1MSTA2 settlement_date: type: string example: '2017-06-21' transaction_date: type: string example: '2017-06-21T15:02:46+10:00' response_code: type: string example: '00' captured: type: boolean example: true default: true captured_amount: type: integer example: 10000 default: 0 rrn: type: string example: 071PAK1MSTA2 cvv_match: type: string example: M metadata: type: object properties: {} addendum_data: type: object properties: {} errors: type: array '422': description: '422' content: application/json: examples: Result: value: "{\n \"successful\": true,\n \"response\": {\n \"authorization\": \"283293\",\n \"id\": \"071-P-18DBFFCO\",\n \"card_number\": \"512345XXXXXX2346\",\n \"card_holder\": \"Jim Smith\",\n \"card_expiry\": \"2023-05-01\",\n \"card_token\": \"fke86c5u\",\n \"card_type\": \"MasterCard\",\n \"card_category\": \"Credit\",\n \"card_subcategory\": \"Standard\",\n \"amount\": 10000,\n \"decimal_amount\": 100.0,\n \"successful\": false,\n \"message\": \"Not Voided\",\n \"reference\": \"c10de1d9590fca1d893380c6e039ae71\",\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-P-18DBFFCO\",\n \"settlement_date\": \"2017-06-21\",\n \"transaction_date\": \"2017-06-21T15:02:46+10:00\",\n \"response_code\": \"00\",\n \"captured\": true,\n \"captured_amount\": 10000,\n \"rrn\": \"071P18DBFFCO\",\n \"cvv_match\": \"M\",\n \"metadata\": {},\n \"addendum_data\": {}\n },\n \"errors\": []\n}" schema: type: object properties: successful: type: boolean example: true default: true response: type: object properties: authorization: type: string example: '283293' id: type: string example: 071-P-18DBFFCO card_number: type: string example: 512345XXXXXX2346 card_holder: type: string example: Jim Smith card_expiry: type: string example: '2023-05-01' card_token: type: string example: fke86c5u card_type: type: string example: MasterCard card_category: type: string example: Credit card_subcategory: type: string example: Standard amount: type: integer example: 10000 default: 0 decimal_amount: type: integer example: 100 default: 0 successful: type: boolean example: false default: true message: type: string example: Not Voided reference: type: string example: c10de1d9590fca1d893380c6e039ae71 currency: type: string example: AUD transaction_id: type: string example: 071-P-18DBFFCO settlement_date: type: string example: '2017-06-21' transaction_date: type: string example: '2017-06-21T15:02:46+10:00' response_code: type: string example: '00' captured: type: boolean example: true default: true captured_amount: type: integer example: 10000 default: 0 rrn: type: string example: 071P18DBFFCO cvv_match: type: string example: M metadata: type: object properties: {} addendum_data: type: object properties: {} errors: type: array deprecated: false x-readme: code-samples: - language: curl code: curl https://gateway.pmnts-sandbox.io/v1.0/purchases/void\?id\=071-P-AK1MSTA2 -u TEST:TEST -X POST - language: ruby code: FatZebra::Purchase.void('071-P-P7OX5AF6') samples-languages: - curl - ruby tags: - Purchases /purchases/settlement: get: summary: List purchases by settlement description: '' operationId: list-purchases-by-settlement parameters: - name: from in: query required: true schema: type: string format: date - name: to in: query required: true schema: type: string format: date - name: Content-Type in: header description: application/json schema: type: string responses: '200': description: '200' content: application/json: examples: Result: value: "{\n successful: true,\n response: [\n {\n authorization: \"512407\",\n id: \"071-P-P7OX5AF6\",\n card_number: \"512345XXXXXX2346\",\n card_holder: \"Matthew Savage\",\n card_expiry: \"2030-02-28\",\n card_token: \"fke86c5u\",\n card_type: \"MasterCard\",\n card_category: \"Credit\",\n card_subcategory: \"Standard\",\n amount: 10000,\n decimal_amount: 100.0,\n successful: true,\n message: \"Approved\",\n reference: \"73a34343849d71bca9ab1a11225a3139-1\",\n currency: \"AUD\",\n transaction_id: \"071-P-P7OX5AF6\",\n settlement_date: \"2017-07-03\",\n transaction_date: \"2017-07-03T12:39:02+10:00\",\n response_code: \"00\",\n captured: true,\n captured_amount: 10000,\n rrn: \"071PP7OX5AF6\",\n cvv_match: \"M\",\n metadata: {},\n addendum_data: {}\n },\n {\n authorization: \"138504\",\n id: \"071-P-4AXUY9Q4\",\n card_number: \"512345XXXXXX2346\",\n card_holder: \"Matthew Savage\",\n card_expiry: \"2030-02-28\",\n card_token: \"fke86c5u\",\n card_type: \"MasterCard\",\n card_category: \"Credit\",\n card_subcategory: \"Standard\",\n amount: 10000,\n decimal_amount: 100.0,\n successful: true,\n message: \"Approved\",\n reference: \"bfe2f0f43e2f6811161ae7a009b3c840-0\",\n currency: \"AUD\",\n transaction_id: \"071-P-4AXUY9Q4\",\n settlement_date: \"2017-07-03\",\n transaction_date: \"2017-07-03T12:39:01+10:00\",\n response_code: \"00\",\n captured: true,\n captured_amount: 10000,\n rrn: \"071P4AXUY9Q4\",\n cvv_match: \"M\",\n metadata: {},\n addendum_data: {}\n }\n ],\n errors: [],\n records: 2,\n total_records: 2,\n page: 1,\n total_pages: 1\n}\n" '400': description: '400' content: application/json: examples: Result: value: "{\n successful: false,\n response: [],\n errors: ['Params to and from are required']\n}\n" deprecated: false x-readme: code-samples: - language: curl code: curl https://gateway.pmnts-sandbox.io/v1.0/purchases/settlement?from=2017/06/22&to=2017/06/27 -u TEST:TEST - language: ruby code: "FatZebra::Purchase.settlement(\n from: '2017/07/03',\n to: '2017/07/04'\n)" samples-languages: - curl - ruby tags: - Purchases components: securitySchemes: sec0: type: http scheme: basic x-readme: headers: [] explorer-enabled: true proxy-enabled: true x-readme-fauxas: true