{"openapi":"3.1.0","info":{"title":"gateway","version":"1.0"},"servers":[{"url":"https://gateway.pmnts-sandbox.io/v1.0"}],"components":{"securitySchemes":{"sec0":{"type":"http","scheme":"basic"}}},"security":[{"sec0":[]}],"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"]}},"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"]}}},"/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"]}}},"/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"]}}},"/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"]}}},"/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"]}}},"/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"]}}},"/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"]}}},"/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"]}},"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"]}},"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"]}}},"/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"]}}},"/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"]}}},"/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"]}}},"/credit_cards":{"post":{"summary":"Tokenize a card","description":"Tokenizes a card within the system, returning a token that can be used for subsequent transactions.","operationId":"tokenize-a-card","responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"token\": \"abcdef\",\n \"card_holder\": \"Bob Smitch\",\n \"card_number\": \"512345XXXXXX2346\",\n \"card_expiry\": \"2030-05-31\",\n \"card_type\": \"MasterCard\",\n \"card_category\": \"Credit\",\n \"card_subcategory\": \"Credit\",\n \"card_issuer\": \"Westpac\",\n \"card_country\": \"Australia\",\n \"authorized\": true,\n \"transaction_count\": 0,\n \"alias\": null\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"token":{"type":"string","example":"abcdef"},"card_holder":{"type":"string","example":"Bob Smitch"},"card_number":{"type":"string","example":"512345XXXXXX2346"},"card_expiry":{"type":"string","example":"2030-05-31"},"card_type":{"type":"string","example":"MasterCard"},"card_category":{"type":"string","example":"Credit"},"card_subcategory":{"type":"string","example":"Credit"},"card_issuer":{"type":"string","example":"Westpac"},"card_country":{"type":"string","example":"Australia"},"authorized":{"type":"boolean","example":true,"default":true},"transaction_count":{"type":"integer","example":0,"default":0},"alias":{}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"422":{"description":"422","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {\n \"token\": null,\n \"card_holder\": \"\",\n \"scheme_token_status\": \"Failed\",\n \"scheme_token_ready\": false,\n \"scheme_response_id\": \"16660930105abc\",\n \"request_timestamp\": \"2022-10-18T11:36:51+00:00\",\n \"issuer_decision\": null\n },\n \"errors\": [\n \"Invalid Push Account Receipt\"\n ],\n \"test\": false\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{"token":{},"card_holder":{"type":"string","example":""},"scheme_token_status":{"type":"string","example":"Failed"},"scheme_token_ready":{"type":"boolean","example":false,"default":true},"scheme_response_id":{"type":"string","example":"16660930105abc"},"request_timestamp":{"type":"string","example":"2022-10-18T11:36:51+00:00"},"issuer_decision":{}}},"errors":{"type":"array","items":{"type":"string","example":"Invalid Push Account Receipt"}},"test":{"type":"boolean","example":false,"default":true}}}}}}},"deprecated":false,"requestBody":{"content":{"application/json":{"schema":{"properties":{"card_number":{"type":"string","description":"Number on the card"},"card_holder":{"type":"string","description":"Name on the card"},"card_expiry":{"type":"string","description":"Card expiry date; format: MM/YYYY"},"cvv":{"type":"string","description":"CVV of the card"},"alias":{"type":"string","description":"Alias to associate with the card"},"is_billing":{"type":"boolean","default":"false","description":"For Recurring transactions this field can be included set to true, which will make the cvv field optional"},"customer_id":{"type":"string","example":"071-C-ABC123","description":"The Fat Zebra ID of an existing customer to link this card to, in the form 071-C-ABC123. When supplied, the tokenized card is associated with that customer."},"make_default":{"type":"boolean","default":false,"description":"Only applies when customer_id is supplied. When true, this card becomes the customer's default credit card."}},"type":"object","required":["card_number","card_holder","card_expiry","cvv"]}}}},"x-readme":{"code-samples":[{"code":"curl https://gateway.pmnts-sandbox.io/v1.0/credit_cards -u TEST:TEST -d'\n {\n \"card_number\": \"5123456789012346\",\n \"card_holder\": \"Bob Smith\",\n \"card_expiry\": \"05/2030\",\n \"cvv\": \"987\"\n }'","language":"shell","name":""},{"code":"curl https://gateway.pmnts-sandbox.io/v1.0/credit_cards -u TEST:TEST -d'\n {\n \"card_number\": \"5123456789012346\",\n \"card_holder\": \"Bob Smith\",\n \"card_expiry\": \"05/2030\",\n \"cvv\": \"987\",\n \"customer_id\": \"071-C-ABC123\",\n \"make_default\": true\n }'","language":"shell","name":"Link to a customer"},{"code":"FatZebra::Card.create(\n card_holder: \"Bob Smith\",\n card_number: \"5123456789012346\",\n card_expiry: \"05/2030\",\n cvv: \"987\"\n)","language":"ruby","name":""}],"samples-languages":["shell","ruby"]}},"get":{"summary":"List tokenized cards","description":"List tokenized cards","operationId":"list-tokenized-cards","parameters":[{"name":"offset","in":"query","description":"Page number to return","schema":{"type":"integer","format":"int32","default":1}},{"name":"limit","in":"query","description":"Max number of results to return","schema":{"type":"integer","format":"int32","default":10}},{"name":"from","in":"query","description":"Lower bound for the time at which the card was tokenized","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","description":"Upper bound for the time at which the card was tokenized","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\":true,\n \"response\":[\n {\n \"token\":\"fke8uf71\",\n \"card_holder\":\"Joe Bloggs\",\n \"card_number\":\"400555XXXXXX0001\",\n \"card_expiry\":\"2023-11-30\",\n \"card_type\":\"VISA\",\n \"card_category\":\"Credit\",\n \"card_subcategory\":\"Standard\",\n \"card_issuer\":\"Jpmorgan Chase Bank, N.A.\",\n \"card_country\":\"United States\",\n \"authorized\":true,\n \"transaction_count\":1,\n \"alias\":\"NewAlias123\"\n },\n {\n \"token\":\"fke8n04t\",\n \"card_holder\":\"Bob Smith\",\n \"card_number\":\"512345XXXXXX2346\",\n \"card_expiry\":\"2030-05-31\",\n \"card_type\":\"MasterCard\",\n \"card_category\":\"Credit\",\n \"card_subcategory\":\"Standard\",\n \"card_issuer\":\"Banco Del Pichincha, C.A.\",\n \"card_country\":\"Ecuador\",\n \"authorized\":true,\n \"transaction_count\":0,\n \"alias\":null\n }\n ],\n \"errors\":[],\n \"test\":true,\n \"records\":2,\n \"total_records\":1529543,\n \"page\":1,\n \"total_pages\":764772\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string","example":"fke8uf71"},"card_holder":{"type":"string","example":"Joe Bloggs"},"card_number":{"type":"string","example":"400555XXXXXX0001"},"card_expiry":{"type":"string","example":"2023-11-30"},"card_type":{"type":"string","example":"VISA"},"card_category":{"type":"string","example":"Credit"},"card_subcategory":{"type":"string","example":"Standard"},"card_issuer":{"type":"string","example":"Jpmorgan Chase Bank, N.A."},"card_country":{"type":"string","example":"United States"},"authorized":{"type":"boolean","example":true,"default":true},"transaction_count":{"type":"integer","example":1,"default":0},"alias":{"type":"string","example":"NewAlias123"}}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true},"records":{"type":"integer","example":2,"default":0},"total_records":{"type":"integer","example":1529543,"default":0},"page":{"type":"integer","example":1,"default":0},"total_pages":{"type":"integer","example":764772,"default":0}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/credit_cards?limit=2 -u TEST:TEST"}],"samples-languages":["curl"]}}},"/credit_cards/":{"post":{"summary":"Tokenize a card with wallet credentials","description":"","operationId":"tokenize-a-card-with-wallet-credentials","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The wallet type. Current accepted values are VISA, MASTERPASS, AMEX, GOOGLE, APPLE."},"callid":{"type":"string","description":"(Visa Checkout only)"},"checkout_identifier":{"type":"string","description":"(Masterpass only)"},"oauth_token":{"type":"string","description":"(Masterpass only)"},"oauth_verifier":{"type":"string","description":"(Masterpass only)"},"auth_code":{"type":"string","description":"(Amex only)"},"transaction_id":{"type":"string","description":"(Amex only)"},"wallet_id":{"type":"string","description":"(Amex only)"},"card_type":{"type":"string","description":"(Amex only)"}}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"token\": \"3vcfuipz\",\n \"card_holder\": \"Mark Smith\",\n \"card_number\": \"424242XXXXXX4242\",\n \"card_expiry\": \"2018-05-31T23:59:59+10:00\",\n \"authorized\": true,\n \"transaction_count\": 0,\n \"wallet\": {\n \"name\": {\n \"first\": \"Mark\",\n \"last\": \"Smith\"\n },\n \"address\": {\n \"line_1\": \"1 Test Road\",\n \"line_2\": null,\n \"city\": \"Sydney\",\n \"state\": \"NSW\",\n \"postcode\": \"2000\",\n \"phone\": \"0298985412\"\n },\n \"email\": \"email@example.com\",\n \"card_source_reference\": \"4495316156201826481\"\n }\n },\n \"errors\": [\n ],\n \"test\": false\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"token":{"type":"string","example":"3vcfuipz"},"card_holder":{"type":"string","example":"Mark Smith"},"card_number":{"type":"string","example":"424242XXXXXX4242"},"card_expiry":{"type":"string","example":"2018-05-31T23:59:59+10:00"},"authorized":{"type":"boolean","example":true,"default":true},"transaction_count":{"type":"integer","example":0,"default":0},"wallet":{"type":"object","properties":{"name":{"type":"object","properties":{"first":{"type":"string","example":"Mark"},"last":{"type":"string","example":"Smith"}}},"address":{"type":"object","properties":{"line_1":{"type":"string","example":"1 Test Road"},"line_2":{},"city":{"type":"string","example":"Sydney"},"state":{"type":"string","example":"NSW"},"postcode":{"type":"string","example":"2000"},"phone":{"type":"string","example":"0298985412"}}},"email":{"type":"string","example":"email@example.com"},"card_source_reference":{"type":"string","example":"4495316156201826481"}}}}},"errors":{"type":"array"},"test":{"type":"boolean","example":false,"default":true}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/credit_cards -u TEST:TEST -d'\n {\n \"wallet\": {\n \"type\": \"VISA\",\n \"callid\": \"4495316156201826481\"\n }\n }'"},{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/credit_cards -u TEST:TEST -d'\n {\n \"wallet\": {\n \"type\": \"GOOGLE\",\n \"token\": {\n \"signature\": \"value\",\n \"intermediateSigningKey\": {\n \"signedKey\": \"value\",\n \"signatures\": [\"value\"]\n },\n \"protocolVersion\": \"ECv2\",\n \"signedMessage\": \"value\"\n }\n }\n }'","name":"cURL (Google Pay™)"},{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/credit_cards -u TEST:TEST -d'\n {\n \"wallet\": {\n \"type\":\"APPLE\",\n \"token\": {\n \"paymentData\": {\n \"test\" :\"value\"\n }\n }\n }\n }'","name":"cURL (Apple Pay)"}],"samples-languages":["curl"]}}},"/credit_cards/{token_or_alias}":{"put":{"summary":"Update a tokenized card","description":"Update an existing card","operationId":"update-a-tokenized-card","parameters":[{"name":"token_or_alias","in":"path","description":"Token or alias of the card to update","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"card_expiry":{"type":"string","description":"Expiry on the card"},"alias":{"type":"string","description":"Alias to associate with the card. **Note**: if the alias specified already exists on another card, it will be removed from the other card and added to this card."}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"token\": \"fke8jmra\",\n \"card_holder\": \"Bob Smith\",\n \"card_number\": \"512345XXXXXX2346\",\n \"card_expiry\": \"2023-11-30\",\n \"card_type\": \"MasterCard\",\n \"card_category\": \"Credit\",\n \"card_subcategory\": \"Standard\",\n \"card_issuer\": \"Banco Del Pichincha, C.A.\",\n \"card_country\": \"Ecuador\",\n \"authorized\": true,\n \"transaction_count\": 0,\n \"alias\": \"NewAlias123\"\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"token":{"type":"string","example":"fke8jmra"},"card_holder":{"type":"string","example":"Bob Smith"},"card_number":{"type":"string","example":"512345XXXXXX2346"},"card_expiry":{"type":"string","example":"2023-11-30"},"card_type":{"type":"string","example":"MasterCard"},"card_category":{"type":"string","example":"Credit"},"card_subcategory":{"type":"string","example":"Standard"},"card_issuer":{"type":"string","example":"Banco Del Pichincha, C.A."},"card_country":{"type":"string","example":"Ecuador"},"authorized":{"type":"boolean","example":true,"default":true},"transaction_count":{"type":"integer","example":0,"default":0},"alias":{"type":"string","example":"NewAlias123"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/credit_cards/fke8jmra -X PUT -u TEST:TEST -d'\n {\n \"card_expiry\": \"11/2023\",\n \"alias\": \"NewAlias123\" \n }'"}],"samples-languages":["curl"]}},"get":{"summary":"Fetch a tokenized card","description":"","operationId":"fetch-a-tokenized-card","parameters":[{"name":"token_or_alias","in":"path","description":"Token or alias of the card","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"token\": \"fke81qwe\",\n \"card_holder\": \"Card Holder\",\n \"card_number\": \"411111XXXXXX1111\",\n \"card_expiry\": \"2022-12-31\",\n \"card_type\": \"VISA\",\n \"card_category\": \"Credit\",\n \"card_subcategory\": \"Credit\",\n \"card_issuer\": \"Jpmorgan Chase Bank, N.A.\",\n \"card_country\": \"United States\",\n \"authorized\": true,\n \"transaction_count\": 1,\n \"alias\": null\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"token":{"type":"string","example":"fke81qwe"},"card_holder":{"type":"string","example":"Card Holder"},"card_number":{"type":"string","example":"411111XXXXXX1111"},"card_expiry":{"type":"string","example":"2022-12-31"},"card_type":{"type":"string","example":"VISA"},"card_category":{"type":"string","example":"Credit"},"card_subcategory":{"type":"string","example":"Credit"},"card_issuer":{"type":"string","example":"Jpmorgan Chase Bank, N.A."},"card_country":{"type":"string","example":"United States"},"authorized":{"type":"boolean","example":true,"default":true},"transaction_count":{"type":"integer","example":1,"default":0},"alias":{}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": null,\n \"errors\": [\n \"Record not found\"\n ],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{},"errors":{"type":"array","items":{"type":"string","example":"Record not found"}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/credit_cards/fke81qwe -u TEST:TEST"}],"samples-languages":["curl"]}},"delete":{"summary":"Delete an MDES Token Connect tokenized card","description":"Deactivates a scheme-tokenized card. Currently only supported for cards tokenized via MDES Token Connect; other card types return a 400.","operationId":"delete-an-mdes-token-connect-tokenized-card","parameters":[{"name":"token_or_alias","in":"path","description":"Token or alias of the card to delete","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"test\": true\n}"},"nil response":{"value":"{\n \"successful\": false,\n \"response\": null,\n \"errors\": [\n \"Action is not supported for this card type\"\n ],\n \"test\": false\n}"}},"schema":{"oneOf":[{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"test":{"type":"boolean","example":true,"default":true}}},{"title":"nil response","type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{},"errors":{"type":"array","items":{"type":"string","example":"Action is not supported for this card type"}},"test":{"type":"boolean","example":false,"default":true}}}]}}}}},"deprecated":false}},"/refunds":{"post":{"summary":"Issue a refund","description":"Issue a refund against a purchase or standalone","operationId":"issue-a-refund","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["amount","reference"],"properties":{"amount":{"type":"integer","description":"A positive integer representing how much to refund, in the smallest currency unit (e.g. 100 to charge $1.00, or 100 to Charge ¥100, a zero decimal currency).","format":"int32"},"reference":{"type":"string","description":"Merchant's reference for the refund. Must be unique per refund. Max length 255 characters."},"transaction_id":{"type":"string","description":"ID of the original transaction to be refunded (XXX-P-YYYYYY). Required for an associated refund."},"card_token":{"type":"string","description":"Token of the card being refunded. Required unless transaction_id or card details are provided."},"card_number":{"type":"string","description":"Number of the card being refunded. Required unless transaction_id or card_token are provided."},"card_expiry":{"type":"string","description":"Expiry of the card being refunded. Required unless transaction_id or card_token are provided."},"card_holder":{"type":"string","description":"Name on the card being refunded. Required unless transaction_id or card_token are provided."},"description":{"type":"string","description":"Description for the refund."},"currency":{"type":"string","description":"Currency being refunded. Ignored if transaction_id is present.","default":"AUD"},"descriptor":{"type":"string","description":"Description that appears on the customer's statement."},"extra":{"type":"object","description":"Extra data for the refund.","properties":{}},"metadata":{"type":"object","description":"Metadata for the refund.","properties":{}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"authorization\": \"1536806650\",\n \"id\": \"071-R-6RQJEWXV\",\n \"amount\": 50,\n \"refunded\": \"Approved\",\n \"message\": \"Approved\",\n \"card_holder\": \"Jim Smith\",\n \"card_number\": \"512345XXXXXX2346\",\n \"card_expiry\": \"2023-05-31\",\n \"card_type\": \"MasterCard\",\n \"transaction_id\": \"071-R-6RQJEWXV\",\n \"reference\": \"ed67e06731a2f98e8f5b3f5bc8540b80\",\n \"currency\": \"USD\",\n \"successful\": true,\n \"transaction_date\": \"2018-09-13T12:44:10+10:00\",\n \"response_code\": \"00\",\n \"settlement_date\": \"2018-09-14\",\n \"metadata\": {},\n \"standalone\": false,\n \"rrn\": \"071R6RQJEWXV\"\n },\n \"errors\": [],\n \"test\": true\n}"},"With missing parameter error":{"value":"{\n \"successful\":false,\n \"response\":{\n \"authorization\":null,\n \"id\":null,\n \"amount\":null,\n \"refunded\":\"Error\",\n \"message\":null,\n \"card_holder\":\"Jim Smith\",\n \"card_number\":\"512345XXXXXX2346\",\n \"card_expiry\":\"2023-05-31\",\n \"card_type\":\"MasterCard\",\n \"transaction_id\":null,\n \"reference\":\"\",\n \"currency\":\"USD\",\n \"successful\":false,\n \"transaction_date\":null,\n \"response_code\":\"99\",\n \"settlement_date\":null,\n \"metadata\":{},\n \"standalone\":false,\n \"rrn\":null\n },\n \"errors\":[\n \"Reference can't be blank\"\n ],\n \"test\":true\n}"},"With invalid transaction ID":{"value":"{\n \"successful\":false,\n \"response\":{},\n \"errors\":[\n \t\"Original transaction could not be found\"\n ],\n \"test\":true\n}"}},"schema":{"oneOf":[{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"authorization":{"type":"string","example":"1536806650"},"id":{"type":"string","example":"071-R-6RQJEWXV"},"amount":{"type":"integer","example":50,"default":0},"refunded":{"type":"string","example":"Approved"},"message":{"type":"string","example":"Approved"},"card_holder":{"type":"string","example":"Jim Smith"},"card_number":{"type":"string","example":"512345XXXXXX2346"},"card_expiry":{"type":"string","example":"2023-05-31"},"card_type":{"type":"string","example":"MasterCard"},"transaction_id":{"type":"string","example":"071-R-6RQJEWXV"},"reference":{"type":"string","example":"ed67e06731a2f98e8f5b3f5bc8540b80"},"currency":{"type":"string","example":"USD"},"successful":{"type":"boolean","example":true,"default":true},"transaction_date":{"type":"string","example":"2018-09-13T12:44:10+10:00"},"response_code":{"type":"string","example":"00"},"settlement_date":{"type":"string","example":"2018-09-14"},"metadata":{"type":"object","properties":{}},"standalone":{"type":"boolean","example":false,"default":true},"rrn":{"type":"string","example":"071R6RQJEWXV"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}},{"title":"With missing parameter error","type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{"authorization":{},"id":{},"amount":{},"refunded":{"type":"string","example":"Error"},"message":{},"card_holder":{"type":"string","example":"Jim Smith"},"card_number":{"type":"string","example":"512345XXXXXX2346"},"card_expiry":{"type":"string","example":"2023-05-31"},"card_type":{"type":"string","example":"MasterCard"},"transaction_id":{},"reference":{"type":"string","example":""},"currency":{"type":"string","example":"USD"},"successful":{"type":"boolean","example":false,"default":true},"transaction_date":{},"response_code":{"type":"string","example":"99"},"settlement_date":{},"metadata":{"type":"object","properties":{}},"standalone":{"type":"boolean","example":false,"default":true},"rrn":{}}},"errors":{"type":"array","items":{"type":"string","example":"Reference can't be blank"}},"test":{"type":"boolean","example":true,"default":true}}},{"title":"With invalid transaction ID","type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{}},"errors":{"type":"array","items":{"type":"string","example":"Original transaction could not be found"}},"test":{"type":"boolean","example":true,"default":true}}}]}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/refunds -u TEST:TEST -d'\n{\n \"transaction_id\": \"071-P-HEJJINFO\",\n \"amount\": 50,\n \"reference\": \"ed67e06731a2f98e8f5b3f5bc8540b80\"\n}'","name":"cURL - Associated"},{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/refunds -u TEST:TEST -d'\n{\n \"card_token\": \"fke81qwe\",\n \"amount\": 349,\n \"reference\": \"18jfjh280\"\n}'","name":"cURL - Standalone"}],"samples-languages":["curl"]}},"get":{"summary":"List refunds","description":"","operationId":"list-refunds","parameters":[{"name":"offset","in":"query","description":"Page number to return","schema":{"type":"integer","format":"int32"}},{"name":"limit","in":"query","description":"Max number of results to return","schema":{"type":"integer","format":"int32"}},{"name":"from","in":"query","description":"Lower bound for the time at which the refund was created","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","description":"Upper bound for the time at which the refund was created","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\":true,\n \"response\":[\n {\n \"authorization\":\"1531284422\",\n \"id\":\"071-R-ZXZV2IQA\",\n \"amount\":349,\n \"refunded\":\"Approved\",\n \"message\":\"Approved\",\n \"card_holder\":\"Card Holder\",\n \"card_number\":\"411111XXXXXX1111\",\n \"card_expiry\":\"2022-12-31\",\n \"card_type\":\"VISA\",\n \"transaction_id\":\"071-R-ZXZV2IQA\",\n \"reference\":\"18jfjh280\",\n \"currency\":\"AUD\",\n \"successful\":true,\n \"transaction_date\":\"2018-07-11T14:47:02+10:00\",\n \"response_code\":\"00\",\n \"settlement_date\":\"2018-07-12\",\n \"metadata\":{},\n \"standalone\":true,\n \"rrn\":\"071RZXZV2IQA\"\n },\n {\n \"authorization\":\"1531280232\",\n \"id\":\"071-R-PKC3V565\",\n \"amount\":1,\n \"refunded\":\"Approved\",\n \"message\":\"Approved\",\n \"card_holder\":\"Card holder name\",\n \"card_number\":\"512345XXXXXX2346\",\n \"card_expiry\":\"2023-05-31\",\n \"card_type\":\"MasterCard\",\n \"transaction_id\":\"071-R-PKC3V565\",\n \"reference\":\"xxxxx\",\n \"currency\":\"AUD\",\n \"successful\":true,\n \"transaction_date\":\"2018-07-11T13:37:12+10:00\",\n \"response_code\":\"00\",\n \"settlement_date\":\"2018-07-12\",\n \"metadata\":{},\n \"standalone\":false,\n \"rrn\":\"071RPKC3V565\"\n }\n ],\n \"errors\":[],\n \"test\":true,\n \"records\":2,\n \"total_records\":23466,\n \"page\":1,\n \"total_pages\":11733\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"array","items":{"type":"object","properties":{"authorization":{"type":"string","example":"1531284422"},"id":{"type":"string","example":"071-R-ZXZV2IQA"},"amount":{"type":"integer","example":349,"default":0},"refunded":{"type":"string","example":"Approved"},"message":{"type":"string","example":"Approved"},"card_holder":{"type":"string","example":"Card Holder"},"card_number":{"type":"string","example":"411111XXXXXX1111"},"card_expiry":{"type":"string","example":"2022-12-31"},"card_type":{"type":"string","example":"VISA"},"transaction_id":{"type":"string","example":"071-R-ZXZV2IQA"},"reference":{"type":"string","example":"18jfjh280"},"currency":{"type":"string","example":"AUD"},"successful":{"type":"boolean","example":true,"default":true},"transaction_date":{"type":"string","example":"2018-07-11T14:47:02+10:00"},"response_code":{"type":"string","example":"00"},"settlement_date":{"type":"string","example":"2018-07-12"},"metadata":{"type":"object","properties":{}},"standalone":{"type":"boolean","example":true,"default":true},"rrn":{"type":"string","example":"071RZXZV2IQA"}}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true},"records":{"type":"integer","example":2,"default":0},"total_records":{"type":"integer","example":23466,"default":0},"page":{"type":"integer","example":1,"default":0},"total_pages":{"type":"integer","example":11733,"default":0}}}},"text/plain":{"examples":{"Result":{"value":"[# JSON: {\n \"authorization\": \"1529728340\",\n \"id\": \"071-R-S6KCRS76\",\n \"amount\": 100,\n \"refunded\": \"Approved\",\n \"message\": \"Approved\",\n \"card_holder\": \"Card Holder\",\n \"card_number\": \"411111XXXXXX1111\",\n \"card_expiry\": \"2022-12-31\",\n \"card_type\": \"VISA\",\n \"transaction_id\": \"071-R-S6KCRS76\",\n \"reference\": \"gw9rvxvv\",\n \"currency\": \"AUD\",\n \"successful\": true,\n \"transaction_date\": \"2018-06-23T14:32:20+10:00\",\n \"response_code\": \"00\",\n \"settlement_date\": \"2018-06-24\",\n \"metadata\": {\n },\n \"standalone\": true,\n \"rrn\": \"071RS6KCRS76\"\n}]"}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/refunds?limit=2 -u TEST:TEST"},{"language":"ruby","code":"FatZebra::Refund.search(limit: 1).data"}],"samples-languages":["curl","ruby"]}}},"/refunds/void":{"post":{"summary":"Void a refund","description":"","operationId":"void-a-refund","parameters":[{"name":"id","in":"query","description":"ID of the refund","schema":{"type":"string"}},{"name":"reference","in":"query","description":"Reference of the refund","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\":true,\n \"response\":{\n \"authorization\":\"1531280232\",\n \"id\":\"071-R-PKC3V565\",\n \"amount\":1,\n \"refunded\":\"Voided\",\n \"message\":\"Voided\",\n \"card_holder\":\"Card holder name\",\n \"card_number\":\"512345XXXXXX2346\",\n \"card_expiry\":\"2023-05-31\",\n \"card_type\":\"MasterCard\",\n \"transaction_id\":\"071-R-PKC3V565\",\n \"reference\":\"xxxxx\",\n \"currency\":\"AUD\",\n \"successful\":false,\n \"transaction_date\":\"2018-07-11T13:37:12+10:00\",\n \"response_code\":\"00\",\n \"settlement_date\":\"2018-07-12\",\n \"metadata\":{},\n \"standalone\":false,\n \"rrn\":\"071RPKC3V565\"\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":"1531280232"},"id":{"type":"string","example":"071-R-PKC3V565"},"amount":{"type":"integer","example":1,"default":0},"refunded":{"type":"string","example":"Voided"},"message":{"type":"string","example":"Voided"},"card_holder":{"type":"string","example":"Card holder name"},"card_number":{"type":"string","example":"512345XXXXXX2346"},"card_expiry":{"type":"string","example":"2023-05-31"},"card_type":{"type":"string","example":"MasterCard"},"transaction_id":{"type":"string","example":"071-R-PKC3V565"},"reference":{"type":"string","example":"xxxxx"},"currency":{"type":"string","example":"AUD"},"successful":{"type":"boolean","example":false,"default":true},"transaction_date":{"type":"string","example":"2018-07-11T13:37:12+10:00"},"response_code":{"type":"string","example":"00"},"settlement_date":{"type":"string","example":"2018-07-12"},"metadata":{"type":"object","properties":{}},"standalone":{"type":"boolean","example":false,"default":true},"rrn":{"type":"string","example":"071RPKC3V565"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}},"text/plain":{"examples":{"Result":{"value":"# JSON: {\n \"authorization\": \"1529707424\",\n \"id\": \"071-R-6Y0X64V7\",\n \"amount\": 100,\n \"refunded\": \"Voided\",\n \"message\": \"Voided\",\n \"card_holder\": \"Card Holder\",\n \"card_number\": \"411111XXXXXX1111\",\n \"card_expiry\": \"2022-12-31\",\n \"card_type\": \"VISA\",\n \"transaction_id\": \"071-R-6Y0X64V7\",\n \"reference\": \"00gtyw0b\",\n \"currency\": \"AUD\",\n \"successful\": false,\n \"transaction_date\": \"2018-06-23T08:43:44+10:00\",\n \"response_code\": \"00\",\n \"settlement_date\": \"2018-06-24\",\n \"metadata\": {\n },\n \"standalone\": true,\n \"rrn\": \"071R6Y0X64V7\"\n}"}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\":false,\n \"response\":{},\n \"errors\":[\n \"Could not find Refund\"\n ],\n \"test\":true\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 Refund"}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/refunds/void?id=071-R-PKC3V565 -X POST -u TEST:TEST"},{"language":"ruby","code":"FatZebra::Refund.void('071-R-6Y0X64V7')"}],"samples-languages":["curl","ruby"]}}},"/refunds/{id}":{"get":{"summary":"Fetch a refund","description":"","operationId":"fetch-a-refund","parameters":[{"name":"id","in":"path","description":"The ID or reference of the refund.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"authorization\": \"1441241970\",\n \"id\": \"071-R-KATMZP3\",\n \"amount\": 349,\n \"refunded\": \"Approved\",\n \"message\": \"Approved\",\n \"card_holder\": \"Jim Smith\",\n \"card_number\": \"512345XXXXXX2346\",\n \"card_expiry\": \"2023-05-31\",\n \"card_type\": \"MasterCard\",\n \"transaction_id\": \"071-R-KATMZP3\",\n \"reference\": \"18280\",\n \"currency\": \"USD\",\n \"successful\": true,\n \"transaction_date\": \"2015-09-03T10:59:30+10:00\",\n \"response_code\": \"00\",\n \"settlement_date\": \"2015-09-04\",\n \"metadata\": {\n },\n \"standalone\": false,\n \"rrn\": \"071RKATMZP3\"\n },\n \"errors\": [\n ],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"authorization":{"type":"string","example":"1441241970"},"id":{"type":"string","example":"071-R-KATMZP3"},"amount":{"type":"integer","example":349,"default":0},"refunded":{"type":"string","example":"Approved"},"message":{"type":"string","example":"Approved"},"card_holder":{"type":"string","example":"Jim Smith"},"card_number":{"type":"string","example":"512345XXXXXX2346"},"card_expiry":{"type":"string","example":"2023-05-31"},"card_type":{"type":"string","example":"MasterCard"},"transaction_id":{"type":"string","example":"071-R-KATMZP3"},"reference":{"type":"string","example":"18280"},"currency":{"type":"string","example":"USD"},"successful":{"type":"boolean","example":true,"default":true},"transaction_date":{"type":"string","example":"2015-09-03T10:59:30+10:00"},"response_code":{"type":"string","example":"00"},"settlement_date":{"type":"string","example":"2015-09-04"},"metadata":{"type":"object","properties":{}},"standalone":{"type":"boolean","example":false,"default":true},"rrn":{"type":"string","example":"071RKATMZP3"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\":false,\n \"response\":{},\n \"errors\":[\n \"Refund could not be found\"\n ],\n \"test\":true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{}},"errors":{"type":"array","items":{"type":"string","example":"Refund could not be found"}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/refunds/071-R-KATMZP3 -u TEST:TEST"}],"samples-languages":["curl"]}}},"/direct_debits":{"post":{"summary":"Create a direct debit","description":"","operationId":"create-a-direct-debit","parameters":[{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["description","amount","bsb","account_name","account_number"],"properties":{"description":{"type":"string","description":"Must be unique. Max 18 characters, allowed chars are A-Z, 0-9, period, hyphen, ampersand, and underscore. It is recommended you make this descriptive for your customer - e.g. Invoice ABCD123."},"amount":{"type":"number","description":"Amount. Minimum 0.01, positive only.","format":"float"},"bsb":{"type":"string","description":"The source account's BSB number. Format: `###-###`"},"account_name":{"type":"string","description":"The source account name. Max 32 characters."},"account_number":{"type":"string","description":"The source account number. Max 9 digits."},"date":{"type":"string","description":"Date of the direct debit. Optional but recommended. Defaults to the next processing period (current day if before 17:00, next day if after). Must be in the future.","format":"date"},"reference":{"type":"string","description":"Unique reference"},"metadata":{"type":"object","description":"Metadata of the direct debit","properties":{}},"bank_account":{"type":"string","description":"The Fat Zebra bank account ID to be used in place of `account_name`, `account_number`, and `bsb`. If `bank_account` is supplied, the other attributes should be omitted."}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-DD-L4M3SN0E\",\n \"amount\": 42.0,\n \"bsb\": \"123-123\",\n \"account_number\": \"012345678\",\n \"account_name\": \"Test\",\n \"description\": \"Confirmation\",\n \"reference\": \"071-DD-L4M3SN0E\",\n \"date\": \"2018-09-14\",\n \"process_date\": null,\n \"status\": \"New\",\n \"result\": null,\n \"metadata\": null\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-DD-L4M3SN0E"},"amount":{"type":"integer","example":42,"default":0},"bsb":{"type":"string","example":"123-123"},"account_number":{"type":"string","example":"012345678"},"account_name":{"type":"string","example":"Test"},"description":{"type":"string","example":"Confirmation"},"reference":{"type":"string","example":"071-DD-L4M3SN0E"},"date":{"type":"string","example":"2018-09-14"},"process_date":{},"status":{"type":"string","example":"New"},"result":{},"metadata":{}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"422":{"description":"422","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\n \"Could not find bank account 071-B-ABC123\"\n ],\n \"test\": true\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 bank account 071-B-ABC123"}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/direct_debits -u TEST:TEST -d'\n { \n \"description\":\"Confirmation\", \n \"amount\":42, \n \"bsb\":\"123-123\", \n \"account_name\":\"Test\", \n \"account_number\":\"012345678\"\n }'"},{"language":"ruby","code":"FatZebra::DirectDebit.create(\n description: 'Confirmation',\n amount: 42,\n bsb: '123-123',\n account_name: 'Test',\n account_number: '012345678'\n)"}],"samples-languages":["curl","ruby"]}},"get":{"summary":"List direct debits","description":"","operationId":"list-direct-debits","parameters":[{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}},{"name":"offset","in":"query","description":"Page number to return","schema":{"type":"integer","format":"int32","default":1}},{"name":"limit","in":"query","description":"Max number of results to return","schema":{"type":"integer","format":"int32","default":10}},{"name":"from","in":"query","description":"Lower bound for the time at which the direct debit was created","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"Upper bound for the time at which the direct debit was created","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": [\n {\n \"id\": \"071-DD-RDOR6I3K\",\n \"amount\": 10,\n \"bsb\": \"083-832\",\n \"account_number\": \"181843123\",\n \"account_name\": \"James Smith\",\n \"description\": \"test\",\n \"reference\": \"RMT1636366033\",\n \"date\": \"2018-09-21\",\n \"process_date\": null,\n \"status\": \"New\",\n \"result\": null,\n \"metadata\": null\n },\n {\n \"id\": \"071-DD-ULX5DGSW\",\n \"amount\": 10,\n \"bsb\": \"083-832\",\n \"account_number\": \"181843123\",\n \"account_name\": \"James Smith\",\n \"description\": \"test\",\n \"reference\": \"RMT1636366032\",\n \"date\": \"2018-09-14\",\n \"process_date\": null,\n \"status\": \"New\",\n \"result\": null,\n \"metadata\": null\n }\n ],\n \"errors\": [],\n \"test\": true,\n \"records\": 2,\n \"total_records\": 16582,\n \"page\": 1,\n \"total_pages\": 8291\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"071-DD-RDOR6I3K"},"amount":{"type":"integer","example":10,"default":0},"bsb":{"type":"string","example":"083-832"},"account_number":{"type":"string","example":"181843123"},"account_name":{"type":"string","example":"James Smith"},"description":{"type":"string","example":"test"},"reference":{"type":"string","example":"RMT1636366033"},"date":{"type":"string","example":"2018-09-21"},"process_date":{},"status":{"type":"string","example":"New"},"result":{},"metadata":{}}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true},"records":{"type":"integer","example":2,"default":0},"total_records":{"type":"integer","example":16582,"default":0},"page":{"type":"integer","example":1,"default":0},"total_pages":{"type":"integer","example":8291,"default":0}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl 'https://gateway.pmnts-sandbox.io/v1.0/direct_debits?limit=2&offset=1' -u TEST:TEST"},{"language":"ruby","code":"FatZebra::DirectDebit.search"}],"samples-languages":["curl","ruby"]}}},"/direct_debits/{id}":{"put":{"summary":"Update a direct debit","description":"A direct debit can be updated if it has a status of `New`. Once direct debits have been submitted to the financial institution, they are locked and can only be updated by the Fat Zebra system.","operationId":"update-a-direct-debit","parameters":[{"name":"id","in":"path","description":"ID of the direct debit","schema":{"type":"string"},"required":true},{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","description":"Max 18 characters, allowed chars are A-Z, 0-9, period, hyphen, ampersand, and underscore."},"amount":{"type":"number","description":"Amount. Minimum 0.01, positive only.","format":"float"},"bsb":{"type":"string","description":"The source account's BSB number. Format: `###-###`"},"account_name":{"type":"string","description":"The source account name. Max 32 characters."},"account_number":{"type":"string","description":"The source account number. Max 9 digits."}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-DD-L4M3SN0E\",\n \"amount\": 42.0,\n \"bsb\": \"123-123\",\n \"account_number\": \"012345678\",\n \"account_name\": \"Test 2\",\n \"description\": \"Confirmation\",\n \"reference\": \"071-DD-L4M3SN0E\",\n \"date\": \"2018-09-14\",\n \"process_date\": null,\n \"status\": \"New\",\n \"result\": null,\n \"metadata\": null\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-DD-L4M3SN0E"},"amount":{"type":"integer","example":42,"default":0},"bsb":{"type":"string","example":"123-123"},"account_number":{"type":"string","example":"012345678"},"account_name":{"type":"string","example":"Test 2"},"description":{"type":"string","example":"Confirmation"},"reference":{"type":"string","example":"071-DD-L4M3SN0E"},"date":{"type":"string","example":"2018-09-14"},"process_date":{},"status":{"type":"string","example":"New"},"result":{},"metadata":{}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"422":{"description":"422","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\n \"Could not find bank account unknown\"\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 bank account unknown"}}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/direct_debits/071-DD-L4M3SN0E -X PUT -u TEST:TEST -d'\n {\n \"account_name\":\"Test\"\n }'"},{"language":"ruby","code":"FatZebra::DirectDebit.update(\n \"071-DD-FYC4V7W4\",\n account_name: 'Test 2'\n)"}],"samples-languages":["curl","ruby"]}},"delete":{"summary":"Delete a direct debit","description":"A direct debit can be deleted if it has a status of `New`. Deleting a direct debit will update its status to `Deleted`, however the data will not be removed from Fat Zebra's systems.","operationId":"delete-a-direct-debit","parameters":[{"name":"id","in":"path","description":"ID of the direct debit","schema":{"type":"string"},"required":true},{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-DD-OPKL11XK\",\n \"amount\": 42,\n \"bsb\": \"123-123\",\n \"account_number\": \"012345678\",\n \"account_name\": \"Test\",\n \"description\": \"Confirmation\",\n \"reference\": \"071-DD-OPKL11XK\",\n \"date\": \"2018-09-14\",\n \"process_date\": null,\n \"status\": \"Deleted\",\n \"result\": null,\n \"metadata\": null\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-DD-OPKL11XK"},"amount":{"type":"integer","example":42,"default":0},"bsb":{"type":"string","example":"123-123"},"account_number":{"type":"string","example":"012345678"},"account_name":{"type":"string","example":"Test"},"description":{"type":"string","example":"Confirmation"},"reference":{"type":"string","example":"071-DD-OPKL11XK"},"date":{"type":"string","example":"2018-09-14"},"process_date":{},"status":{"type":"string","example":"Deleted"},"result":{},"metadata":{}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": null,\n \"errors\": [\n \"Direct Debit 071-DC-ABC123 could not be found.\"\n ],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{},"errors":{"type":"array","items":{"type":"string","example":"Direct Debit 071-DC-ABC123 could not be found."}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/direct_debits/071-DD-5DYN6M21 -X DELETE -u TEST:TEST"},{"language":"ruby","code":"FatZebra::DirectDebit.delete('071-DD-5DYN6M21')"}],"samples-languages":["curl","ruby"]}}},"/direct_debits/{id_or_reference}":{"get":{"summary":"Fetch a direct debit","description":"","operationId":"fetch-a-direct-debit","parameters":[{"name":"id_or_reference","in":"path","description":"ID or reference of the direct debit","schema":{"type":"string"},"required":true},{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-DD-ULX5DGSW\",\n \"amount\": 10,\n \"bsb\": \"083-832\",\n \"account_number\": \"181843123\",\n \"account_name\": \"James Smith\",\n \"description\": \"test\",\n \"reference\": \"RMT1636366032\",\n \"date\": \"2018-09-14\",\n \"process_date\": null,\n \"status\": \"New\",\n \"result\": null,\n \"metadata\": null\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-DD-ULX5DGSW"},"amount":{"type":"integer","example":10,"default":0},"bsb":{"type":"string","example":"083-832"},"account_number":{"type":"string","example":"181843123"},"account_name":{"type":"string","example":"James Smith"},"description":{"type":"string","example":"test"},"reference":{"type":"string","example":"RMT1636366032"},"date":{"type":"string","example":"2018-09-14"},"process_date":{},"status":{"type":"string","example":"New"},"result":{},"metadata":{}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\n \"Could not find Direct Entry\"\n ],\n \"test\": true\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 Direct Entry"}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/direct_debits/071-DD-ULX5DGSW -u TEST:TEST"},{"language":"ruby","code":"FatZebra::DirectDebit.find('071-DD-5DYN6M21')"}],"samples-languages":["curl","ruby"]}}},"/direct_credits":{"post":{"summary":"Create a direct credit","description":"","operationId":"create-a-direct-credit","parameters":[{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["description","amount","bsb","account_name","account_number"],"properties":{"description":{"type":"string","description":"Recommended to be unique. Max 18 characters, allowed chars are A-Z, 0-9, period, hyphen, ampersand, and underscore. It is recommended you make this descriptive for your customer - e.g. Invoice ABCD123."},"amount":{"type":"number","description":"Amount. Minimum 0.01, positive only.","format":"float"},"bsb":{"type":"string","description":"The destination account's BSB number. Format: `###-###`"},"account_name":{"type":"string","description":"The destination account name. Max 32 characters."},"account_number":{"type":"string","description":"The destination account number. Max 9 digits."},"date":{"type":"string","description":"Date of the direct credit. Optional but recommended. Defaults to the next processing period (current day if before 17:00, next day if after). Must be in the future.","format":"date"},"reference":{"type":"string","description":"Unique reference"},"metadata":{"type":"object","description":"Metadata for the direct credit","properties":{}},"bank_account":{"type":"string","description":"The Fat Zebra bank account ID to be used in place of `account_name`, `account_number`, and `bsb`. If `bank_account` is supplied, the other attributes should be omitted."}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-DC-IQ2X25I5\",\n \"amount\": 42.0,\n \"bsb\": \"123-123\",\n \"account_number\": \"012345678\",\n \"account_name\": \"Test\",\n \"description\": \"Confirmation\",\n \"reference\": \"071-DC-IQ2X25I5\",\n \"date\": \"2018-09-14\",\n \"process_date\": null,\n \"status\": \"New\",\n \"result\": null,\n \"metadata\": null\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-DC-IQ2X25I5"},"amount":{"type":"integer","example":42,"default":0},"bsb":{"type":"string","example":"123-123"},"account_number":{"type":"string","example":"012345678"},"account_name":{"type":"string","example":"Test"},"description":{"type":"string","example":"Confirmation"},"reference":{"type":"string","example":"071-DC-IQ2X25I5"},"date":{"type":"string","example":"2018-09-14"},"process_date":{},"status":{"type":"string","example":"New"},"result":{},"metadata":{}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"422":{"description":"422","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {\n \"id\": null,\n \"amount\": 42,\n \"bsb\": \"123-123\",\n \"account_number\": \"012345678\",\n \"account_name\": \"Test\",\n \"description\": \"Confirmation\",\n \"reference\": \"071-DC-FYC4V7W4\",\n \"date\": \"2018-09-14\",\n \"process_date\": null,\n \"status\": \"New\",\n \"result\": null,\n \"metadata\": null\n },\n \"errors\": [\n \"Reference has already been taken\"\n ],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{"id":{},"amount":{"type":"integer","example":42,"default":0},"bsb":{"type":"string","example":"123-123"},"account_number":{"type":"string","example":"012345678"},"account_name":{"type":"string","example":"Test"},"description":{"type":"string","example":"Confirmation"},"reference":{"type":"string","example":"071-DC-FYC4V7W4"},"date":{"type":"string","example":"2018-09-14"},"process_date":{},"status":{"type":"string","example":"New"},"result":{},"metadata":{}}},"errors":{"type":"array","items":{"type":"string","example":"Reference has already been taken"}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/direct_credits -u TEST:TEST -d'\n { \n \"description\": \"Confirmation\", \n \"amount\": 42, \n \"bsb\": \"123-123\", \n \"account_name\": \"Test\", \n \"account_number\": \"012345678\" \n }'"},{"language":"ruby","code":"FatZebra::DirectCredit.create(\n description: 'Confirmation',\n amount: 42,\n bsb: '123-123',\n account_name: 'Test',\n account_number: '012345678'\n)"}],"samples-languages":["curl","ruby"]}},"get":{"summary":"List direct credits","description":"","operationId":"list-direct-credits","parameters":[{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}},{"name":"offset","in":"query","description":"Page number to return","schema":{"type":"integer","format":"int32","default":1}},{"name":"limit","in":"query","description":"Max number of results to return","schema":{"type":"integer","format":"int32","default":10}},{"name":"from","in":"query","description":"Lower bound for the date at which the direct credit was created","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"Upper bound for the date at which the direct credit was created","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": [\n {\n \"id\": \"071-DC-RT8G3YV\",\n \"amount\": 42,\n \"bsb\": \"123-123\",\n \"account_number\": \"000000000\",\n \"account_name\": \"Test 2\",\n \"description\": \"Confirmation\",\n \"reference\": \"071-DC-RT8G3YV\",\n \"date\": \"2018-09-14\",\n \"process_date\": null,\n \"status\": \"New\",\n \"result\": null,\n \"metadata\": null\n },\n {\n \"id\": \"071-DC-7ASQS6M4\",\n \"amount\": 10.06,\n \"bsb\": \"123-123\",\n \"account_number\": \"012345678\",\n \"account_name\": \"Test\",\n \"description\": \"Confirmation\",\n \"reference\": \"071-DC-7ASQS6M4\",\n \"date\": \"2018-09-13\",\n \"process_date\": \"2018-09-13\",\n \"status\": \"Pending\",\n \"result\": \"Submitted to institution\",\n \"metadata\": {\n \"batch_id\": \"ced360\"\n }\n }\n ],\n \"errors\": [],\n \"records\": 2,\n \"total_records\": 685,\n \"page\": 1,\n \"total_pages\": 343,\n \"test\": true,\n}"}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl 'https://gateway.pmnts-sandbox.io/v1.0/direct_credits?limit=2&offset=1' -u TEST:TEST"},{"language":"ruby","code":"FatZebra::DirectCredit.search"}],"samples-languages":["curl","ruby"]}}},"/direct_credits/{id}":{"put":{"summary":"Update a direct credit","description":"A direct credit can be updated if it has a status of `New`. Once direct credits have been submitted to the financial institution, they are locked and can only be updated by the Fat Zebra system.","operationId":"update-a-direct-credit","parameters":[{"name":"id","in":"path","description":"ID of the direct credit","schema":{"type":"string"},"required":true},{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","description":"Max 18 characters, allowed chars are A-Z, 0-9, period, hyphen, ampersand, and underscore."},"amount":{"type":"number","description":"Amount. Minimum 0.01, positive only.","format":"float"},"bsb":{"type":"string","description":"The destination account's BSB number. Format: `###-###`"},"account_name":{"type":"string","description":"The destination account name. Max 32 characters."},"account_number":{"type":"string","description":"The destination account number. Max 9 digits."}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-DC-IQ2X25I5\",\n \"amount\": 42.0,\n \"bsb\": \"123-123\",\n \"account_number\": \"012345678\",\n \"account_name\": \"Test 2\",\n \"description\": \"Confirmation\",\n \"reference\": \"071-DC-IQ2X25I5\",\n \"date\": \"2018-09-14\",\n \"process_date\": null,\n \"status\": \"New\",\n \"result\": null,\n \"metadata\": null\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-DC-IQ2X25I5"},"amount":{"type":"integer","example":42,"default":0},"bsb":{"type":"string","example":"123-123"},"account_number":{"type":"string","example":"012345678"},"account_name":{"type":"string","example":"Test 2"},"description":{"type":"string","example":"Confirmation"},"reference":{"type":"string","example":"071-DC-IQ2X25I5"},"date":{"type":"string","example":"2018-09-14"},"process_date":{},"status":{"type":"string","example":"New"},"result":{},"metadata":{}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"422":{"description":"422","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\n \"Could not find bank account unknown\"\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 bank account unknown"}}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/direct_credits/071-DC-IQ2X25I5 -X PUT -u TEST:TEST -d'\n {\n \"account_name\": \"Test 2\"\n }'"},{"language":"ruby","code":"FatZebra::DirectCredit.update(\n \"071-DC-FYC4V7W4\",\n account_name: 'Test 2'\n)"}],"samples-languages":["curl","ruby"]}},"delete":{"summary":"Delete a direct credit","description":"A direct credit can be deleted if it has a status of `New`. Deleting a direct credit will update its status to `Deleted`, however the data will not be removed from Fat Zebra's systems.","operationId":"delete-a-direct-credit","parameters":[{"name":"id","in":"path","description":"ID of the direct credit","schema":{"type":"string"},"required":true},{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-DC-RT8G3YV\",\n \"amount\": 42,\n \"bsb\": \"123-123\",\n \"account_number\": \"000000000\",\n \"account_name\": \"Test 2\",\n \"description\": \"Confirmation\",\n \"reference\": \"071-DC-RT8G3YV\",\n \"date\": \"2018-09-14\",\n \"process_date\": null,\n \"status\": \"Deleted\",\n \"result\": null,\n \"metadata\": null\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-DC-RT8G3YV"},"amount":{"type":"integer","example":42,"default":0},"bsb":{"type":"string","example":"123-123"},"account_number":{"type":"string","example":"000000000"},"account_name":{"type":"string","example":"Test 2"},"description":{"type":"string","example":"Confirmation"},"reference":{"type":"string","example":"071-DC-RT8G3YV"},"date":{"type":"string","example":"2018-09-14"},"process_date":{},"status":{"type":"string","example":"Deleted"},"result":{},"metadata":{}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": null,\n \"errors\": [\n \"Direct Credit 071-DC-ABC123 could not be found.\"\n ],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{},"errors":{"type":"array","items":{"type":"string","example":"Direct Credit 071-DC-ABC123 could not be found."}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/direct_credits/071-DC-RT8G3YV -X DELETE -u TEST:TEST"},{"language":"ruby","code":"FatZebra::DirectCredit.delete('071-DC-5DYN6M21')"}],"samples-languages":["curl","ruby"]}}},"/direct_credits/{id_or_reference}":{"get":{"summary":"Fetch a direct credit","description":"","operationId":"fetch-a-direct-credit","parameters":[{"name":"id_or_reference","in":"path","description":"ID or reference of the direct credit","schema":{"type":"string"},"required":true},{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-DC-5DYN6M21\",\n \"amount\": 42,\n \"bsb\": \"123-123\",\n \"account_number\": \"012345678\",\n \"account_name\": \"Test\",\n \"description\": \"Confirmation\",\n \"reference\": \"071-DC-5DYN6M21\",\n \"date\": \"2017-06-27\",\n \"process_date\": \"2017-06-27\",\n \"status\": \"Completed\",\n \"result\": \"Submitted to institution\",\n \"metadata\": {}\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-DC-5DYN6M21"},"amount":{"type":"integer","example":42,"default":0},"bsb":{"type":"string","example":"123-123"},"account_number":{"type":"string","example":"012345678"},"account_name":{"type":"string","example":"Test"},"description":{"type":"string","example":"Confirmation"},"reference":{"type":"string","example":"071-DC-5DYN6M21"},"date":{"type":"string","example":"2017-06-27"},"process_date":{"type":"string","example":"2017-06-27"},"status":{"type":"string","example":"Completed"},"result":{"type":"string","example":"Submitted to institution"},"metadata":{"type":"object","properties":{}}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\n \"Could not find Direct Entry\"\n ],\n \"test\": true\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 Direct Entry"}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/direct_credits/071-DC-5DYN6M21 -u TEST:TEST"},{"language":"ruby","code":"FatZebra::DirectCredit.find('071-DC-5DYN6M21')"}],"samples-languages":["curl","ruby"]}}},"/chargebacks/{id}":{"get":{"summary":"Fetch a chargeback","description":"","operationId":"chargebacks-1","parameters":[{"name":"id","in":"path","description":"ID of the chargeback","schema":{"type":"string"},"required":true},{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": { \n \"acquirer_merchant_id\": \"ABCDE12345\",\n \"id\": \"071-CB-MIP4SIHH\",\n \"reference\": \"C2BB3D60\",\n \"chargeback_control_number\": \"39875410\",\n \"amount\": 4000,\n \"reason_code\": null,\n \"reason_description\": \"Cardholder disputes transaction\",\n \"status\": \"Matched\",\n \"merchant_status\": \"In progress\",\n \"due_date\": \"2018-01-31\",\n \"metadata\": {\n \"transaction_date\": \"31-Dec-2018\",\n \"transaction_time\": \"14:13:00\"\n\t },\n \"notifications\": [\n { \n ... \n },\n { \n ...\n }\n ],\n \"created_at\": \"2018-01-17T15:02:46+10:00\",\n \"updated_at\": \"2018-01-17T15:02:46+10:00\" \n },\n \"errors\": [\n ],\n \"test\": true \n}"}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/chargebacks/071-CB-MIP4SIHH -u TEST:TEST"}],"samples-languages":["curl"]}},"patch":{"summary":"Update a chargeback","description":"","operationId":"update-a-chargeback-2","parameters":[{"name":"id","in":"path","description":"id of the chargeback","schema":{"type":"string"},"required":true},{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"merchant_status":{"type":"string","description":"Merchant's status for the chargeback process","default":"In progress"},"purchase_id":{"type":"string","description":"Id of the purchase to match this chargeback to"},"metadata":{"type":"object","properties":{}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": { \n \"acquirer_merchant_id\": \"ABCDE12345\",\n \"id\": \"071-CB-MIP4SIHH\",\n \"reference\": \"C2BB3D60\",\n \"chargeback_control_number\": \"39875410\",\n \"amount\": 4000,\n \"reason_code\": null,\n \"reason_description\": \"Cardholder disputes transaction\",\n \"status\": \"Matched\",\n \"merchant_status\": \"Resolved\",\n \"due_date\": \"2018-01-31\",\n \"transaction_id\": \"071-P-PAGTKK4W\",\n \"metadata\": {\n \"transaction_date\": \"31-Dec-2018\",\n \"transaction_time\": \"14:13:00\"\n },\n \"created_at\": \"2018-01-17T15:02:46+10:00\",\n \"updated_at\": \"2018-01-18T07:39:24+10:00\"\n },\n \"errors\": [\n ],\n \"test\": true \n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"acquirer_merchant_id":{"type":"string","example":"ABCDE12345"},"id":{"type":"string","example":"071-CB-MIP4SIHH"},"reference":{"type":"string","example":"C2BB3D60"},"chargeback_control_number":{"type":"string","example":"39875410"},"amount":{"type":"integer","example":4000,"default":0},"reason_code":{},"reason_description":{"type":"string","example":"Cardholder disputes transaction"},"status":{"type":"string","example":"Matched"},"merchant_status":{"type":"string","example":"Resolved"},"due_date":{"type":"string","example":"2018-01-31"},"transaction_id":{"type":"string","example":"071-P-PAGTKK4W"},"metadata":{"type":"object","properties":{"transaction_date":{"type":"string","example":"31-Dec-2018"},"transaction_time":{"type":"string","example":"14:13:00"}}},"created_at":{"type":"string","example":"2018-01-17T15:02:46+10:00"},"updated_at":{"type":"string","example":"2018-01-18T07:39:24+10:00"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/chargebacks/071-CB-MIP4SIHH -u TEST:TEST -d' \n { \n \"merchant_status\": \"Resolved\"\n }'\n"}],"samples-languages":["curl"]}}},"/chargebacks":{"get":{"summary":"List chargebacks","description":"","operationId":"list-chargebacks","parameters":[{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": [ \n {\n \"acquirer_merchant_id\": \"ABCDE12345\",\n \"id\": \"071-CB-MIP4SIHH\",\n \"reference\": \"C2BB3D60\",\n \"amount\": 4000,\n \"reason_code\": null,\n \"reason_description\": \"Cardholder disputes transaction\",\n \"status\": \"Matched\",\n \"merchant_status\": \"In Progress\",\n \"due_date\": \"2018-01-31\",\n\t\t\t\"transaction_id\": \"071-P-PAGTKK4W\",\n\t \"metadata\": {\n \"transaction_date\": \"31-Dec-2018\",\n \"transaction_time\": \"14:13:00\"\n \t },\n \"created_at\": \"2018-01-17T15:02:46+10:00\",\n \"updated_at\": \"2018-01-17T15:02:46+10:00\" \n },\n {\n \"acquirer_merchant_id\": \"ABCDE12345\",\n \"id\": \"071-CB-NJQ5TJII\",\n \"reference\": \"D3CC4E71\",\n \"amount\": 987,\n \"reason_code\": null,\n \"reason_description\": \"Fraudulent Transaction - Card Absent Environment\",\n \"status\": \"Matched\",\n \"merchant_status\": \"New\",\n \"due_date\": \"2018-07-01\",\n\t\t\t\"transaction_id\": \"071-P-PAGTKK4W\",\n\t \"metadata\": {\n \"transaction_date\": \"31-Dec-2018\",\n \"transaction_time\": \"14:13:00\"\n \t },\n \"created_at\": \"2018-06-24T08:20:57+10:00\",\n \"updated_at\": \"2018-06-30T10:38:04+10:00\"\n }\n ],\n \"errors\": [\n ],\n \"test\": true \n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"array","items":{"type":"object","properties":{"acquirer_merchant_id":{"type":"string","example":"ABCDE12345"},"id":{"type":"string","example":"071-CB-MIP4SIHH"},"reference":{"type":"string","example":"C2BB3D60"},"amount":{"type":"integer","example":4000,"default":0},"reason_code":{},"reason_description":{"type":"string","example":"Cardholder disputes transaction"},"status":{"type":"string","example":"Matched"},"merchant_status":{"type":"string","example":"In Progress"},"due_date":{"type":"string","example":"2018-01-31"},"transaction_id":{"type":"string","example":"071-P-PAGTKK4W"},"metadata":{"type":"object","properties":{"transaction_date":{"type":"string","example":"31-Dec-2018"},"transaction_time":{"type":"string","example":"14:13:00"}}},"created_at":{"type":"string","example":"2018-01-17T15:02:46+10:00"},"updated_at":{"type":"string","example":"2018-01-17T15:02:46+10:00"}}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/chargebacks -u TEST:TEST"}],"samples-languages":["curl"]}}},"/chargebacks/{chargeback_id}/notifications/{id}":{"get":{"summary":"Fetch a chargeback notification","description":"","operationId":"fetch-a-chargeback-notification-1","parameters":[{"name":"chargeback_id","in":"path","schema":{"type":"string","default":"id of the chargeback"},"required":true},{"name":"id","in":"path","description":"id of the notification","schema":{"type":"string"},"required":true},{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-CN-LBUNAQ4\",\n \"received_at\": \"2018-01-17T15:02:00.000Z\",\n \"merchant_status\": \"Unread\",\n \"metadata\": {\n \"chargebackId\": \"98372140\",\n \"respondByDate\": \"24-Jul-18\",\n \"chargebackRef\": \"C2BB3D60\",\n \"reasonForChargeback\": \"Service cancelled on 05/04/2018, credit not processed\"\n },\n \"chargeback_id\": \"071-CB-MIP4SIHH\" \n },\n \"errors\": [\n ],\n \"test\": true \n}\n"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-CN-LBUNAQ4"},"received_at":{"type":"string","example":"2018-01-17T15:02:00.000Z"},"merchant_status":{"type":"string","example":"Unread"},"metadata":{"type":"object","properties":{"chargebackId":{"type":"string","example":"98372140"},"respondByDate":{"type":"string","example":"24-Jul-18"},"chargebackRef":{"type":"string","example":"C2BB3D60"},"reasonForChargeback":{"type":"string","example":"Service cancelled on 05/04/2018, credit not processed"}}},"chargeback_id":{"type":"string","example":"071-CB-MIP4SIHH"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/chargebacks/071-CB-MIP4SIHH/notifications/071-CN-LBUNAQ4 -u TEST:TEST"}],"samples-languages":["curl"]}},"patch":{"summary":"Update a chargeback notification","description":"","operationId":"update-a-chargeback-1","parameters":[{"name":"chargeback_id","in":"path","description":"id of the chargeback","schema":{"type":"string"},"required":true},{"name":"id","in":"path","description":"id of the notification","schema":{"type":"string"},"required":true},{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"merchant_status":{"type":"string","description":"Merchant's status for the chargeback process","default":"In progress"},"metadata":{"type":"object","properties":{}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-CN-LBUNAQ4\",\n \"chargeback_id\": \"071-CB-MIP4SIHH\",\n \"received_at\": \"2018-01-17T15:02:00.000Z\",\n \"merchant_status\": \"Unead\",\n \"metadata\": {\n \"chargebackId\": \"98372140\",\n \"respondByDate\": \"24-Jul-18\",\n \"chargebackRef\": \"c2bb3d60-d04b-4c1c-8fd1-9d7a440a6d8b\",\n \"reasonForChargeback\": \"Service cancelled on 05/04/2018, credit not processed\"\n }\n },\n \"errors\": [\n ],\n \"test\": true \n}\n"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-CN-LBUNAQ4"},"chargeback_id":{"type":"string","example":"071-CB-MIP4SIHH"},"received_at":{"type":"string","example":"2018-01-17T15:02:00.000Z"},"merchant_status":{"type":"string","example":"Unead"},"metadata":{"type":"object","properties":{"chargebackId":{"type":"string","example":"98372140"},"respondByDate":{"type":"string","example":"24-Jul-18"},"chargebackRef":{"type":"string","example":"c2bb3d60-d04b-4c1c-8fd1-9d7a440a6d8b"},"reasonForChargeback":{"type":"string","example":"Service cancelled on 05/04/2018, credit not processed"}}}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/chargebacks/071-CN-LBUNAQ4 -u TEST:TEST -d' \n { \n \"merchant_status\": \"Unread\"\n }'"}],"samples-languages":["curl"]}}},"/chargebacks/{id}/notifications":{"get":{"summary":"List chargeback notifications","description":"","operationId":"list-chargeback-notifications-1","parameters":[{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}},{"name":"id","in":"path","description":"id of the chargeback","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": [ \n {\n \"id\": \"071-CN-LBUNAQ4\",\n \"received_at\": \"2018-01-17T00:00:00.000Z\",\n \"merchant_status\": \"Read\",\n \"metadata\": {\n \"chargebackId\": \"141899\",\n \"chargebackRef\": \"C2BB3D60\",\n \"requestDate\": \"17-Jan-2018\",\n \"reasonForChargeback\": \"Cardholder disputes transaction\",\n \"respondToFaxNumber\" : \"(02) 9383 8848\",\n \"requestForDocumentation\": \"Request for documentation\",\n \"respondByDate\": \"31-Jan-2018\"\n },\n \"chargeback_id\": \"071-CB-MIP4SIHH\",\n \"created_at\": \"2018-01-17T15:02:46+10:00\",\n \"updated_at\": \"2018-01-17T15:02:46+10:00\"\n },\n {\n \"id\": \"071-CN-MCVPBR5\",\n \"received_at\": \"2018-02-05T00:00:00.000Z\",\n \"merchant_status\": \"Unread\",\n \"metadata\": {\n \"chargebackId\": \"150839\",\n \"chargebackDebitRef\": \"C2BB3D60\",\n \"requestDate\": \"05-Feb-2018\",\n \"reasonForChargeback\": \"Documentation not supplied in timeframe\",\n \"reasonCode\": \"4837\",\n \"chargebackDate\": \"05-Feb-2018\"\n },\n \"chargeback_id\": \"071-CB-MIP4SIHH\", \n \"created_at\": \"2018-02-05T16:28:17+10:00\",\n \"updated_at\": \"2018-02-05T16:28:17+10:00\" \n }\n ] \n },\n \"errors\": [\n ],\n \"test\": true \n}"}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/chargebacks/071-CB-MIP4SIHH/notifications -u TEST:TEST"}],"samples-languages":["curl"]}}},"/batches/{filename}":{"post":{"summary":"Create a batch","description":"","operationId":"create-a-batch","parameters":[{"name":"filename","in":"path","description":"Your CSV batch payments file name","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"RAW_BODY":{"type":"string","description":"The batch CSV file format","format":"binary"}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"cURL":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-BF-2H8VWBRN\",\n \"filename\": \"BATCH-v1-PURCHASE-TEST-20180131-1516337064.csv\",\n \"created_at\": \"2018-02-19T12:29:55+11:00\",\n \"process_date\": \"2018-01-31\",\n \"start_date\": null,\n \"completed_date\": null,\n \"status\": \"New\",\n \"type\": \"PURCHASE\",\n \"reference\": \"1516337064\"\n },\n \"errors\": [],\n \"test\": false\n}"},"Ruby":{"value":"{\n \"id\": \"071-BF-NFIIDN7F\",\n \"filename\": \"BATCH-v1-PURCHASE-TEST-20180131-1516337065.csv\",\n \"created_at\": \"2018-02-19T12:36:20+11:00\",\n \"process_date\": \"2018-01-31\",\n \"start_date\": null,\n \"completed_date\": null,\n \"status\": \"New\",\n \"type\": \"PURCHASE\",\n \"reference\": \"1516337065\"\n}"}},"schema":{"oneOf":[{"title":"cURL","type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-BF-2H8VWBRN"},"filename":{"type":"string","example":"BATCH-v1-PURCHASE-TEST-20180131-1516337064.csv"},"created_at":{"type":"string","example":"2018-02-19T12:29:55+11:00"},"process_date":{"type":"string","example":"2018-01-31"},"start_date":{},"completed_date":{},"status":{"type":"string","example":"New"},"type":{"type":"string","example":"PURCHASE"},"reference":{"type":"string","example":"1516337064"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":false,"default":true}}},{"title":"Ruby","type":"object","properties":{"id":{"type":"string","example":"071-BF-NFIIDN7F"},"filename":{"type":"string","example":"BATCH-v1-PURCHASE-TEST-20180131-1516337065.csv"},"created_at":{"type":"string","example":"2018-02-19T12:36:20+11:00"},"process_date":{"type":"string","example":"2018-01-31"},"start_date":{},"completed_date":{},"status":{"type":"string","example":"New"},"type":{"type":"string","example":"PURCHASE"},"reference":{"type":"string","example":"1516337065"}}}]}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/batches/BATCH-v1-PURCHASE-TEST-20180131-1516337064.csv \\\n -u TEST:TEST \\\n --data-binary @tmp/batches/BATCH-v1-PURCHASE-TEST-20180131-1516337064.csv \\\n -H \"Content-Type: text/csv\" \\"},{"language":"ruby","code":"require 'fat_zebra'\n\nFatZebra.configure do |config|\n config.username = 'TEST'\n config.token = 'TEST'\n config.gateway = :sandbox\nend\n\nFatZebra::Batch.create(path: 'tmp/batches/BATCH-v1-PURCHASE-TEST-20180131-1516337065.csv', filename: 'BATCH-v1-PURCHASE-TEST-20180131-1516337065.csv')","name":"Ruby"}],"samples-languages":["curl","ruby"]}}},"/batches/{id}":{"delete":{"summary":"Delete a batch","description":"","operationId":"delete-a-batch","parameters":[{"name":"id","in":"path","description":"ID or Reference of the Batch","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"cURL":{"value":"{\n \"successful\" : true,\n \"test\" : true,\n \"response\" : {\n \"status\" : \"Cancelled\",\n \"completed_date\" : null,\n \"id\" : \"071-BF-HBOLDSDA\",\n \"start_date\" : null,\n \"type\" : \"DIRECTDEBIT\",\n \"filename\" : \"BATCH-v1-DIRECTDEBIT-TEST-20180908-7607.csv\",\n \"process_date\" : \"2018-09-08\",\n \"created_at\" : \"2018-09-07T15:34:59+10:00\",\n \"reference\" : \"7607\"\n }\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"test":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"status":{"type":"string","example":"Cancelled"},"completed_date":{},"id":{"type":"string","example":"071-BF-HBOLDSDA"},"start_date":{},"type":{"type":"string","example":"DIRECTDEBIT"},"filename":{"type":"string","example":"BATCH-v1-DIRECTDEBIT-TEST-20180908-7607.csv"},"process_date":{"type":"string","example":"2018-09-08"},"created_at":{"type":"string","example":"2018-09-07T15:34:59+10:00"},"reference":{"type":"string","example":"7607"}}}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl -u TEST:TEST -XDELETE https://gateway.pmnts-sandbox.io/v1.0/batches/071-BF-Q0TVWI7K","name":"cURL"},{"language":"ruby","code":"require 'fat_zebra'\n\nFatZebra.configure do |config|\n config.username = 'TEST'\n config.token = 'TEST'\n config.gateway = :sandbox\nend\n\nFatZebra::Batch.find('071-BF-68TU3VJM')"}],"samples-languages":["curl","ruby"]}},"get":{"summary":"Fetch a batch","description":"","operationId":"fetch-a-batch","parameters":[{"name":"id","in":"path","description":"ID or Reference of the Batch","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"cURL":{"value":"{\n \"response\" : {\n \"status\" : \"Completed\",\n \"type\" : \"PURCHASE\",\n \"process_date\" : \"2017-07-14\",\n \"id\" : \"071-BF-Q0TVWI7K\",\n \"created_at\" : \"2017-07-14T10:42:55+10:00\",\n \"filename\" : \"BATCH-v1-PURCHASE-20170714-123456789012347.csv\",\n \"completed_date\" : \"2017-07-14\",\n \"reference\" : \"123456789012347\",\n \"start_date\" : \"2017-07-14\"\n },\n \"successful\" : true,\n \"errors\" : [],\n \"test\" : true\n}"},"Ruby":{"value":"{\n \"id\": \"071-BF-68TU3VJM\",\n \"filename\": \"BATCH-v1-PURCHASE-20170712-123456789012348.csv\",\n \"created_at\": \"2017-07-12T15:49:49+10:00\",\n \"process_date\": \"2017-07-12\",\n \"start_date\": \"2017-07-12\",\n \"completed_date\": \"2017-07-12\",\n \"status\": \"Completed\",\n \"type\": \"PURCHASE\",\n \"reference\": \"123456789012348\"\n}"}},"schema":{"oneOf":[{"title":"cURL","type":"object","properties":{"response":{"type":"object","properties":{"status":{"type":"string","example":"Completed"},"type":{"type":"string","example":"PURCHASE"},"process_date":{"type":"string","example":"2017-07-14"},"id":{"type":"string","example":"071-BF-Q0TVWI7K"},"created_at":{"type":"string","example":"2017-07-14T10:42:55+10:00"},"filename":{"type":"string","example":"BATCH-v1-PURCHASE-20170714-123456789012347.csv"},"completed_date":{"type":"string","example":"2017-07-14"},"reference":{"type":"string","example":"123456789012347"},"start_date":{"type":"string","example":"2017-07-14"}}},"successful":{"type":"boolean","example":true,"default":true},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}},{"title":"Ruby","type":"object","properties":{"id":{"type":"string","example":"071-BF-68TU3VJM"},"filename":{"type":"string","example":"BATCH-v1-PURCHASE-20170712-123456789012348.csv"},"created_at":{"type":"string","example":"2017-07-12T15:49:49+10:00"},"process_date":{"type":"string","example":"2017-07-12"},"start_date":{"type":"string","example":"2017-07-12"},"completed_date":{"type":"string","example":"2017-07-12"},"status":{"type":"string","example":"Completed"},"type":{"type":"string","example":"PURCHASE"},"reference":{"type":"string","example":"123456789012348"}}}]}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl -u TEST:TEST https://gateway.pmnts-sandbox.io/v1.0/batches/071-BF-Q0TVWI7K","name":"cURL"},{"language":"ruby","code":"require 'fat_zebra'\n\nFatZebra.configure do |config|\n config.username = 'TEST'\n config.token = 'TEST'\n config.gateway = :sandbox\nend\n\nFatZebra::Batch.find('071-BF-68TU3VJM')"}],"samples-languages":["curl","ruby"]}}},"/batches/{id}/result.csv":{"get":{"summary":"Retrieve batch result file","description":"","operationId":"retrieve-batch-result-file","parameters":[{"name":"id","in":"path","description":"ID or Reference of the Batch","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"text/plain":{"examples":{"cURL":{"value":"Order42345,071-P-OEIHTOXT,Approved,00,Approved,826869,071POEIHTOXT,4000,AUD,John Doe 4,444433XXXXXX1111,2020-12-01,5bndwj3prob,Gizmo ABC 4\nOrder22345,071-P-Z4NU1G1D,Declined,51,Insufficient Funds: Insufficient Funds,,,2051,AUD,John Doe 2,444433XXXXXX1111,2020-12-01,ch3mcxwyprk,Gizmo ABC 2\nOrder32345,071-P-MQ3C98AD,Approved,00,Approved,241425,071PMQ3C98AD,3000,AUD,John Doe 3,444433XXXXXX1111,2020-12-01,azv46dwngzw,Gizmo ABC 3\nOrder12345,071-P-9673W0M6,Rejected,\"\",Reference is already taken,\"\",\"\",1000,\"\",\"\",\"\",\"\",\"\",Gizmo ABC 1"}}}}},"422":{"description":"422","content":{"text/plain":{"examples":{"Result":{"value":"Batch is not yet completed"}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl -u TEST:TEST https://gateway.pmnts-sandbox.io/v1.0/batches/071-BF-Q0TVWI7K/result.csv","name":"cURL"},{"language":"ruby","code":"require 'fat_zebra'\n\nFatZebra.configure do |config|\n config.username = 'TEST'\n config.token = 'TEST'\n config.gateway = :sandbox\nend\n\nFatZebra::Batch.find('071-BF-68TU3VJM')"}],"samples-languages":["curl","ruby"]}}},"/batches":{"get":{"summary":"List all batches","description":"","operationId":"list-all-batches","parameters":[{"name":"limit","in":"query","description":"The number of records to return per request (page) - the maximum per request is 50.","schema":{"type":"integer","format":"int32","default":10}},{"name":"offset","in":"query","description":"The pagination offset. For example, offset=10, limit=10 will return records 100 to 110","schema":{"type":"integer","format":"int32","default":1}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"cURL":{"value":"{\n \"total_records\" : 2128,\n \"page\" : 1,\n \"errors\" : [],\n \"successful\" : true,\n \"test\" : true,\n \"records\" : 2,\n \"response\" : [\n {\n \"completed_date\" : null,\n \"created_at\" : \"2018-01-30T01:58:52+11:00\",\n \"id\" : \"071-BF-PGGSPBF1\",\n \"start_date\" : null,\n \"type\" : \"PURCHASE\",\n \"status\" : \"Error\",\n \"filename\" : \"BATCH-v1-PURCHASE-TEST-20180101-test4.csv\",\n \"process_date\" : \"2018-01-01\",\n \"reference\" : \"test4\"\n },\n {\n \"start_date\" : \"2017-07-12\",\n \"id\" : \"071-BF-68TU3VJM\",\n \"completed_date\" : \"2017-07-12\",\n \"created_at\" : \"2017-07-12T15:49:49+10:00\",\n \"reference\" : \"123456789012348\",\n \"process_date\" : \"2017-07-12\",\n \"filename\" : \"BATCH-v1-PURCHASE-20170712-123456789012348.csv\",\n \"status\" : \"Completed\",\n \"type\" : \"PURCHASE\"\n }\n ],\n \"total_pages\" : 1024\n}"},"Ruby":{"value":"{\n \"id\": \"071-BF-68TU3VJM\",\n \"filename\": \"BATCH-v1-PURCHASE-20170712-123456789012348.csv\",\n \"created_at\": \"2017-07-12T15:49:49+10:00\",\n \"process_date\": \"2017-07-12\",\n \"start_date\": \"2017-07-12\",\n \"completed_date\": \"2017-07-12\",\n \"status\": \"Completed\",\n \"type\": \"PURCHASE\",\n \"reference\": \"123456789012348\"\n}"}},"schema":{"oneOf":[{"title":"cURL","type":"object","properties":{"total_records":{"type":"integer","example":2128,"default":0},"page":{"type":"integer","example":1,"default":0},"errors":{"type":"array"},"successful":{"type":"boolean","example":true,"default":true},"test":{"type":"boolean","example":true,"default":true},"records":{"type":"integer","example":2,"default":0},"response":{"type":"array","items":{"type":"object","properties":{"completed_date":{},"created_at":{"type":"string","example":"2018-01-30T01:58:52+11:00"},"id":{"type":"string","example":"071-BF-PGGSPBF1"},"start_date":{},"type":{"type":"string","example":"PURCHASE"},"status":{"type":"string","example":"Error"},"filename":{"type":"string","example":"BATCH-v1-PURCHASE-TEST-20180101-test4.csv"},"process_date":{"type":"string","example":"2018-01-01"},"reference":{"type":"string","example":"test4"}}}},"total_pages":{"type":"integer","example":1024,"default":0}}},{"title":"Ruby","type":"object","properties":{"id":{"type":"string","example":"071-BF-68TU3VJM"},"filename":{"type":"string","example":"BATCH-v1-PURCHASE-20170712-123456789012348.csv"},"created_at":{"type":"string","example":"2017-07-12T15:49:49+10:00"},"process_date":{"type":"string","example":"2017-07-12"},"start_date":{"type":"string","example":"2017-07-12"},"completed_date":{"type":"string","example":"2017-07-12"},"status":{"type":"string","example":"Completed"},"type":{"type":"string","example":"PURCHASE"},"reference":{"type":"string","example":"123456789012348"}}}]}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl -u TEST:TEST https://gateway.pmnts-sandbox.io/v1.0/batches?limit=2"},{"language":"ruby","code":"require 'fat_zebra'\n\nFatZebra.configure do |config|\n config.username = 'TEST'\n config.token = 'TEST'\n config.gateway = :sandbox\nend\n\nFatZebra::Batch.search.data"}],"samples-languages":["curl","ruby"]}}},"/customers":{"post":{"summary":"Create a customer","description":"Please note, one payment method field is required, either card, card_token or bank_account.","operationId":"create-a-customer","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["first_name","last_name","reference"],"properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"reference":{"type":"string"},"email_address":{"type":"string"},"ip_address":{"type":"string"},"address":{"type":"object","required":["address","city","state","postcode","country"],"properties":{"address":{"type":"string","description":"Street number and name"},"city":{"type":"string"},"state":{"type":"string"},"postcode":{"type":"string"},"country":{"type":"string"}}},"card":{"type":"object","required":["card_holder"],"properties":{"card_holder":{"type":"string"},"card_number":{"type":"string"},"expiry_date":{"type":"string"},"cvv":{"type":"string"}}},"card_token":{"type":"string","description":"A card token can be sent through in lieu of the card data in the card array"},"bank_account":{"type":"object","description":"The customer's bank account.","properties":{"account_name":{"type":"string","description":"Account name to be used for direct entry."},"account_number":{"type":"string","description":"Bank account number. 6-9 digits for an Australian bank account, or 8-10 digits for a New Zealand bank account"},"bsb":{"type":"string","description":"BSB number - this will be in the format of ###-### for an Australian bank account, or ###### for a New Zealand bank account"},"account_type":{"type":"string","description":"\"AU\" or \"NZ\" for Australian or New Zealand bank account. Defaults to \"AU\" if not provided."}}}}}}}},"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\":true,\n \"response\":{\n \"id\":\"071-C-D1LXAHM7\",\n \"email\":\"hhump@gmail.com\",\n \"reference\":\"jsoie33789\",\n \"first_name\":\"Harrold\",\n \"last_name\":\"Humphries\",\n \"created_at\":\"2018-06-07T15:07:52+10:00\",\n \"address\":{\n \"address\":\"1 Harriet Road\",\n \"city\":\"Kooliablin\",\n \"state\":\"NSW\",\n \"postcode\":\"2222\",\n \"country\":\"Australia\"\n },\n \"card_token\":\"fke87c9q\",\n \"card_number\":\"512345XXXXXX2346\",\n \"bank_account\":null,\n \"metadata\":null\n },\n \"errors\":[],\n \"test\":true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-C-D1LXAHM7"},"email":{"type":"string","example":"hhump@gmail.com"},"reference":{"type":"string","example":"jsoie33789"},"first_name":{"type":"string","example":"Harrold"},"last_name":{"type":"string","example":"Humphries"},"created_at":{"type":"string","example":"2018-06-07T15:07:52+10:00"},"address":{"type":"object","properties":{"address":{"type":"string","example":"1 Harriet Road"},"city":{"type":"string","example":"Kooliablin"},"state":{"type":"string","example":"NSW"},"postcode":{"type":"string","example":"2222"},"country":{"type":"string","example":"Australia"}}},"card_token":{"type":"string","example":"fke87c9q"},"card_number":{"type":"string","example":"512345XXXXXX2346"},"bank_account":{},"metadata":{}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}},"text/plain":{"examples":{"Ruby":{"value":"=> # JSON: {\n \"id\": \"071-C-C77AZZ7C\",\n \"email\": null,\n \"reference\": \"abcde123\",\n \"first_name\": \"Harrold\",\n \"last_name\": \"Humphries\",\n \"created_at\": \"2017-12-08T17:07:43+11:00\",\n \"address\": {\n \"address\": \"1 Harriet Road\",\n \"city\": \"Kooliablin\",\n \"state\": \"NSW\",\n \"postcode\": \"2222\",\n \"country\": \"Australia\"\n },\n \"card_token\": \"fke8n73t\",\n \"card_number\": \"512345XXXXXX2346\",\n \"bank_account\": null,\n \"metadata\": {\n }\n}"}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl -u TEST:TEST https://gateway.pmnts-sandbox.io/v1.0/customers -d' \n{ \n \"first_name\": \"Harrold\", \n \"last_name\": \"Humphries\", \n \"reference\": \"jsoie33789\", \n \"email_address\": \"hhump@gmail.com\", \n \"ip_address\": \"180.200.33.181\", \n \"card\": { \n \"card_holder\": \"Harrold Humphries Senior\", \n \"card_number\": \"5123456789012346\", \n \"expiry_date\": \"05/2023\", \n \"cvv\": \"123\" \n }, \n \"address\": { \n \"address\": \"1 Harriet Road\", \n \"city\": \"Kooliablin\", \n \"state\": \"NSW\", \n \"postcode\": \"2222\", \n \"country\": \"Australia\" \n } \n}'"},{"language":"ruby","code":"require 'fat_zebra'\n\nFatZebra.configure do |config|\n config.username = 'TEST'\n config.token = 'TEST'\n config.gateway = :sandbox\nend\n\nFatZebra::Customer.create(\n first_name: \"Harrold\",\n last_name: \"Humphries\",\n reference: \"abc123\",\n email: \"hhump@gmail.com\",\n ip_address: \"180.200.33.181\",\n card: {\n card_holder: \"Harrold Humphries Senior\",\n card_number: \"5123456789012346\",\n expiry_date: \"05/2023\",\n cvv: \"123\"\n },\n address: {\n address: \"1 Harriet Road\",\n city: \"Kooliablin\",\n state: \"NSW\",\n postcode: \"2222\",\n country: \"Australia\"\n }\n)\n"}],"samples-languages":["curl","ruby"]}},"get":{"summary":"List customers","description":"","operationId":"list-customers","parameters":[{"name":"offset","in":"query","description":"The page number of customers to be returned.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"The number of customers per page to be returned.","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"cURL":{"value":"{\n \"successful\": true,\n \"response\": [\n {\n \"id\": \"071-C-JE34F66V\",\n \"email\": \"jim@citizen.com\",\n \"reference\": \"CUST-98198\",\n \"first_name\": \"Jim\",\n \"last_name\": \"Smith\",\n \"created_at\": \"2017-12-04T21:51:11+11:00\",\n \"address\": {\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"postcode\": \"\",\n \"country\": \"\"\n },\n \"card_token\": \"fke89s3v\",\n \"card_number\": \"400555XXXXXX0001\",\n \"bank_account\": null,\n \"metadata\": {}\n },\n # ...\n ],\n \"errors\": [],\n \"test\": true,\n \"records\": 10,\n \"total_records\": 945,\n \"page\": 1,\n \"total_pages\": 95\n}"}}},"text/plain":{"examples":{"Ruby":{"value":"[\n # JSON: {\n \"id\": \"071-C-JE34F66V\",\n \"email\": \"jim@citizen.com\",\n \"reference\": \"CUST-98198\",\n \"first_name\": \"Jim\",\n \"last_name\": \"Smith\",\n \"created_at\": \"2017-12-04T21:51:11+11:00\",\n \"address\": {\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"postcode\": \"\",\n \"country\": \"\"\n },\n \"card_token\": \"fke89s3v\",\n \"card_number\": \"400555XXXXXX0001\",\n \"bank_account\": null,\n \"metadata\": {\n }\n },\n # ...\n]"}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl -u <>:<> https://gateway.pmnts-sandbox.io/v1.0/customers"},{"language":"ruby","code":"require 'fat_zebra'\n\nFatZebra.configure do |config|\n config.username = 'TEST'\n config.token = 'TEST'\n config.gateway = :sandbox\nend\n\nFatZebra::Customer.search.data"}],"samples-languages":["curl","ruby"]}}},"/customers/{id}":{"put":{"summary":"Update a customer","description":"","operationId":"update-a-customer","parameters":[{"name":"id","in":"path","description":"ID or Reference","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"cURL":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-C-K7IY0XBJ\",\n \"email\": null,\n \"reference\": \"abcd123456\",\n \"first_name\": \"Harrold\",\n \"last_name\": \"Holt\",\n \"created_at\": \"2018-01-18T17:04:23+11:00\",\n \"address\": {\n \"address\": \"1 Harriet Road\",\n \"city\": \"Kooliablin\",\n \"state\": \"NSW\",\n \"postcode\": \"2222\",\n \"country\": \"Australia\"\n },\n \"card_token\": \"fke8kly5\",\n \"card_number\": \"512345XXXXXX2346\",\n \"bank_account\": null,\n \"metadata\": {}\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-C-K7IY0XBJ"},"email":{},"reference":{"type":"string","example":"abcd123456"},"first_name":{"type":"string","example":"Harrold"},"last_name":{"type":"string","example":"Holt"},"created_at":{"type":"string","example":"2018-01-18T17:04:23+11:00"},"address":{"type":"object","properties":{"address":{"type":"string","example":"1 Harriet Road"},"city":{"type":"string","example":"Kooliablin"},"state":{"type":"string","example":"NSW"},"postcode":{"type":"string","example":"2222"},"country":{"type":"string","example":"Australia"}}},"card_token":{"type":"string","example":"fke8kly5"},"card_number":{"type":"string","example":"512345XXXXXX2346"},"bank_account":{},"metadata":{"type":"object","properties":{}}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}},"text/plain":{"examples":{"Ruby":{"value":"=> # JSON: {\n \"id\": \"071-C-K7IY0XBJ\",\n \"email\": null,\n \"reference\": \"abcd123456\",\n \"first_name\": \"Harrold\",\n \"last_name\": \"Holt\",\n \"created_at\": \"2018-01-18T17:04:23+11:00\",\n \"address\": {\n \"address\": \"1 Harriet Road\",\n \"city\": \"Kooliablin\",\n \"state\": \"NSW\",\n \"postcode\": \"2222\",\n \"country\": \"Australia\"\n },\n \"card_token\": \"fke8kly5\",\n \"card_number\": \"512345XXXXXX2346\",\n \"bank_account\": null,\n \"metadata\": {\n }\n}"}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl -u TEST:TEST -X PUT https://gateway.pmnts-sandbox.io/v1.0/customers/071-C-K7IY0XBJ -d'\n{ \n \"last_name\": \"Holt\" \n}'"},{"language":"ruby","code":"require 'fat_zebra'\n\nFatZebra.configure do |config|\n config.username = 'TEST'\n config.token = 'TEST'\n config.gateway = :sandbox\nend\n\nFatZebra::Customer.update('071-C-K7IY0XBJ', last_name: 'Holt')"}],"samples-languages":["curl","ruby"]}},"delete":{"summary":"Delete a customer","description":"","operationId":"delete-a-customer","parameters":[{"name":"id","in":"path","description":"ID or Reference","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"cURL":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-C-CMXJWC7L\",\n \"email\": null,\n \"reference\": \"abcd12345\",\n \"first_name\": \"Harrold\",\n \"last_name\": \"Humphries\",\n \"created_at\": \"2018-01-18T16:47:53+11:00\",\n \"address\": {\n \"address\": \"1 Harriet Road\",\n \"city\": \"Kooliablin\",\n \"state\": \"NSW\",\n \"postcode\": \"2222\",\n \"country\": \"Australia\"\n },\n \"card_token\": \"fke8b0fc\",\n \"card_number\": \"512345XXXXXX2346\",\n \"bank_account\": null,\n \"metadata\": {}\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-C-CMXJWC7L"},"email":{},"reference":{"type":"string","example":"abcd12345"},"first_name":{"type":"string","example":"Harrold"},"last_name":{"type":"string","example":"Humphries"},"created_at":{"type":"string","example":"2018-01-18T16:47:53+11:00"},"address":{"type":"object","properties":{"address":{"type":"string","example":"1 Harriet Road"},"city":{"type":"string","example":"Kooliablin"},"state":{"type":"string","example":"NSW"},"postcode":{"type":"string","example":"2222"},"country":{"type":"string","example":"Australia"}}},"card_token":{"type":"string","example":"fke8b0fc"},"card_number":{"type":"string","example":"512345XXXXXX2346"},"bank_account":{},"metadata":{"type":"object","properties":{}}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}},"text/plain":{"examples":{"Ruby":{"value":"=> # JSON: {\n \"id\": \"071-C-WO5D3VT9\",\n \"email\": null,\n \"reference\": \"abcd123\",\n \"first_name\": \"Harrold\",\n \"last_name\": \"Humphries\",\n \"created_at\": \"2017-12-08T16:45:27+11:00\",\n \"address\": {\n \"address\": \"1 Harriet Road\",\n \"city\": \"Kooliablin\",\n \"state\": \"NSW\",\n \"postcode\": \"2222\",\n \"country\": \"Australia\"\n },\n \"card_token\": null,\n \"card_number\": null,\n \"bank_account\": null,\n \"metadata\": {\n }\n}"}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl -u TEST:TEST -X DELETE https://gateway.pmnts-sandbox.io/v1.0/customers/071-C-CMXJWC7L"},{"language":"ruby","code":"require 'fat_zebra'\n\nFatZebra.configure do |config|\n config.username = 'TEST'\n config.token = 'TEST'\n config.gateway = :sandbox\nend\n\nFatZebra::Customer.delete('071-C-WO5D3VT9')"}],"samples-languages":["curl","ruby"]}},"get":{"summary":"Fetch a customer","description":"","operationId":"fetch-a-customer","parameters":[{"name":"id","in":"path","description":"ID or Reference","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"cURL":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-C-JE34F66V\",\n \"email\": \"jim@citizen.com\",\n \"reference\": \"CUST-98198\",\n \"first_name\": \"Jim\",\n \"last_name\": \"Smith\",\n \"created_at\": \"2017-12-04T21:51:11+11:00\",\n \"address\": {\n \"address\": \"1 Citizen Road\",\n \"city\": \"Sydney\",\n \"state\": \"NSW\",\n \"postcode\": \"2000\",\n \"country\": \"Australia\"\n },\n \"card_token\": \"fke89s3v\",\n \"card_number\": \"400555XXXXXX0001\",\n \"bank_account\": null,\n \"metadata\": {}\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-C-JE34F66V"},"email":{"type":"string","example":"jim@citizen.com"},"reference":{"type":"string","example":"CUST-98198"},"first_name":{"type":"string","example":"Jim"},"last_name":{"type":"string","example":"Smith"},"created_at":{"type":"string","example":"2017-12-04T21:51:11+11:00"},"address":{"type":"object","properties":{"address":{"type":"string","example":"1 Citizen Road"},"city":{"type":"string","example":"Sydney"},"state":{"type":"string","example":"NSW"},"postcode":{"type":"string","example":"2000"},"country":{"type":"string","example":"Australia"}}},"card_token":{"type":"string","example":"fke89s3v"},"card_number":{"type":"string","example":"400555XXXXXX0001"},"bank_account":{},"metadata":{"type":"object","properties":{}}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}},"text/plain":{"examples":{"Ruby":{"value":"=> # JSON: {\n \"id\": \"071-C-JE34F66V\",\n \"email\": \"jim@citizen.com\",\n \"reference\": \"CUST-98198\",\n \"first_name\": \"Jim\",\n \"last_name\": \"Smith\",\n \"created_at\": \"2017-12-04T21:51:11+11:00\",\n \"address\": {\n \"address\": \"1 Citizen Road\",\n \"city\": \"Sydney\",\n \"state\": \"NSW\",\n \"postcode\": \"2000\",\n \"country\": \"Australia\"\n },\n \"card_token\": \"fke89s3v\",\n \"card_number\": \"400555XXXXXX0001\",\n \"bank_account\": null,\n \"metadata\": {}\n}"}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl -u TEST:TEST https://gateway.pmnts-sandbox.io/v1.0/customers/071-C-JE34F66V"},{"language":"ruby","code":"require 'fat_zebra'\n\nFatZebra.configure do |config|\n config.username = 'TEST'\n config.token = 'TEST'\n config.gateway = :sandbox\nend\n\nFatZebra::Customer.find('071-C-JE34F66V')"}],"samples-languages":["curl","ruby"]}}},"/bank_accounts":{"post":{"summary":"Create a bank account","description":"","operationId":"create-a-bank-account","responses":{"201":{"description":"201","content":{"application/json":{"examples":{"cURL":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-B-2FOU6UFB\",\n \"account_name\": \"Max Webber\",\n \"account_number\": \"123456789\",\n \"bsb\": \"083-832\",\n \"created_at\": \"2018-01-18T17:45:45+11:00\"\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-B-2FOU6UFB"},"account_name":{"type":"string","example":"Max Webber"},"account_number":{"type":"string","example":"123456789"},"bsb":{"type":"string","example":"083-832"},"created_at":{"type":"string","example":"2018-01-18T17:45:45+11:00"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}},"text/plain":{"examples":{"Result":{"value":"=> # JSON: {\n \"id\": \"071-B-KZC9WJRP\",\n \"account_name\": \"Max Webber\",\n \"account_number\": \"123456789\",\n \"bsb\": \"083-832\",\n \"created_at\": \"2018-01-18T17:56:51+11:00\"\n}"}}}}},"422":{"description":"422","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\":false,\n \"response\":{\n \"id\":\"071-B-FGCEWI9L\",\n \"account_name\":\"Max Webber\",\n \"account_number\":\"123456789\",\n \"bsb\":\"INVALID-FORMAT\",\n \"created_at\":null\n },\n \"errors\":[\n \"Bsb is the incorrect format - please use 123-456\",\"BSB does not appear to be valid - Bank/State code does not exist\"\n ],\n \"test\":true\n}"}},"schema":{"oneOf":[{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-B-Z3DAYJJT"},"account_name":{"type":"string","example":""},"account_number":{"type":"string","example":"123456789"},"bsb":{"type":"string","example":"083-832"},"created_at":{}}},"errors":{"type":"array","items":{"type":"string","example":"Name can't be blank"}},"test":{"type":"boolean","example":true,"default":true}}},{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-B-FGCEWI9L"},"account_name":{"type":"string","example":"Max Webber"},"account_number":{"type":"string","example":"123456789"},"bsb":{"type":"string","example":"INVALID-FORMAT"},"created_at":{}}},"errors":{"type":"array","items":{"type":"string","example":"Bsb is the incorrect format - please use 123-456"}},"test":{"type":"boolean","example":true,"default":true}}}]}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl -u TEST:TEST https://gateway.pmnts-sandbox.io/v1.0/bank_accounts -d'\n{ \n \"account_name\": \"Max Webber\", \n \"account_number\": \"123456789\", \n \"bsb\": \"083-832\", \n \"account_type\": \"AU\" \n}'"},{"language":"ruby","code":"require 'fat_zebra'\n\nFatZebra.configure do |config|\n config.username = 'TEST'\n config.token = 'TEST'\n config.gateway = :sandbox\nend\n\nFatZebra::BankAccount.create(\n account_name: 'Max Webber',\n account_number: '123456789',\n bsb: '083-832',\n account_type: 'AU'\n)"},{"language":"text","code":"curl -u TEST:TEST https://gateway.pmnts-sandbox.io/v1.0/bank_accounts -d \"{ \\\n \\\"account_number\\\": \\\"123456789\\\", \\\n \\\"bsb\\\": \\\"083-832\\\", \\\n \\\"account_type\\\": \\\"AU\\\" \\\n}\"","name":"Error - incomplete arguments"},{"language":"text","code":"curl -u TEST:TEST https://gateway.pmnts-sandbox.io/v1.0/bank_accounts -d \"{ \\\n \\\"account_name\\\": \\\"Max Webber\\\", \\\n \\\"account_number\\\": \\\"123456789\\\", \\\n \\\"bsb\\\": \\\"INVALID-FORMAT\\\", \\\n \\\"account_type\\\": \\\"AU\\\" \\\n}\"","name":"Error - invalid arguments"}],"samples-languages":["curl","ruby","text"]}},"get":{"summary":"List bank accounts","description":"","operationId":"list-bank-accounts","parameters":[{"name":"offset","in":"query","description":"Page number to return","schema":{"type":"integer","format":"int32","default":1}},{"name":"limit","in":"query","description":"Number of results to return","schema":{"type":"integer","format":"int32","default":10}},{"name":"from","in":"query","description":"Lower bound for the time at which the bank account was registered","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","description":"Upper bound for the time at which the bank account was registered","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"cURL":{"value":"{\n \"successful\": true,\n \"response\": [\n {\n \"id\": \"071-B-C2FJI049\",\n \"account_name\": \"Test\",\n \"account_number\": \"12312312\",\n \"bsb\": \"123-123\",\n \"created_at\": \"2018-01-18T10:31:09+11:00\"\n },\n ],\n \"errors\": [],\n \"test\": true,\n \"records\": 10,\n \"total_records\": 570,\n \"page\": 1,\n \"total_pages\": 57\n}"}}},"text/plain":{"examples":{"Ruby":{"value":"=> [# JSON: {\n \"id\": \"071-B-C2FJI049\",\n \"account_name\": \"Test\",\n \"account_number\": \"12312312\",\n \"bsb\": \"123-123\",\n \"created_at\": \"2018-01-18T10:31:09+11:00\"\n},\n# ...\n]"}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl -u TEST:TEST https://gateway.pmnts-sandbox.io/v1.0/bank_accounts?limit=1"},{"language":"ruby","code":"require 'fat_zebra'\n\nFatZebra.configure do |config|\n config.username = 'TEST'\n config.token = 'TEST'\n config.gateway = :sandbox\nend\n\nFatZebra::BankAccount.search.data"}],"samples-languages":["curl","ruby"]}}},"/bank_accounts/{id}":{"get":{"summary":"Fetch a bank account","description":"","operationId":"fetch-a-bank-account","parameters":[{"name":"id","in":"path","description":"The bank account record ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"cURL":{"value":"{\n \"response\" : {\n \"bsb\" : \"123-123\",\n \"account_number\" : \"12312312\",\n \"created_at\" : \"2018-01-18T10:31:09+11:00\",\n \"id\" : \"071-B-C2FJI049\",\n \"account_name\" : \"Test\"\n },\n \"errors\" : [],\n \"test\" : true,\n \"successful\" : true\n}"}},"schema":{"type":"object","properties":{"response":{"type":"object","properties":{"bsb":{"type":"string","example":"123-123"},"account_number":{"type":"string","example":"12312312"},"created_at":{"type":"string","example":"2018-01-18T10:31:09+11:00"},"id":{"type":"string","example":"071-B-C2FJI049"},"account_name":{"type":"string","example":"Test"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true},"successful":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl -u TEST:TEST https://gateway.pmnts-sandbox.io/v1.0/bank_accounts/071-B-C2FJI049"}],"samples-languages":["curl"]}}},"/applicable_surcharge":{"get":{"summary":"Get applicable surcharge","description":"Get the applicable surcharge for a given amount, currency and card number.","operationId":"get-applicable-surcharge","parameters":[{"name":"pan","in":"query","description":"The card number of the debit or credit card","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}},{"name":"amount","in":"query","description":"Amount to be surcharged in the smallest currency unit","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"currency","in":"query","description":"Currency of the amount to be surcharged","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"card_description\": \"credit\",\n \"surcharge_amount\": 1,\n \"surcharge_amount_description\": \"0.9%\",\n \"total_amount\": 101\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"card_description":{"type":"string","example":"credit"},"surcharge_amount":{"type":"integer","example":1,"default":0},"surcharge_amount_description":{"type":"string","example":"0.9%"},"total_amount":{"type":"integer","example":101,"default":0}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": null,\n \"errors\": [\n \"invalid pan\"\n ],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{},"errors":{"type":"array","items":{"type":"string","example":"invalid pan"}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/applicable_surcharge?pan=4242424242424242&amount=100¤cy=AUD -u TEST:TEST"}],"samples-languages":["curl"]}}},"/web_hooks":{"post":{"summary":"Create a webhook","description":"Create webhooks","operationId":"create-a-webhook","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"A name for the web hook"},"mode":{"type":"string","description":"The mode for the web hook. Possible values are: Test or Production"},"address":{"type":"string","description":"The URL for the web hook to target. This must start with http:// or https://"},"authentication_username":{"type":"string","description":"The username for HTTP Basic authentication","default":"Optional"},"authentication_password":{"type":"string","description":"The password for HTTP Basic authentication (optional)","default":"Optional"},"is_active":{"type":"boolean","description":"Activation flag for the webhook","default":false},"events":{"type":"string","description":"A list of events for the web hook to target. This is a comma separated list of events, and it is possible to use wildcards (e.g.`*` for all events, or `direct_entry:*` for all direct entry hooks, or `direct_entry:created,direct_entry:failed`)"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"address\": \"https://www.your-server.com/payment/hook\",\n \"events\": \"*\",\n \"mode\": \"Test\",\n \"authentication_username\": null,\n \"authentication_password\": \"\",\n \"is_active\": true,\n \"name\": \"Test Hook\",\n \"id\": \"071-WH-ABCD1234\"\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"address":{"type":"string","example":"https://www.your-server.com/payment/hook"},"events":{"type":"string","example":"*"},"mode":{"type":"string","example":"Test"},"authentication_username":{},"authentication_password":{"type":"string","example":""},"is_active":{"type":"boolean","example":true,"default":true},"name":{"type":"string","example":"Test Hook"},"id":{"type":"string","example":"071-WH-ABCD1234"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"422":{"description":"422","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\":false,\n \"response\":{\n \"address\":null,\n \"events\":null,\n \"mode\":null,\n \"authentication_username\":null,\n \"authentication_password\":\"\",\n \"is_active\":null,\n \"name\":null,\n \"id\":null\n },\n \"errors\":[\n \"Address can't be blank\",\n \"Events is not included in the list\",\n \"Mode is not included in the list\"\n ],\n \"test\":true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{"address":{},"events":{},"mode":{},"authentication_username":{},"authentication_password":{"type":"string","example":""},"is_active":{},"name":{},"id":{}}},"errors":{"type":"array","items":{"type":"string","example":"Address can't be blank"}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl -X POST https://gateway.pmnts-sandbox.io/v1.0/web_hooks -u TEST:TEST -d'\n {\n \"name\": \"Test Hook\",\n \"mode\": \"Test\",\n \"address\": \"https://www.your-server.com/payment/hook\",\n \"authentication_username\": null,\n \"authentication_password\": null,\n \"is_active\": true,\n \"events\": \"*\"\n }'"},{"language":"ruby","code":"FatZebra::WebHook.create(\n address: 'https://www.your-server.com/payment/hook',\n events: '*',\n mode: 'Test',\n name: \"Test Hook\"\n)"}],"samples-languages":["curl","ruby"]}},"get":{"summary":"List webhooks","description":"List your installed webhooks","operationId":"list-webhooks","parameters":[{"name":"limit","in":"query","description":"The number of records to return per request. The maximum records per request is 50","schema":{"type":"integer","format":"int32","default":10}},{"name":"offset","in":"query","description":"The pagination offset for the request.","schema":{"type":"integer","format":"int32","default":1}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"response\" : [\n {\n \"id\" : \"071-WH-LPN9BZVS\",\n \"authentication_username\" : null,\n \"mode\" : \"Test\",\n \"events\" : \"*\",\n \"is_active\" : null,\n \"address\" : \"http://stage.example.com.au/v1/api/hook_listener\",\n \"authentication_password\" : \"\",\n \"name\" : \"New Test hook\"\n }\n ],\n \"errors\" : [],\n \"successful\" : true,\n \"test\" : true\n}"}},"schema":{"type":"object","properties":{"response":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"071-WH-LPN9BZVS"},"authentication_username":{},"mode":{"type":"string","example":"Test"},"events":{"type":"string","example":"*"},"is_active":{},"address":{"type":"string","example":"http://stage.example.com.au/v1/api/hook_listener"},"authentication_password":{"type":"string","example":""},"name":{"type":"string","example":"New Test hook"}}}},"errors":{"type":"array"},"successful":{"type":"boolean","example":true,"default":true},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/web_hooks -u TEST:TEST"},{"language":"ruby","code":"FatZebra::WebHook.search.data"}],"samples-languages":["curl","ruby"]}}},"/web_hooks/{id}":{"put":{"summary":"Update a webhook","description":"Update a webhook","operationId":"update-a-webhook","parameters":[{"name":"id","in":"path","description":"Id of the webhook","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The mode for the web hook. Possible values are: Test or Production"},"mode":{"type":"string","description":"The mode for the web hook. Possible values are: Test or Production"},"address":{"type":"string","description":"The URL for the web hook to target. This must start with http:// or https://"},"authentication_username":{"type":"string","description":"The username for HTTP Basic authentication","default":"Optional"},"authentication_password":{"type":"string","description":"The password for HTTP Basic authentication (optional)","default":"Optional"},"events":{"type":"string","description":"A list of events for the web hook to target. This is a comma separated list of events, and it is possible to use wildcards (e.g. `*` for all events, or `direct_entry:*` for all direct entry hooks, or `direct_entry:created,direct_entry:failed`)"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"address\": \"https://www.your-server.com/payment/hook\",\n \"events\": \"*\",\n \"mode\": \"Test\",\n \"authentication_username\": null,\n \"authentication_password\": \"\",\n \"is_active\": null,\n \"name\": \"Test Hook Updated\",\n \"id\": \"071-WH-ABCD1234\"\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"address":{"type":"string","example":"https://www.your-server.com/payment/hook"},"events":{"type":"string","example":"*"},"mode":{"type":"string","example":"Test"},"authentication_username":{},"authentication_password":{"type":"string","example":""},"is_active":{},"name":{"type":"string","example":"Test Hook Updated"},"id":{"type":"string","example":"071-WH-ABCD1234"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl -X PUT https://gateway.pmnts-sandbox.io/v1.0/web_hooks/071-WH-ABCD1234 -u TEST:TEST -d '\n {\n \"name\": \"Test Hook Updated\" \n }'"}],"samples-languages":["curl"]}},"delete":{"summary":"Delete a webhook","description":"Delete a webhook","operationId":"delete-a-webhook","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"address\": \"https://www.your-server.com/payment/hook\",\n \"events\": \"*\",\n \"mode\": \"Test\",\n \"authentication_username\": null,\n \"authentication_password\": \"\",\n \"is_active\": null,\n \"name\": \"Test Hook\",\n \"id\": \"071-WH-ABCD1234\"\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"address":{"type":"string","example":"https://www.your-server.com/payment/hook"},"events":{"type":"string","example":"*"},"mode":{"type":"string","example":"Test"},"authentication_username":{},"authentication_password":{"type":"string","example":""},"is_active":{},"name":{"type":"string","example":"Test Hook"},"id":{"type":"string","example":"071-WH-ABCD1234"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\":false,\n \"response\":null,\n \"errors\":[\"Not Found\"],\n \"test\":true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{},"errors":{"type":"array","items":{"type":"string","example":"Not Found"}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl -X DELETE https://gateway.pmnts-sandbox.io/v1.0/web_hooks/071-WH-ABCD1234 -u TEST:TEST"},{"language":"ruby","code":"FatZebra::WebHook.delete('071-WH-QWV3JF36')"}],"samples-languages":["curl","ruby"]}}},"/payment_plans":{"post":{"summary":"Create a payment plan","description":"","operationId":"create-a-payment-plan","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["customer","amount","frequency","payment_method","anniversary","start_date"],"properties":{"customer":{"type":"string","description":"ID of the customer that the plan should belong to."},"card_token":{"type":"string","description":"The token for a card to link this payment plan to"},"amount":{"type":"integer","description":"Recurring payment amount in the smallest unit of the currency.","format":"int32"},"setup_fee":{"type":"integer","description":"Setup fee to be charged upon creation of the payment plan.","format":"int32"},"frequency":{"type":"string","description":"Frequency of the payments. Acceptable values are: Daily, Weekly, Fortnightly, Monthly, 4 Weekly, Quarterly, Half Yearly, Annually."},"payment_method":{"type":"string","description":"Payment method for the plan - this can be Credit Card or Direct Debit. Note that if the customer is not setup with the defined payment method an error will be returned."},"anniversary":{"type":"integer","description":"Anniversary of the recurring payments. For Weekly and Fortnightly payments this will be the day of the week (1 - Monday, 2 - Tuesday, 3 - Wednesday, 4 - Thursday, 5 - Friday) For Monthly this will be the day of the month. If the day of the month is greater then 28, and the month is shorter then the anniversary this date will be moved forward to the nearest possible date (i.e. a payment for the 31st will fall on the 30th for monthly like September etc).","format":"int32"},"start_date":{"type":"string","description":"Date that the payment plan should start. This must be in the future.","format":"date"},"end_date":{"type":"string","description":"Date that the payment plan should end on. This must be in the future and greater than the start_date.","format":"date"},"reference":{"type":"string","description":"Reference for the payment plan."},"description":{"type":"string","description":"Description for the payment plan (e.g. Model 200R Blender Lay-by)."},"currency":{"type":"string","description":"ISO 4217 currency code for the plan."},"total_count":{"type":"integer","description":"Total number of payments to process for this plan.","format":"int32"},"total_amount":{"type":"integer","description":"Total amount of all payments to be processed for this plan.","format":"int32"},"failed_payment_fee":{"type":"integer","description":"Fee that applies to the retried payment in the event of any declined payment. Note: This amount will compound for the total number of retries (3) performed.","default":0,"format":"int32"},"retry_interval":{"type":"integer","description":"Number of days between payment retries for any declined payments.","default":3,"format":"int32"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\":true,\n \"response\":{\n \"id\":\"071-PP-8389G3DA\",\n \"customer\":\"071-C-JE34F66V\",\n \"amount\":100,\n \"currency\":null,\n \"setup_fee\":0,\n \"frequency\":\"Weekly\",\n \"anniversary\":5,\n \"start_date\":\"2025-07-16\",\n \"end_date\":null,\n \"total_count\":2,\n \"total_amount\":null,\n \"payment_method\":\"Credit Card\",\n \"reference\":\"071-PP-8389G3DA\",\n \"description\":null,\n \"status\":\"Active\",\n \"status_reason\":\"None\",\n \"created_at\":\"2018-07-11T16:23:39+10:00\",\n \"failed_payment_fee\":0,\n \"retry_interval\":3,\n \"status_change_date\":null,\n \"card_token\": \"ABC12345\",\n \"payments\":[\n {\n \"id\":\"071-PT-WQ8LIHI4\",\n \"payment_plan\":\"071-PP-8389G3DA\",\n \"reference\":\"071-PP-8389G3DA-0001\",\n \"amount\":100,\n \"currency\":null,\n \"scheduled_date\":\"2025-07-18\",\n \"payment_method\":\"Credit Card\",\n \"status\":\"Scheduled\",\n \"result\":null,\n \"records\":[]\n },\n {\n \"id\":\"071-PT-QNFQFYW2\",\n \"payment_plan\":\"071-PP-8389G3DA\",\n \"reference\":\"071-PP-8389G3DA-0002\",\n \"amount\":100,\n \"currency\":null,\n \"scheduled_date\":\"2025-07-25\",\n \"payment_method\":\"Credit Card\",\n \"status\":\"Scheduled\",\n \"result\":null,\n \"records\":[]\n }\n ]\n },\n \"errors\":[],\n \"test\":true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-PP-8389G3DA"},"customer":{"type":"string","example":"071-C-JE34F66V"},"amount":{"type":"integer","example":100,"default":0},"currency":{},"setup_fee":{"type":"integer","example":0,"default":0},"frequency":{"type":"string","example":"Weekly"},"anniversary":{"type":"integer","example":5,"default":0},"start_date":{"type":"string","example":"2025-07-16"},"end_date":{},"total_count":{"type":"integer","example":2,"default":0},"total_amount":{},"payment_method":{"type":"string","example":"Credit Card"},"reference":{"type":"string","example":"071-PP-8389G3DA"},"description":{},"status":{"type":"string","example":"Active"},"status_reason":{"type":"string","example":"None"},"created_at":{"type":"string","example":"2018-07-11T16:23:39+10:00"},"failed_payment_fee":{"type":"integer","example":0,"default":0},"retry_interval":{"type":"integer","example":3,"default":0},"status_change_date":{},"card_token":{"type":"string","example":"ABC12345"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"071-PT-WQ8LIHI4"},"payment_plan":{"type":"string","example":"071-PP-8389G3DA"},"reference":{"type":"string","example":"071-PP-8389G3DA-0001"},"amount":{"type":"integer","example":100,"default":0},"currency":{},"scheduled_date":{"type":"string","example":"2025-07-18"},"payment_method":{"type":"string","example":"Credit Card"},"status":{"type":"string","example":"Scheduled"},"result":{},"records":{"type":"array"}}}}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"422":{"description":"422","content":{"application/json":{"examples":{"Invalid Payment Method":{"value":"{\n \"successful\":false,\n \"response\":{\n \"id\":\"071-PP-UV4ZJECK\",\n \"customer\":\"071-C-JE34F66V\",\n \"amount\":100,\n \"currency\":null,\n \"setup_fee\":0,\n \"frequency\":\"Weekly\",\n \"anniversary\":5,\n \"start_date\":\"2025-07-16\",\n \"end_date\":null,\n \"total_count\":2,\n \"total_amount\":null,\n \"payment_method\":\"Debit Card\",\n \"reference\":\"071-PP-UV4ZJECK\",\n \"description\":null,\n \"status\":\"Active\",\n \"status_reason\":\"None\",\n \"created_at\":null,\n \"failed_payment_fee\":0,\n \"retry_interval\":3,\n \"status_change_date\":null,\n \"payments\":[]\n },\n \"errors\":[\"Payment method is not valid\"],\n \"test\":true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-PP-UV4ZJECK"},"customer":{"type":"string","example":"071-C-JE34F66V"},"amount":{"type":"integer","example":100,"default":0},"currency":{},"setup_fee":{"type":"integer","example":0,"default":0},"frequency":{"type":"string","example":"Weekly"},"anniversary":{"type":"integer","example":5,"default":0},"start_date":{"type":"string","example":"2025-07-16"},"end_date":{},"total_count":{"type":"integer","example":2,"default":0},"total_amount":{},"payment_method":{"type":"string","example":"Debit Card"},"reference":{"type":"string","example":"071-PP-UV4ZJECK"},"description":{},"status":{"type":"string","example":"Active"},"status_reason":{"type":"string","example":"None"},"created_at":{},"failed_payment_fee":{"type":"integer","example":0,"default":0},"retry_interval":{"type":"integer","example":3,"default":0},"status_change_date":{},"payments":{"type":"array"}}},"errors":{"type":"array","items":{"type":"string","example":"Payment method is not valid"}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/payment_plans -u TEST:TEST -X POST -d '\n{\n \"customer\": \"071-C-JE34F66V\",\n \"amount\": 100,\n \"frequency\": \"Weekly\",\n \"payment_method\": \"Credit Card\",\n \"anniversary\": 5,\n \"start_date\": \"2025-07-16\",\n \"total_count\": 2\n}'"}],"samples-languages":["curl"]}},"get":{"summary":"List payment plans","description":"","operationId":"list-payment-plans","parameters":[{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"offset","in":"query","schema":{"type":"integer","format":"int32","default":1}},{"name":"limit","in":"query","description":"Maximum number of records to return. Must not be more than 50.","schema":{"type":"integer","format":"int32","default":10}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\":true,\n \"response\":[\n {\n \"id\":\"071-PP-8389G3DA\",\n \"customer\":\"071-C-JE34F66V\",\n \"amount\":100,\n \"currency\":null,\n \"setup_fee\":0,\n \"frequency\":\"Weekly\",\n \"anniversary\":5,\n \"start_date\":\"2025-07-16\",\n \"end_date\":null,\n \"total_count\":2,\n \"total_amount\":null,\n \"payment_method\":\"Credit Card\",\n \"reference\":\"071-PP-8389G3DA\",\n \"description\":null,\n \"status\":\"Active\",\n \"status_reason\":\"None\",\n \"created_at\":\"2018-07-11T16:23:39+10:00\",\n \"failed_payment_fee\":0,\n \"retry_interval\":3,\n \"status_change_date\":null,\n \"payments\":[]\n },\n {\n \"id\":\"071-PP-EFI5O5E3\",\n \"customer\":\"071-C-JMECN7JX\",\n \"amount\":100,\n \"currency\":null,\n \"setup_fee\":0,\n \"frequency\":\"Weekly\",\n \"anniversary\":5,\n \"start_date\":\"2015-07-16\",\n \"end_date\":null,\n \"total_count\":5,\n \"total_amount\":500,\n \"payment_method\":\"Credit Card\",\n \"reference\":\"3cbf0d6975c876c7a2f10ceb81760c06\",\n \"description\":null,\n \"status\":\"Active\",\n \"status_reason\":\"None\",\n \"created_at\":\"2018-06-12T15:38:13+10:00\",\n \"failed_payment_fee\":0,\n \"retry_interval\":3,\n \"status_change_date\":null,\n \"payments\":[]\n }\n ],\n \"errors\":[],\n \"test\":true,\n \"records\":2,\n \"total_records\":346,\n \"page\":1,\n \"total_pages\":173\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"071-PP-8389G3DA"},"customer":{"type":"string","example":"071-C-JE34F66V"},"amount":{"type":"integer","example":100,"default":0},"currency":{},"setup_fee":{"type":"integer","example":0,"default":0},"frequency":{"type":"string","example":"Weekly"},"anniversary":{"type":"integer","example":5,"default":0},"start_date":{"type":"string","example":"2025-07-16"},"end_date":{},"total_count":{"type":"integer","example":2,"default":0},"total_amount":{},"payment_method":{"type":"string","example":"Credit Card"},"reference":{"type":"string","example":"071-PP-8389G3DA"},"description":{},"status":{"type":"string","example":"Active"},"status_reason":{"type":"string","example":"None"},"created_at":{"type":"string","example":"2018-07-11T16:23:39+10:00"},"failed_payment_fee":{"type":"integer","example":0,"default":0},"retry_interval":{"type":"integer","example":3,"default":0},"status_change_date":{},"payments":{"type":"array"}}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true},"records":{"type":"integer","example":2,"default":0},"total_records":{"type":"integer","example":346,"default":0},"page":{"type":"integer","example":1,"default":0},"total_pages":{"type":"integer","example":173,"default":0}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/payment_plans?limit=2 -u TEST:TEST"}],"samples-languages":["curl"]}}},"/payment_plans/{id_or_reference}":{"put":{"summary":"Update a payment plan","description":"A Payment Plan's status can only be updated to Cancelled, Suspended or Active. For a suspended plan it is possible to set a date the plan is suspended until. \n\nWhen a plan is suspended, any pending payments will be removed. If the plan is resumed, the pending payments will be re-created to meet the plan's constraints.\n\n\nNote:\nPayment plan must be active for any other attributes to be updated.","operationId":"update-a-payment-plan","parameters":[{"name":"id_or_reference","in":"path","description":"ID or merchant's reference of the payment plan to update.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"card_token":{"type":"string","description":"The card token to link this payment plan to"},"new_status":{"type":"string","description":"Status to update to. Valid values are \"Suspended\", \"Active\", \"Cancelled\","},"reason":{"type":"string","description":"Reason for updating payment plan status"},"until_date":{"type":"string","description":"Optionally used when suspending or activating a plan. This date will be saved on the payment plan for record-keeping purposes. The plan will need to be manually actioned on this date.","format":"date"},"amount":{"type":"integer","description":"Recurring payment amount in the smallest unit of the currency.","format":"int32"},"setup_fee":{"type":"integer","description":"Setup fee to be charged upon creation of the payment plan.","format":"int32"},"frequency":{"type":"string","description":"Frequency of the payments. Acceptable values are: Daily, Weekly, Fortnightly, Monthly, 4 Weekly, Quarterly, Half Yearly, Annually."},"payment_method":{"type":"string","description":"Payment method for the plan - this can be Credit Card or Direct Debit. Note that if the customer is not setup with the defined payment method an error will be returned."},"anniversary":{"type":"string","description":"Anniversary of the recurring payments. For Weekly and Fortnightly payments this will be the day of the week (1 - Monday, 2 - Tuesday, 3 - Wednesday, 4 - Thursday, 5 - Friday) For Monthly this will be the day of the month. If the day of the month is greater then 28, and the month is shorter then the anniversary this date will be moved forward to the nearest possible date (i.e. a payment for the 31st will fall on the 30th for monthly like September etc)."},"start_date":{"type":"string","description":"Date that the payment plan should start. This must be in the future.","format":"date"},"end_date":{"type":"string","description":"Date that the payment plan should end on. This must be in the future and greater than the start_date.","format":"date"},"reference":{"type":"string","description":"Reference for the payment plan."},"description":{"type":"string","description":"Description for the payment plan (e.g. Model 200R Blender Lay-by)."},"currency":{"type":"string","description":"ISO 4217 currency code for the plan."},"total_count":{"type":"integer","description":"Total number of payments to process for this plan.","format":"int32"},"total_amount":{"type":"integer","description":"Total amount of all payments to be processed for this plan.","format":"int32"},"failed_payment_fee":{"type":"integer","description":"Fee that applies to the retried payment in the event of any declined payment. Note: This amount will compound for the total number of retries (3) performed.","default":0,"format":"int32"},"retry_interval":{"type":"integer","description":"Number of days between payment retries for any declined payments.","default":3,"format":"int32"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"cURL Suspend 200 OK":{"value":"{\n \"successful\":true,\n \"response\":{\n \"id\":\"071-PP-8389G3DA\",\n \"customer\":\"071-C-JE34F66V\",\n \"amount\":100,\n \"currency\":null,\"setup_fee\":0,\n \"frequency\":\"Weekly\",\n \"anniversary\":5,\n \"start_date\":\"2025-07-16\",\n \"end_date\":null,\n \"total_count\":2,\n \"total_amount\":null,\n \"payment_method\":\"Credit Card\",\n \"reference\":\"071-PP-8389G3DA\",\n \"description\":null,\n \"status\":\"Suspended\",\n \"status_reason\":\"Other\",\n \"created_at\":\"2018-07-11T16:23:39+10:00\",\n \"failed_payment_fee\":0,\n \"retry_interval\":3,\n \"status_change_date\":null,\n \"card_token\": \"ABC12345\",\n \"payments\":[]\n },\n \"errors\":[],\n \"test\":true\n}"},"cURL Update 200 OK":{"value":"{\n \"successful\":true,\n \"response\":{\n \"amount\":100,\n \"currency\":\"AUD\",\n \"setup_fee\":0,\n \"frequency\":\"Weekly\",\n \"anniversary\":5,\n \"start_date\":\"2025-07-17\",\n \"end_date\":\"nil\",\n \"total_count\":2,\n \"total_amount\":200,\n \"payment_method\":\"Credit Card\",\n \"reference\":\"8774b9d1-57b3-4bc7-854b-f81ae1e51aa7\",\n \"description\":\"nil\",\n \"status\":\"Active\",\n \"status_reason\":\"None\",\n \"created_at\":\"2022-11-24T09:22:02+11:00\",\n \"failed_payment_fee\":0,\n \"retry_interval\":1,\n \"status_change_date\":\"nil\",\n \"display_reason\":\"None\",\n \"card_token\": \"ABC12345\",\n \"payments\":[\n {\n \"id\":\"001-PT-ZD1Y124\",\n \"payment_plan\":\"001-PP-2CLZQHLI\",\n \"reference\":\"8774b9d1-57b3-4bc7-854b-f81ae1e51aa7-0001\",\n \"amount\":100,\n \"currency\":\"AUD\",\n \"scheduled_date\":\"2025-07-18\",\n \"payment_method\":\"Credit Card\",\n \"status\":\"Scheduled\",\n \"result\":\"nil\",\n \"records\":[\n \n ]\n },\n {\n \"id\":\"001-PT-L1MCLPL6\",\n \"payment_plan\":\"001-PP-2CLZQHLI\",\n \"reference\":\"8774b9d1-57b3-4bc7-854b-f81ae1e51aa7-0002\",\n \"amount\":100,\n \"currency\":\"AUD\",\n \"scheduled_date\":\"2025-07-25\",\n \"payment_method\":\"Credit Card\",\n \"status\":\"Scheduled\",\n \"result\":\"nil\",\n \"records\":[\n \n ]\n }\n ]\n },\n \"errors\":[],\n \"test\":true\n}"}},"schema":{"oneOf":[{"title":"cURL Suspend 200 OK","type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-PP-8389G3DA"},"customer":{"type":"string","example":"071-C-JE34F66V"},"amount":{"type":"integer","example":100,"default":0},"currency":{},"setup_fee":{"type":"integer","example":0,"default":0},"frequency":{"type":"string","example":"Weekly"},"anniversary":{"type":"integer","example":5,"default":0},"start_date":{"type":"string","example":"2025-07-16"},"end_date":{},"total_count":{"type":"integer","example":2,"default":0},"total_amount":{},"payment_method":{"type":"string","example":"Credit Card"},"reference":{"type":"string","example":"071-PP-8389G3DA"},"description":{},"status":{"type":"string","example":"Suspended"},"status_reason":{"type":"string","example":"Other"},"created_at":{"type":"string","example":"2018-07-11T16:23:39+10:00"},"failed_payment_fee":{"type":"integer","example":0,"default":0},"retry_interval":{"type":"integer","example":3,"default":0},"status_change_date":{},"card_token":{"type":"string","example":"ABC12345"},"payments":{"type":"array"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}},{"title":"cURL Update 200 OK","type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"amount":{"type":"integer","example":100,"default":0},"currency":{"type":"string","example":"AUD"},"setup_fee":{"type":"integer","example":0,"default":0},"frequency":{"type":"string","example":"Weekly"},"anniversary":{"type":"integer","example":5,"default":0},"start_date":{"type":"string","example":"2025-07-17"},"end_date":{"type":"string","example":"nil"},"total_count":{"type":"integer","example":2,"default":0},"total_amount":{"type":"integer","example":200,"default":0},"payment_method":{"type":"string","example":"Credit Card"},"reference":{"type":"string","example":"8774b9d1-57b3-4bc7-854b-f81ae1e51aa7"},"description":{"type":"string","example":"nil"},"status":{"type":"string","example":"Active"},"status_reason":{"type":"string","example":"None"},"created_at":{"type":"string","example":"2022-11-24T09:22:02+11:00"},"failed_payment_fee":{"type":"integer","example":0,"default":0},"retry_interval":{"type":"integer","example":1,"default":0},"status_change_date":{"type":"string","example":"nil"},"display_reason":{"type":"string","example":"None"},"card_token":{"type":"string","example":"ABC12345"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"001-PT-ZD1Y124"},"payment_plan":{"type":"string","example":"001-PP-2CLZQHLI"},"reference":{"type":"string","example":"8774b9d1-57b3-4bc7-854b-f81ae1e51aa7-0001"},"amount":{"type":"integer","example":100,"default":0},"currency":{"type":"string","example":"AUD"},"scheduled_date":{"type":"string","example":"2025-07-18"},"payment_method":{"type":"string","example":"Credit Card"},"status":{"type":"string","example":"Scheduled"},"result":{"type":"string","example":"nil"},"records":{"type":"array"}}}}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}]}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\":false,\n \"response\":{},\n \"errors\":[\"Could not find Payment Plan\"],\n \"test\":true\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 Payment Plan"}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/payment_plans/071-PP-8389G3DA -u TEST:TEST -X PUT -d '\n{\n \"new_status\": \"Suspended\",\n \"until_date\": \"2025-08-25\"\n}'","name":"cURL Suspend"},{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/payment_plans/071-PP-8389G3DA -u TEST:TEST -X PUT -d '\n{\n \"amount\": 100,\n \"frequency\": \"Weekly\",\n \"payment_method\": \"Credit Card\",\n \"anniversary\": 5,\n \"start_date\": \"2025-07-16\",\n \"total_count\": 2\n}'","name":"cURL Update"}],"samples-languages":["curl"]}},"delete":{"summary":"Cancel a payment plan","description":"Payment Plans can be cancelled which removed any scheduled payments and stops the plan from being processed. Once a Plan has been cancelled it is considered 'Deleted' and cannot be re-activated.","operationId":"cancel-a-payment-plan","parameters":[{"name":"id_or_reference","in":"path","description":"ID or reference of the payment plan to cancel.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\":true,\n \"response\":{\n \"id\":\"071-PP-8389G3DA\",\n \"customer\":\"071-C-JE34F66V\",\n \"amount\":100,\n \"currency\":null,\n \"setup_fee\":0,\n \"frequency\":\"Weekly\",\n \"anniversary\":5,\n \"start_date\":\"2025-07-16\",\n \"end_date\":null,\n \"total_count\":2,\n \"total_amount\":null,\n \"payment_method\":\"Credit Card\",\n \"reference\":\"071-PP-8389G3DA\",\n \"description\":null,\n \"status\":\"Cancelled\",\n \"status_reason\":\"Other\",\n \"created_at\":\"2018-07-11T16:23:39+10:00\",\n \"failed_payment_fee\":0,\n \"retry_interval\":3,\n \"status_change_date\":null,\n \"payments\":[]\n },\n \"errors\":[],\n \"test\":true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-PP-8389G3DA"},"customer":{"type":"string","example":"071-C-JE34F66V"},"amount":{"type":"integer","example":100,"default":0},"currency":{},"setup_fee":{"type":"integer","example":0,"default":0},"frequency":{"type":"string","example":"Weekly"},"anniversary":{"type":"integer","example":5,"default":0},"start_date":{"type":"string","example":"2025-07-16"},"end_date":{},"total_count":{"type":"integer","example":2,"default":0},"total_amount":{},"payment_method":{"type":"string","example":"Credit Card"},"reference":{"type":"string","example":"071-PP-8389G3DA"},"description":{},"status":{"type":"string","example":"Cancelled"},"status_reason":{"type":"string","example":"Other"},"created_at":{"type":"string","example":"2018-07-11T16:23:39+10:00"},"failed_payment_fee":{"type":"integer","example":0,"default":0},"retry_interval":{"type":"integer","example":3,"default":0},"status_change_date":{},"payments":{"type":"array"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\":false,\n \"response\":{},\n \"errors\":[\"Could not find Payment Plan\"],\n \"test\":true\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 Payment Plan"}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/payment_plans/071-PP-8389G3DA -u TEST:TEST -X DELETE"},{"language":"ruby","code":"FatZebra::PaymentPlan.delete('071-PP-EFI5O5E3')"}],"samples-languages":["curl","ruby"]}},"get":{"summary":"Fetch a payment plan","description":"","operationId":"fetch-a-payment-plan","parameters":[{"name":"id_or_reference","in":"path","description":"ID or merchant's reference of the payment plan.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\":true,\n \"response\":{\n \"id\":\"071-PP-8389G3DA\",\n \"customer\":\"071-C-JE34F66V\",\n \"amount\":100,\n \"currency\":null,\n \"setup_fee\":0,\n \"frequency\":\"Weekly\",\n \"anniversary\":5,\n \"start_date\":\"2025-07-16\",\n \"end_date\":null,\n \"total_count\":2,\n \"total_amount\":null,\n \"payment_method\":\"Credit Card\",\n \"reference\":\"071-PP-8389G3DA\",\n \"description\":null,\n \"status\":\"Active\",\n \"status_reason\":\"None\",\n \"created_at\":\"2018-07-11T16:23:39+10:00\",\n \"failed_payment_fee\":0,\n \"retry_interval\":3,\n \"status_change_date\":null,\n \"payments\":[\n {\n \"id\":\"071-PT-WQ8LIHI4\",\n \"payment_plan\":\"071-PP-8389G3DA\",\n \"reference\":\"071-PP-8389G3DA-0001\",\n \"amount\":100,\n \"currency\":null,\n \"scheduled_date\":\"2025-07-18\",\n \"payment_method\":\"Credit Card\",\n \"status\":\"Scheduled\",\n \"result\":null,\n \"records\":[]\n },\n {\n \"id\":\"071-PT-QNFQFYW2\",\n \"payment_plan\":\"071-PP-8389G3DA\",\n \"reference\":\"071-PP-8389G3DA-0002\",\n \"amount\":100,\n \"currency\":null,\n \"scheduled_date\":\"2025-07-25\",\n \"payment_method\":\"Credit Card\",\n \"status\":\"Scheduled\",\n \"result\":null,\n \"records\":[]\n }\n ]\n },\n \"errors\":[],\n \"test\":true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-PP-8389G3DA"},"customer":{"type":"string","example":"071-C-JE34F66V"},"amount":{"type":"integer","example":100,"default":0},"currency":{},"setup_fee":{"type":"integer","example":0,"default":0},"frequency":{"type":"string","example":"Weekly"},"anniversary":{"type":"integer","example":5,"default":0},"start_date":{"type":"string","example":"2025-07-16"},"end_date":{},"total_count":{"type":"integer","example":2,"default":0},"total_amount":{},"payment_method":{"type":"string","example":"Credit Card"},"reference":{"type":"string","example":"071-PP-8389G3DA"},"description":{},"status":{"type":"string","example":"Active"},"status_reason":{"type":"string","example":"None"},"created_at":{"type":"string","example":"2018-07-11T16:23:39+10:00"},"failed_payment_fee":{"type":"integer","example":0,"default":0},"retry_interval":{"type":"integer","example":3,"default":0},"status_change_date":{},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"071-PT-WQ8LIHI4"},"payment_plan":{"type":"string","example":"071-PP-8389G3DA"},"reference":{"type":"string","example":"071-PP-8389G3DA-0001"},"amount":{"type":"integer","example":100,"default":0},"currency":{},"scheduled_date":{"type":"string","example":"2025-07-18"},"payment_method":{"type":"string","example":"Credit Card"},"status":{"type":"string","example":"Scheduled"},"result":{},"records":{"type":"array"}}}}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}},"text/plain":{"examples":{"Result":{"value":"# JSON: {..."}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\":false,\n \"response\":{},\n \"errors\":[\"Could not find Payment Plan\"],\n \"test\":true\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 Payment Plan"}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/payment_plans/071-PP-8389G3DA -u TEST:TEST"},{"language":"ruby","code":"FatZebra::PaymentPlan.find('071-PP-EFI5O5E3')"}],"samples-languages":["curl","ruby"]}}},"/settlement/totals":{"get":{"summary":"Fetch settlement totals","description":"","operationId":"fetch-settlement-totals","parameters":[{"name":"date","in":"query","schema":{"type":"string","format":"date"}},{"name":"currency","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"date\": \"2018-03-27\",\n \"currency\": \"AUD\",\n \"totals\": [\n {\n \"scheme\": \"AMEX\",\n \"purchases\": {\n \"amount\": 6000,\n \"count\": 3\n },\n \"refunds\": {\n \"amount\": 0,\n \"count\": 0\n },\n \"total\": {\n \"amount\": 6000,\n \"count\": 3\n }\n },\n {\n \"scheme\": \"MasterCard\",\n \"purchases\": {\n \"amount\": 189259,\n \"count\": 15\n },\n \"refunds\": {\n \"amount\": 0,\n \"count\": 0\n },\n \"total\": {\n \"amount\": 189259,\n \"count\": 15\n }\n },\n {\n \"scheme\": \"VISA\",\n \"purchases\": {\n \"amount\": 90800,\n \"count\": 185\n },\n \"refunds\": {\n \"amount\": -200,\n \"count\": 2\n },\n \"total\": {\n \"amount\": 90600,\n \"count\": 187\n }\n }\n ]\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"date":{"type":"string","example":"2018-03-27"},"currency":{"type":"string","example":"AUD"},"totals":{"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string","example":"AMEX"},"purchases":{"type":"object","properties":{"amount":{"type":"integer","example":6000,"default":0},"count":{"type":"integer","example":3,"default":0}}},"refunds":{"type":"object","properties":{"amount":{"type":"integer","example":0,"default":0},"count":{"type":"integer","example":0,"default":0}}},"total":{"type":"object","properties":{"amount":{"type":"integer","example":6000,"default":0},"count":{"type":"integer","example":3,"default":0}}}}}}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/settlement/totals?currency=AUD&date=2018-03-27 -u TEST:TEST"}],"samples-languages":["curl"]}}},"/invoices/{reference}":{"get":{"summary":"Fetch an invoice","description":"Individual invoices can be retrieved by their reference.","operationId":"fetch-an-invoice","parameters":[{"name":"reference","in":"path","description":"Reference of the invoice to be fetched.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"amount\": 7500,\n \"currency\": \"AUD\",\n \"description\": \"Animal Registrations\",\n \"reference\": \"X2\",\n \"payable\": true\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"amount":{"type":"integer","example":7500,"default":0},"currency":{"type":"string","example":"AUD"},"description":{"type":"string","example":"Animal Registrations"},"reference":{"type":"string","example":"X2"},"payable":{"type":"boolean","example":true,"default":true}}},"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/invoices/X2 -u TEST:TEST"}],"samples-languages":["curl"]}}},"/invoice_imports/4a70e8d5-1d7d-441d-9ea2-30d15ff0f2e8":{"get":{"summary":"Check replacement status","description":"","operationId":"check-invoice-import-status","responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\":true,\n \"response\":{\n \"uuid\":\"4a70e8d5-1d7d-441d-9ea2-30d15ff0f2e8\",\n \"status\":\"complete\",\n \"error\":null,\n \"invoice_count\":991\n },\n \"errors\":[],\n \"test\":true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"uuid":{"type":"string","example":"4a70e8d5-1d7d-441d-9ea2-30d15ff0f2e8"},"status":{"type":"string","example":"complete"},"error":{},"invoice_count":{"type":"integer","example":991,"default":0}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/invoice_imports/4a70e8d5-1d7d-441d-9ea2-30d15ff0f2e8 -u TEST:TEST"}],"samples-languages":["curl"]}}},"/invoices":{"put":{"summary":"Replace all invoices","description":"**Note: This action will replace all existing invoices.**","operationId":"import-invoices","responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\":true,\n \"response\":{\n \"uuid\":\"4a70e8d5-1d7d-441d-9ea2-30d15ff0f2e8\",\n \"status\":\"pending\"\n },\n \"errors\":[],\n \"test\":true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"uuid":{"type":"string","example":"4a70e8d5-1d7d-441d-9ea2-30d15ff0f2e8"},"status":{"type":"string","example":"pending"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl -X PUT https://gateway.pmnts-sandbox.io/v1.0/invoices -u TEST:TEST --data-binary @invoices.csv -H \"Content-Type: text/csv"}],"samples-languages":["curl"]}}},"/paypal/orders":{"get":{"summary":"List orders","description":"","operationId":"paypal-list-orders","parameters":[{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}},{"name":"offset","in":"query","description":"Offset to start","schema":{"type":"integer","format":"int32","default":1}},{"name":"limit","in":"query","description":"Number of records in the response","schema":{"type":"integer","format":"int32","default":10}},{"name":"from","in":"query","description":"Lower bound for the time at which the record was created","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"Upper bound for the time at which the record was created","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": [\n {\n \"id\": \"071-PPO-T2OBQZZEDUSYHW3M\",\n \"reference\": \"ref_12345_486873\",\n \"amount\": 12000,\n \"decimal_amount\": 120.0,\n \"successful\": true,\n \"message\": \"Approved\",\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-PPO-T2OBQZZEDUSYHW3M\",\n \"transaction_date\": \"2020-08-28T15:39:16+10:00\",\n \"intent\": \"Capture\",\n \"paypal_reference\": \"ref_12345_486873\",\n \"invoice_id\": \"ref_12345_486873\",\n \"billing_agreement_id\": null,\n \"status\": \"Completed\",\n \"payment_source\": null,\n \"authorized_amount\": 0.0,\n \"captured_amount\": 120.0,\n \"refunded_amount\": 0.0,\n \"authorizations\": [],\n \"captures\": [\n {\n \"id\": \"071-PPC-VJ9ZTJP55GXSVNC6\",\n \"status\": \"Completed\",\n \"captured\": true,\n \"amount\": 12000,\n \"decimal_amount\": 120.0,\n \"successful\": true,\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-PPC-VJ9ZTJP55GXSVNC6\",\n \"transaction_date\": \"2020-08-28T15:39:16+10:00\",\n \"invoice_id\": \"ref_12345_486873\",\n \"paypal_fee\": 318,\n \"seller_receivable_net_amount\": 11682,\n \"note_to_payer\": \"Sporting Goods\",\n \"is_final_capture\": true\n }\n ],\n \"refunds\": [],\n \"payer\": {\n \"id\": \"SNGQ72BA8UA4W\",\n \"email\": \"test-buyer@example.com\",\n \"address\": { \"country_code\": \"AU\" }\n },\n \"payee\": {\n \"id\": \"GE53HS375QX4J\",\n \"email\": \"test-seller@example.com\"\n }\n }\n ],\n \"errors\": [],\n \"records\": 2,\n \"total_records\": 10,\n \"page\": 1,\n \"total_pages\": 1 \n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"071-PPO-T2OBQZZEDUSYHW3M"},"reference":{"type":"string","example":"ref_12345_486873"},"amount":{"type":"integer","example":12000,"default":0},"decimal_amount":{"type":"integer","example":120,"default":0},"successful":{"type":"boolean","example":true,"default":true},"message":{"type":"string","example":"Approved"},"currency":{"type":"string","example":"AUD"},"transaction_id":{"type":"string","example":"071-PPO-T2OBQZZEDUSYHW3M"},"transaction_date":{"type":"string","example":"2020-08-28T15:39:16+10:00"},"intent":{"type":"string","example":"Capture"},"paypal_reference":{"type":"string","example":"ref_12345_486873"},"invoice_id":{"type":"string","example":"ref_12345_486873"},"billing_agreement_id":{},"status":{"type":"string","example":"Completed"},"payment_source":{},"authorized_amount":{"type":"integer","example":0,"default":0},"captured_amount":{"type":"integer","example":120,"default":0},"refunded_amount":{"type":"integer","example":0,"default":0},"authorizations":{"type":"array"},"captures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"071-PPC-VJ9ZTJP55GXSVNC6"},"status":{"type":"string","example":"Completed"},"captured":{"type":"boolean","example":true,"default":true},"amount":{"type":"integer","example":12000,"default":0},"decimal_amount":{"type":"integer","example":120,"default":0},"successful":{"type":"boolean","example":true,"default":true},"currency":{"type":"string","example":"AUD"},"transaction_id":{"type":"string","example":"071-PPC-VJ9ZTJP55GXSVNC6"},"transaction_date":{"type":"string","example":"2020-08-28T15:39:16+10:00"},"invoice_id":{"type":"string","example":"ref_12345_486873"},"paypal_fee":{"type":"integer","example":318,"default":0},"seller_receivable_net_amount":{"type":"integer","example":11682,"default":0},"note_to_payer":{"type":"string","example":"Sporting Goods"},"is_final_capture":{"type":"boolean","example":true,"default":true}}}},"refunds":{"type":"array"},"payer":{"type":"object","properties":{"id":{"type":"string","example":"SNGQ72BA8UA4W"},"email":{"type":"string","example":"test-buyer@example.com"},"address":{"type":"object","properties":{"country_code":{"type":"string","example":"AU"}}}}},"payee":{"type":"object","properties":{"id":{"type":"string","example":"GE53HS375QX4J"},"email":{"type":"string","example":"test-seller@example.com"}}}}}},"errors":{"type":"array"},"records":{"type":"integer","example":2,"default":0},"total_records":{"type":"integer","example":10,"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/paypal/orders -u TEST:TEST"},{"language":"ruby","code":"FatZebra::Paypal::Order.search"}],"samples-languages":["curl","ruby"]}}},"/paypal/orders/{id}":{"get":{"summary":"Fetch an order","description":"","operationId":"paypal-fetch-an-order","parameters":[{"name":"id","in":"path","description":"The ID of the order.","schema":{"type":"string"},"required":true},{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-PPO-T2OBQZZEDUSYHW3M\",\n \"reference\": \"ref_12345_486873\",\n \"amount\": 12000,\n \"decimal_amount\": 120.0,\n \"successful\": true,\n \"message\": \"Approved\",\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-PPO-T2OBQZZEDUSYHW3M\",\n \"transaction_date\": \"2020-08-28T15:39:16+10:00\",\n \"intent\": \"Capture\",\n \"paypal_reference\": \"ref_12345_486873\",\n \"invoice_id\": \"ref_12345_486873\",\n \"billing_agreement_id\": null,\n \"status\": \"Completed\",\n \"payment_source\": null,\n \"authorized_amount\": 0.0,\n \"captured_amount\": 120.0,\n \"refunded_amount\": 0.0,\n \"authorizations\": [],\n \"captures\": [\n {\n \"id\": \"071-PPC-VJ9ZTJP55GXSVNC6\",\n \"status\": \"Completed\",\n \"captured\": true,\n \"amount\": 12000,\n \"decimal_amount\": 120.0,\n \"successful\": true,\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-PPC-VJ9ZTJP55GXSVNC6\",\n \"transaction_date\": \"2020-08-28T15:39:16+10:00\",\n \"invoice_id\": \"ref_12345_486873\",\n \"paypal_fee\": 318,\n \"seller_receivable_net_amount\": 11682,\n \"note_to_payer\": \"Sporting Goods\",\n \"is_final_capture\": true\n }\n ],\n \"refunds\": [],\n \"payer\": {\n \"id\": \"SNGQ72BA8UA4W\",\n \"email\": \"test-buyer@example.com\",\n \"address\": { \"country_code\": \"AU\" }\n },\n \"payee\": {\n \"id\": \"GE53HS375QX4J\",\n \"email\": \"test-seller@example.com\"\n }\n },\n \"errors\": []\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-PPO-T2OBQZZEDUSYHW3M"},"reference":{"type":"string","example":"ref_12345_486873"},"amount":{"type":"integer","example":12000,"default":0},"decimal_amount":{"type":"integer","example":120,"default":0},"successful":{"type":"boolean","example":true,"default":true},"message":{"type":"string","example":"Approved"},"currency":{"type":"string","example":"AUD"},"transaction_id":{"type":"string","example":"071-PPO-T2OBQZZEDUSYHW3M"},"transaction_date":{"type":"string","example":"2020-08-28T15:39:16+10:00"},"intent":{"type":"string","example":"Capture"},"paypal_reference":{"type":"string","example":"ref_12345_486873"},"invoice_id":{"type":"string","example":"ref_12345_486873"},"billing_agreement_id":{},"status":{"type":"string","example":"Completed"},"payment_source":{},"authorized_amount":{"type":"integer","example":0,"default":0},"captured_amount":{"type":"integer","example":120,"default":0},"refunded_amount":{"type":"integer","example":0,"default":0},"authorizations":{"type":"array"},"captures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"071-PPC-VJ9ZTJP55GXSVNC6"},"status":{"type":"string","example":"Completed"},"captured":{"type":"boolean","example":true,"default":true},"amount":{"type":"integer","example":12000,"default":0},"decimal_amount":{"type":"integer","example":120,"default":0},"successful":{"type":"boolean","example":true,"default":true},"currency":{"type":"string","example":"AUD"},"transaction_id":{"type":"string","example":"071-PPC-VJ9ZTJP55GXSVNC6"},"transaction_date":{"type":"string","example":"2020-08-28T15:39:16+10:00"},"invoice_id":{"type":"string","example":"ref_12345_486873"},"paypal_fee":{"type":"integer","example":318,"default":0},"seller_receivable_net_amount":{"type":"integer","example":11682,"default":0},"note_to_payer":{"type":"string","example":"Sporting Goods"},"is_final_capture":{"type":"boolean","example":true,"default":true}}}},"refunds":{"type":"array"},"payer":{"type":"object","properties":{"id":{"type":"string","example":"SNGQ72BA8UA4W"},"email":{"type":"string","example":"test-buyer@example.com"},"address":{"type":"object","properties":{"country_code":{"type":"string","example":"AU"}}}}},"payee":{"type":"object","properties":{"id":{"type":"string","example":"GE53HS375QX4J"},"email":{"type":"string","example":"test-seller@example.com"}}}}},"errors":{"type":"array"}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\"Could not find Order\"]\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 Order"}}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/paypal/orders/071-PPO-39KSADSS7YTA8CHM -u TEST:TEST"},{"language":"ruby","code":"FatZebra::Paypal::Order.find('071-PPO-39KSADSS7YTA8CHM')"}],"samples-languages":["curl","ruby"]}}},"/paypal/authorizations":{"get":{"summary":"List authorizations","description":"","operationId":"paypal-list-authorizations","parameters":[{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}},{"name":"offset","in":"query","description":"Offset to start","schema":{"type":"integer","format":"int32","default":1}},{"name":"limit","in":"query","description":"Number of records in the response","schema":{"type":"integer","format":"int32","default":10}},{"name":"from","in":"query","description":"Lower bound for the time at which the record was created","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"Upper bound for the time at which the record was created","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": [\n {\n \"id\": \"071-PPA-0R71TAD4EYV0NPRA\",\n \"amount\": 12000,\n \"decimal_amount\": 120.0,\n \"captured_amount\": 0,\n \"successful\": true,\n \"captured\": false,\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-PPA-0R71TAD4EYV0NPRA\",\n \"transaction_date\": \"2020-08-21T09:33:14+10:00\",\n \"message\": \"Approved\",\n \"status\": \"Created\",\n \"reference\": \"ref_12345_603951\",\n \"refunded_amount\": 0,\n \"balance_available_for_capture\": 13800,\n \"order\": \"071-PPO-SLNVOYHCWTEFWGB6\"\n }\n ],\n \"errors\": [],\n \"records\": 2,\n \"total_records\": 10,\n \"page\": 1,\n \"total_pages\": 1 \n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"071-PPA-0R71TAD4EYV0NPRA"},"amount":{"type":"integer","example":12000,"default":0},"decimal_amount":{"type":"integer","example":120,"default":0},"captured_amount":{"type":"integer","example":0,"default":0},"successful":{"type":"boolean","example":true,"default":true},"captured":{"type":"boolean","example":false,"default":true},"currency":{"type":"string","example":"AUD"},"transaction_id":{"type":"string","example":"071-PPA-0R71TAD4EYV0NPRA"},"transaction_date":{"type":"string","example":"2020-08-21T09:33:14+10:00"},"message":{"type":"string","example":"Approved"},"status":{"type":"string","example":"Created"},"reference":{"type":"string","example":"ref_12345_603951"},"refunded_amount":{"type":"integer","example":0,"default":0},"balance_available_for_capture":{"type":"integer","example":13800,"default":0},"order":{"type":"string","example":"071-PPO-SLNVOYHCWTEFWGB6"}}}},"errors":{"type":"array"},"records":{"type":"integer","example":2,"default":0},"total_records":{"type":"integer","example":10,"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/paypal/authorizations -u TEST:TEST"},{"language":"ruby","code":"FatZebra::Paypal::Authorization.search"}],"samples-languages":["curl","ruby"]}}},"/paypal/authorizations/{id}":{"get":{"summary":"Fetch an authorization","description":"","operationId":"paypal-fetch-an-authorization","parameters":[{"name":"id","in":"path","description":"The ID of the authorization.","schema":{"type":"string"},"required":true},{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-PPA-0R71TAD4EYV0NPRA\",\n \"amount\": 12000,\n \"decimal_amount\": 120.0,\n \"captured_amount\": 0,\n \"successful\": true,\n \"captured\": false,\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-PPA-0R71TAD4EYV0NPRA\",\n \"transaction_date\": \"2020-08-21T09:33:14+10:00\",\n \"message\": \"Approved\",\n \"status\": \"Created\",\n \"reference\": \"ref_12345_603951\",\n \"refunded_amount\": 0,\n \"balance_available_for_capture\": 13800,\n \"order\": \"071-PPO-SLNVOYHCWTEFWGB6\"\n },\n \"errors\": []\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-PPA-0R71TAD4EYV0NPRA"},"amount":{"type":"integer","example":12000,"default":0},"decimal_amount":{"type":"integer","example":120,"default":0},"captured_amount":{"type":"integer","example":0,"default":0},"successful":{"type":"boolean","example":true,"default":true},"captured":{"type":"boolean","example":false,"default":true},"currency":{"type":"string","example":"AUD"},"transaction_id":{"type":"string","example":"071-PPA-0R71TAD4EYV0NPRA"},"transaction_date":{"type":"string","example":"2020-08-21T09:33:14+10:00"},"message":{"type":"string","example":"Approved"},"status":{"type":"string","example":"Created"},"reference":{"type":"string","example":"ref_12345_603951"},"refunded_amount":{"type":"integer","example":0,"default":0},"balance_available_for_capture":{"type":"integer","example":13800,"default":0},"order":{"type":"string","example":"071-PPO-SLNVOYHCWTEFWGB6"}}},"errors":{"type":"array"}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\"Could not find Authorization\"]\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 Authorization"}}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/paypal/auhtorizations/071-PPA-39KSADSS7YTA8CHM -u TEST:TEST"},{"language":"ruby","code":"FatZebra::Paypal::Authorization.find('071-PPA-39KSADSS7YTA8CHM')"}],"samples-languages":["curl","ruby"]}}},"/paypal/authorizations/{id}/capture":{"post":{"summary":"Capture an authorization","description":"","operationId":"paypal-capture-an-authorization","parameters":[{"name":"id","in":"path","description":"ID of the authorization to be captured.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"integer","description":"Amount to be refunded in the smallest unit of the currency.","format":"int32"},"note_to_payer":{"type":"string","description":"A note to be attached with the capture. Will be visible to the customer."},"final_capture":{"type":"boolean","description":"True if this is the final capture on this authorization. False if more captures are going to be made. When net-captured-amount on the authorization touches or exceeds the total_authorized_amount, final_capture is automatically set to True. Merchant can capture up to 115% of the authorized_amount."}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-PPC-9JNQNPWCD3FSOHDG\",\n \"amount\": 199,\n \"decimal_amount\": 1.99,\n \"captured_amount\": 199,\n \"successful\": true,\n \"message\": \"Approved\",\n \"reference\": \"ref_12345_612515\",\n \"captured\": true,\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-PPC-9JNQNPWCD3FSOHDG\",\n \"transaction_date\": \"2020-08-31T08:30:30+10:00\",\n \"status\": \"Completed\",\n \"invoice_id\": \"071-PPC-9JNQNPWCD3FSOHDG\",\n \"paypal_fee\": 35,\n \"seller_receivable_net_amount\": 164,\n \"note_to_payer\": \"$1.99 partial capture\",\n \"is_final_capture\": false,\n \"refunded_amount\": 0,\n \"balance_available_for_refund\": 199,\n \"balance_available_for_capture\": 13601,\n \"authorization\": \"071-PPA-6CQGSNJFKJ1UQF9J\",\n \"order\": \"071-PPO-ZVCVMDEFCBX86RX2\"\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-PPC-9JNQNPWCD3FSOHDG"},"amount":{"type":"integer","example":199,"default":0},"decimal_amount":{"type":"number","example":1.99,"default":0},"captured_amount":{"type":"integer","example":199,"default":0},"successful":{"type":"boolean","example":true,"default":true},"message":{"type":"string","example":"Approved"},"reference":{"type":"string","example":"ref_12345_612515"},"captured":{"type":"boolean","example":true,"default":true},"currency":{"type":"string","example":"AUD"},"transaction_id":{"type":"string","example":"071-PPC-9JNQNPWCD3FSOHDG"},"transaction_date":{"type":"string","example":"2020-08-31T08:30:30+10:00"},"status":{"type":"string","example":"Completed"},"invoice_id":{"type":"string","example":"071-PPC-9JNQNPWCD3FSOHDG"},"paypal_fee":{"type":"integer","example":35,"default":0},"seller_receivable_net_amount":{"type":"integer","example":164,"default":0},"note_to_payer":{"type":"string","example":"$1.99 partial capture"},"is_final_capture":{"type":"boolean","example":false,"default":true},"refunded_amount":{"type":"integer","example":0,"default":0},"balance_available_for_refund":{"type":"integer","example":199,"default":0},"balance_available_for_capture":{"type":"integer","example":13601,"default":0},"authorization":{"type":"string","example":"071-PPA-6CQGSNJFKJ1UQF9J"},"order":{"type":"string","example":"071-PPO-ZVCVMDEFCBX86RX2"}}},"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 \"errors\": [\n \"Paypal Authorization status (Voided) does not allow capture anymore.\"\n ],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{}},"errors":{"type":"array","items":{"type":"string","example":"Paypal Authorization status (Voided) does not allow capture anymore."}},"test":{"type":"boolean","example":true,"default":true}}}}}},"401":{"description":"401","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"errors\": [\n \"Incorrect Username or Token\"\n ],\n \"response\": null\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"errors":{"type":"array","items":{"type":"string","example":"Incorrect Username or Token"}},"response":{}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": null,\n \"errors\": [\n \"Could not find Authorization\"\n ],\n \"test\": true\n}"}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/paypal/authorizations/071-PPA-6CQGSNJFKJ1UQF9J/capture -u TEST:TEST -d'\n{\n\t\"amount\": 199,\n\t\"final_capture\": false,\n\t\"note_to_payer\": \"$1.99 partial capture\"\n}'","name":"cURL"},{"language":"ruby","code":"FatZebra::Paypal::Authorization.capture(\n '071-PPA-6CQGSNJFKJ1UQF9J', \n {\n \"amount\": 199,\n \"final_capture\": false,\n \"note_to_payer\": \"$1.99 partial capture\"\n\t}\n)","name":"Ruby"}],"samples-languages":["curl","ruby"]}}},"/paypal/authorizations/{id}/void":{"post":{"summary":"Void an authorization","description":"","operationId":"paypal-void-an-authorization","parameters":[{"name":"id","in":"path","description":"ID of the authorization to be voided.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-PPA-6CQGSNJFKJ1UQF9J\",\n \"amount\": 12000,\n \"decimal_amount\": 120.0,\n \"captured_amount\": 199,\n \"successful\": true,\n \"captured\": false,\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-PPA-6CQGSNJFKJ1UQF9J\",\n \"transaction_date\": \"2020-08-31T08:10:52+10:00\",\n \"message\": \"Approved\",\n \"status\": \"Voided\",\n \"reference\": \"ref_12345_612515\",\n \"refunded_amount\": 0,\n \"balance_available_for_capture\": 0,\n \"order\": \"071-PPO-ZVCVMDEFCBX86RX2\"\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-PPA-6CQGSNJFKJ1UQF9J"},"amount":{"type":"integer","example":12000,"default":0},"decimal_amount":{"type":"integer","example":120,"default":0},"captured_amount":{"type":"integer","example":199,"default":0},"successful":{"type":"boolean","example":true,"default":true},"captured":{"type":"boolean","example":false,"default":true},"currency":{"type":"string","example":"AUD"},"transaction_id":{"type":"string","example":"071-PPA-6CQGSNJFKJ1UQF9J"},"transaction_date":{"type":"string","example":"2020-08-31T08:10:52+10:00"},"message":{"type":"string","example":"Approved"},"status":{"type":"string","example":"Voided"},"reference":{"type":"string","example":"ref_12345_612515"},"refunded_amount":{"type":"integer","example":0,"default":0},"balance_available_for_capture":{"type":"integer","example":0,"default":0},"order":{"type":"string","example":"071-PPO-ZVCVMDEFCBX86RX2"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"401":{"description":"401","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"errors\": [\n \"Incorrect Username or Token\"\n ],\n \"response\": null\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"errors":{"type":"array","items":{"type":"string","example":"Incorrect Username or Token"}},"response":{}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\n \"Record not found\"\n ],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{}},"errors":{"type":"array","items":{"type":"string","example":"Record not found"}},"test":{"type":"boolean","example":true,"default":true}}}}}},"422":{"description":"422","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\n \"Paypal Authorization expired on 2020-08-22T15:15:57+10:00\"\n ],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{}},"errors":{"type":"array","items":{"type":"string","example":"Paypal Authorization expired on 2020-08-22T15:15:57+10:00"}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/paypal/authorizations/071-PPA-6CQGSNJFKJ1UQF9J/void -u TEST:TEST -d"},{"language":"ruby","code":"FatZebra::Paypal::Authorization.void('071-PPA-6CQGSNJFKJ1UQF9J')"}],"samples-languages":["curl","ruby"]}}},"/paypal/captures":{"get":{"summary":"List captures","description":"","operationId":"paypal-list-captures","parameters":[{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}},{"name":"offset","in":"query","description":"Offset to start","schema":{"type":"integer","format":"int32","default":1}},{"name":"limit","in":"query","description":"Number of records in the response","schema":{"type":"integer","format":"int32","default":10}},{"name":"from","in":"query","description":"Lower bound for the time at which the record was created","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"Upper bound for the time at which the record was created","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": [\n {\n \"id\": \"071-PPC-VJ9ZTJP55GXSVNC6\",\n \"amount\": 12000,\n \"decimal_amount\": 120.0,\n \"captured_amount\": 12000,\n \"successful\": true,\n \"message\": \"Approved\",\n \"reference\": \"ref_12345_486873\",\n \"captured\": true,\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-PPC-VJ9ZTJP55GXSVNC6\",\n \"transaction_date\": \"2020-08-28T15:39:16+10:00\",\n \"status\": \"Completed\",\n \"invoice_id\": \"ref_12345_486873\",\n \"paypal_fee\": 318,\n \"seller_receivable_net_amount\": 11682,\n \"note_to_payer\": \"Sporting Goods\",\n \"is_final_capture\": true,\n \"refunded_amount\": 0,\n \"balance_available_for_refund\": 12000,\n \"balance_available_for_capture\": null,\n \"authorization\": null,\n \"order\": \"071-PPO-T2OBQZZEDUSYHW3M\"\n }\n ],\n \"errors\": [],\n \"records\": 2,\n \"total_records\": 10,\n \"page\": 1,\n \"total_pages\": 1 \n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"071-PPC-VJ9ZTJP55GXSVNC6"},"amount":{"type":"integer","example":12000,"default":0},"decimal_amount":{"type":"integer","example":120,"default":0},"captured_amount":{"type":"integer","example":12000,"default":0},"successful":{"type":"boolean","example":true,"default":true},"message":{"type":"string","example":"Approved"},"reference":{"type":"string","example":"ref_12345_486873"},"captured":{"type":"boolean","example":true,"default":true},"currency":{"type":"string","example":"AUD"},"transaction_id":{"type":"string","example":"071-PPC-VJ9ZTJP55GXSVNC6"},"transaction_date":{"type":"string","example":"2020-08-28T15:39:16+10:00"},"status":{"type":"string","example":"Completed"},"invoice_id":{"type":"string","example":"ref_12345_486873"},"paypal_fee":{"type":"integer","example":318,"default":0},"seller_receivable_net_amount":{"type":"integer","example":11682,"default":0},"note_to_payer":{"type":"string","example":"Sporting Goods"},"is_final_capture":{"type":"boolean","example":true,"default":true},"refunded_amount":{"type":"integer","example":0,"default":0},"balance_available_for_refund":{"type":"integer","example":12000,"default":0},"balance_available_for_capture":{},"authorization":{},"order":{"type":"string","example":"071-PPO-T2OBQZZEDUSYHW3M"}}}},"errors":{"type":"array"},"records":{"type":"integer","example":2,"default":0},"total_records":{"type":"integer","example":10,"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/paypal/captures -u TEST:TEST"},{"language":"ruby","code":"FatZebra::Paypal::Capture.search"}],"samples-languages":["curl","ruby"]}}},"/paypal/captures/{id}":{"get":{"summary":"Fetch a capture","description":"","operationId":"paypal-fetch-a-capture","parameters":[{"name":"id","in":"path","description":"The ID of the capture.","schema":{"type":"string"},"required":true},{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-PPC-VJ9ZTJP55GXSVNC6\",\n \"amount\": 12000,\n \"decimal_amount\": 120.0,\n \"captured_amount\": 12000,\n \"successful\": true,\n \"message\": \"Approved\",\n \"reference\": \"ref_12345_486873\",\n \"captured\": true,\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-PPC-VJ9ZTJP55GXSVNC6\",\n \"transaction_date\": \"2020-08-28T15:39:16+10:00\",\n \"status\": \"Completed\",\n \"invoice_id\": \"ref_12345_486873\",\n \"paypal_fee\": 318,\n \"seller_receivable_net_amount\": 11682,\n \"note_to_payer\": \"Sporting Goods\",\n \"is_final_capture\": true,\n \"refunded_amount\": 0,\n \"balance_available_for_refund\": 12000,\n \"balance_available_for_capture\": null,\n \"authorization\": null,\n \"order\": \"071-PPO-T2OBQZZEDUSYHW3M\"\n },\n \"errors\": []\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-PPC-VJ9ZTJP55GXSVNC6"},"amount":{"type":"integer","example":12000,"default":0},"decimal_amount":{"type":"integer","example":120,"default":0},"captured_amount":{"type":"integer","example":12000,"default":0},"successful":{"type":"boolean","example":true,"default":true},"message":{"type":"string","example":"Approved"},"reference":{"type":"string","example":"ref_12345_486873"},"captured":{"type":"boolean","example":true,"default":true},"currency":{"type":"string","example":"AUD"},"transaction_id":{"type":"string","example":"071-PPC-VJ9ZTJP55GXSVNC6"},"transaction_date":{"type":"string","example":"2020-08-28T15:39:16+10:00"},"status":{"type":"string","example":"Completed"},"invoice_id":{"type":"string","example":"ref_12345_486873"},"paypal_fee":{"type":"integer","example":318,"default":0},"seller_receivable_net_amount":{"type":"integer","example":11682,"default":0},"note_to_payer":{"type":"string","example":"Sporting Goods"},"is_final_capture":{"type":"boolean","example":true,"default":true},"refunded_amount":{"type":"integer","example":0,"default":0},"balance_available_for_refund":{"type":"integer","example":12000,"default":0},"balance_available_for_capture":{},"authorization":{},"order":{"type":"string","example":"071-PPO-T2OBQZZEDUSYHW3M"}}},"errors":{"type":"array"}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\"Could not find Capture\"]\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 Capture"}}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/paypal/captures/071-PPC-39KSADSS7YTA8CHM -u TEST:TEST"},{"language":"ruby","code":"FatZebra::Paypal::Capture.find('071-PPC-39KSADSS7YTA8CHM')"}],"samples-languages":["curl","ruby"]}}},"/paypal/captures/{id}/refund":{"post":{"summary":"Refund a capture","description":"","operationId":"paypal-refund-a-capture","parameters":[{"name":"id","in":"path","description":"The ID of the capture to be refunded","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":"Amount to be refunded in the smallest unit of the currency.","format":"int32"},"note_to_payer":{"type":"string","description":"A note to be attached with the refund. Will be visible to the customer"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-PPR-TIBSYRFOTPSSRGDZ\",\n \"amount\": 1,\n \"refunded\": \"Approved\",\n \"message\": \"Approved\",\n \"transaction_id\": \"071-PPR-TIBSYRFOTPSSRGDZ\",\n \"currency\": \"AUD\",\n \"successful\": true,\n \"transaction_date\": \"2020-08-31T14:59:53+10:00\",\n \"status\": \"Completed\",\n \"note_to_payer\": \"1 cent\",\n \"invoice_id\": \"071-PPR-TIBSYRFOTPSSRGDZ\",\n \"decimal_amount\": 0.01,\n \"paypal_fee\": 0,\n \"seller_payable_net_amount\": 1,\n \"balance_available_for_refund\": 198,\n \"capture\": \"071-PPC-9JNQNPWCD3FSOHDG\",\n \"order\": \"071-PPO-ZVCVMDEFCBX86RX2\"\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-PPR-TIBSYRFOTPSSRGDZ"},"amount":{"type":"integer","example":1,"default":0},"refunded":{"type":"string","example":"Approved"},"message":{"type":"string","example":"Approved"},"transaction_id":{"type":"string","example":"071-PPR-TIBSYRFOTPSSRGDZ"},"currency":{"type":"string","example":"AUD"},"successful":{"type":"boolean","example":true,"default":true},"transaction_date":{"type":"string","example":"2020-08-31T14:59:53+10:00"},"status":{"type":"string","example":"Completed"},"note_to_payer":{"type":"string","example":"1 cent"},"invoice_id":{"type":"string","example":"071-PPR-TIBSYRFOTPSSRGDZ"},"decimal_amount":{"type":"number","example":0.01,"default":0},"paypal_fee":{"type":"integer","example":0,"default":0},"seller_payable_net_amount":{"type":"integer","example":1,"default":0},"balance_available_for_refund":{"type":"integer","example":198,"default":0},"capture":{"type":"string","example":"071-PPC-9JNQNPWCD3FSOHDG"},"order":{"type":"string","example":"071-PPO-ZVCVMDEFCBX86RX2"}}},"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 \"errors\": [\n \"Paypal Capture status (Refunded) does not allow refunds anymore.\"\n ],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{}},"errors":{"type":"array","items":{"type":"string","example":"Paypal Capture status (Refunded) does not allow refunds anymore."}},"test":{"type":"boolean","example":true,"default":true}}}}}},"401":{"description":"401","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"errors\": [\n \"Incorrect Username or Token\"\n ],\n \"response\": null\n}"}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\n \"Could not find Capture\"\n ],\n \"test\": true\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 Capture"}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/paypal/captures/071-PPC-9JNQNPWCD3FSOHDG/refund -u TEST:TEST -d'\n { \n \"amount\": 1,\n \"note_to_payer\": \"1 cent\"\n }'","name":"cURL"},{"language":"ruby","code":"FatZebra::Paypal::Capture.refund(\n '071-PPC-9JNQNPWCD3FSOHDG', \n { \n \"amount\": 1,\n \"note_to_payer\": \"1 cent refund\"\n }\n)","name":"Ruby"}],"samples-languages":["curl","ruby"]}}},"/paypal/refunds":{"get":{"summary":"List refunds","description":"","operationId":"paypal-list-refunds","parameters":[{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}},{"name":"offset","in":"query","description":"Offset to start","schema":{"type":"integer","format":"int32","default":1}},{"name":"limit","in":"query","description":"Number of records in the response","schema":{"type":"integer","format":"int32","default":10}},{"name":"from","in":"query","description":"Lower bound for the time at which the record was created","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"Upper bound for the time at which the record was created","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": [\n {\n \"id\": \"071-PPR-VJ9ZTJP55GXSVNC6\",\n \"amount\": 12000,\n \"refunded\": \"Approved\",\n \"message\": \"Approved\",\n \"transaction_id\": \"071-PPR-VJ9ZTJP55GXSVNC6\",\n \"currency\": \"AUD\",\n \"successful\": true,\n \"transaction_date\": \"2020-08-28T15:39:16+10:00\",,\n \"status\": \"Completed\",\n \"note_to_payer\": \"\",\n \"invoice_id\": \"ref_12345_486873\",,\n \"decimal_amount\": 120.00,\n \"paypal_fee\": 318,\n \"seller_payable_net_amount\": 11682,\n \"balance_available_for_refund\": 0.0,\n \"capture\": \"071-PPC-VJ9ZTJP55GXSVNC6\",\n \"order\": \"071-PPO-T2OBQZZEDUSYHW3M\"\n }\n ],\n \"errors\": [],\n \"records\": 2,\n \"total_records\": 10,\n \"page\": 1,\n \"total_pages\": 1 \n}"}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/paypal/refunds -u TEST:TEST"},{"language":"ruby","code":"FatZebra::Paypal::Refund.search"}],"samples-languages":["curl","ruby"]}}},"/paypal/refunds/{id}":{"get":{"summary":"Fetch a refund","description":"","operationId":"paypal-fetch-a-refund","parameters":[{"name":"id","in":"path","description":"The ID of the refund.","schema":{"type":"string"},"required":true},{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-PPR-VJ9ZTJP55GXSVNC6\",\n \"amount\": 12000,\n \"refunded\": \"Approved\",\n \"message\": \"Approved\",\n \"transaction_id\": \"071-PPR-VJ9ZTJP55GXSVNC6\",\n \"currency\": \"AUD\",\n \"successful\": true,\n \"transaction_date\": \"2020-08-28T15:39:16+10:00\",,\n \"status\": \"Completed\",\n \"note_to_payer\": \"\",\n \"invoice_id\": \"ref_12345_486873\",,\n \"decimal_amount\": 120.00,\n \"paypal_fee\": 318,\n \"seller_payable_net_amount\": 11682,\n \"balance_available_for_refund\": 0.0,\n \"capture\": \"071-PPC-VJ9ZTJP55GXSVNC6\",\n \"order\": \"071-PPO-T2OBQZZEDUSYHW3M\"\n },\n \"errors\": []\n}"}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\"Could not find Refund\"]\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 Refund"}}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/paypal/refunds/071-PPR-39KSADSS7YTA8CHM -u TEST:TEST"},{"language":"ruby","code":"FatZebra::Paypal::Refund.find('071-PPR-39KSADSS7YTA8CHM')"}],"samples-languages":["curl","ruby"]}}},"/paypal/billing_agreements":{"get":{"summary":"List billing agreements","description":"","operationId":"paypal-list-billing-agreements","parameters":[{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}},{"name":"offset","in":"query","description":"Offset to start","schema":{"type":"integer","format":"int32","default":1}},{"name":"limit","in":"query","description":"Number of records in the response","schema":{"type":"integer","format":"int32","default":10}},{"name":"from","in":"query","description":"Lower bound for the time at which the record was created","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"Upper bound for the time at which the record was created","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": [\n {\n \"id\": \"071-PBA-ETCGSDAKH8TPIL99\",\n \"name\": \"Sample Billing Agreement\",\n \"description\": \"Stored PayPal account\",\n \"state\": \"Active\",\n \"payer\": {\n \"payer_info\": {\n \"email\": \"test-buyer@fatzebra.com.au\",\n \"first_name\": \"FZ Test Buyer\",\n \"last_name\": \"Buyer\",\n \"payer_id\": \"SNGQ72BA8UA4W\"\n }\n },\n \"shipping_address\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"address_1\": \"100 Kent Street\",\n \"address_2\": \"Cafe Lane\",\n \"city\": \"Sydney\",\n \"state\": \"NSW\",\n \"postcode\": \"2000\",\n \"country\": \"AU\"\n },\n \"merchant_custom_data\": \"UUID\",\n \"created_at\": \"2020-08-28T15:37:35+10:00\"\n }\n ],\n \"errors\": [],\n \"records\": 2,\n \"total_records\": 10,\n \"page\": 1,\n \"total_pages\": 1 \n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"071-PBA-ETCGSDAKH8TPIL99"},"name":{"type":"string","example":"Sample Billing Agreement"},"description":{"type":"string","example":"Stored PayPal account"},"state":{"type":"string","example":"Active"},"payer":{"type":"object","properties":{"payer_info":{"type":"object","properties":{"email":{"type":"string","example":"test-buyer@fatzebra.com.au"},"first_name":{"type":"string","example":"FZ Test Buyer"},"last_name":{"type":"string","example":"Buyer"},"payer_id":{"type":"string","example":"SNGQ72BA8UA4W"}}}}},"shipping_address":{"type":"object","properties":{"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"address_1":{"type":"string","example":"100 Kent Street"},"address_2":{"type":"string","example":"Cafe Lane"},"city":{"type":"string","example":"Sydney"},"state":{"type":"string","example":"NSW"},"postcode":{"type":"string","example":"2000"},"country":{"type":"string","example":"AU"}}},"merchant_custom_data":{"type":"string","example":"UUID"},"created_at":{"type":"string","example":"2020-08-28T15:37:35+10:00"}}}},"errors":{"type":"array"},"records":{"type":"integer","example":2,"default":0},"total_records":{"type":"integer","example":10,"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/paypal/billing_agreements -u TEST:TEST"},{"language":"ruby","code":"FatZebra::Paypal::BillingAgreement.search"}],"samples-languages":["curl","ruby"]}}},"/paypal/billing_agreements/{id}":{"get":{"summary":"Fetch a billing agreement","description":"","operationId":"paypal-fetch-a-billing-agreement","parameters":[{"name":"id","in":"path","description":"The ID of the billing agreement.","schema":{"type":"string"},"required":true},{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-PBA-ETCGSDAKH8TPIL99\",\n \"name\": \"Sample Billing Agreement\",\n \"description\": \"Stored PayPal account\",\n \"state\": \"Active\",\n \"payer\": {\n \"payer_info\": {\n \"email\": \"test-buyer@example.com\",\n \"first_name\": \"FZ Test Buyer\",\n \"last_name\": \"Buyer\",\n \"payer_id\": \"SNGQ72BA8UA4W\"\n }\n },\n \"shipping_address\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"address_1\": \"100 Kent Street\",\n \"address_2\": \"Cafe Lane\",\n \"city\": \"Sydney\",\n \"state\": \"NSW\",\n \"postcode\": \"2000\",\n \"country\": \"AU\"\n },\n \"merchant_custom_data\": \"UUID\",\n \"created_at\": \"2020-08-28T15:37:35+10:00\"\n },\n \"errors\": []\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-PBA-ETCGSDAKH8TPIL99"},"name":{"type":"string","example":"Sample Billing Agreement"},"description":{"type":"string","example":"Stored PayPal account"},"state":{"type":"string","example":"Active"},"payer":{"type":"object","properties":{"payer_info":{"type":"object","properties":{"email":{"type":"string","example":"test-buyer@example.com"},"first_name":{"type":"string","example":"FZ Test Buyer"},"last_name":{"type":"string","example":"Buyer"},"payer_id":{"type":"string","example":"SNGQ72BA8UA4W"}}}}},"shipping_address":{"type":"object","properties":{"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"address_1":{"type":"string","example":"100 Kent Street"},"address_2":{"type":"string","example":"Cafe Lane"},"city":{"type":"string","example":"Sydney"},"state":{"type":"string","example":"NSW"},"postcode":{"type":"string","example":"2000"},"country":{"type":"string","example":"AU"}}},"merchant_custom_data":{"type":"string","example":"UUID"},"created_at":{"type":"string","example":"2020-08-28T15:37:35+10:00"}}},"errors":{"type":"array"}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\"Could not find Billing Agreement\"]\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 Billing Agreement"}}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/paypal/billing_agreements/071-PBA-39KSADSS7YTA8CHM -u TEST:TEST"},{"language":"ruby","code":"FatZebra::Paypal::BillingAgreement.find('071-PBA-39KSADSS7YTA8CHM')"}],"samples-languages":["curl","ruby"]}}},"/paypal/billing_agreements/{id}/cancel":{"post":{"summary":"Cancel a billing agreement","description":"","operationId":"paypal-cancel-a-billing-agreement","parameters":[{"name":"id","in":"path","description":"The ID of the billing agreement.","schema":{"type":"string"},"required":true},{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-PBA-ETCGSDAKH8TPIL99\",\n \"name\": \"Sample Billing Agreement\",\n \"description\": \"Stored PayPal account\",\n \"state\": \"Inactive\",\n \"payer\": {\n \"payer_info\": {\n \"email\": \"test-buyer@example.com\",\n \"first_name\": \"Test Buyer\",\n \"last_name\": \"Buyer\",\n \"payer_id\": \"SFGQGH2A8UA4W\"\n }\n },\n \"shipping_address\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"address_1\": \"100 Kent Street\",\n \"address_2\": \"Cafe Lane\",\n \"city\": \"Sydney\",\n \"state\": \"NSW\",\n \"postcode\": \"2000\",\n \"country\": \"AU\"\n },\n \"merchant_custom_data\": \"UUID\",\n \"created_at\": \"2020-08-28T15:37:35+10:00\"\n },\n \"errors\": []\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-PBA-ETCGSDAKH8TPIL99"},"name":{"type":"string","example":"Sample Billing Agreement"},"description":{"type":"string","example":"Stored PayPal account"},"state":{"type":"string","example":"Inactive"},"payer":{"type":"object","properties":{"payer_info":{"type":"object","properties":{"email":{"type":"string","example":"test-buyer@example.com"},"first_name":{"type":"string","example":"Test Buyer"},"last_name":{"type":"string","example":"Buyer"},"payer_id":{"type":"string","example":"SFGQGH2A8UA4W"}}}}},"shipping_address":{"type":"object","properties":{"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"address_1":{"type":"string","example":"100 Kent Street"},"address_2":{"type":"string","example":"Cafe Lane"},"city":{"type":"string","example":"Sydney"},"state":{"type":"string","example":"NSW"},"postcode":{"type":"string","example":"2000"},"country":{"type":"string","example":"AU"}}},"merchant_custom_data":{"type":"string","example":"UUID"},"created_at":{"type":"string","example":"2020-08-28T15:37:35+10:00"}}},"errors":{"type":"array"}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\"Could not find Billing Agreement\"]\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 Billing Agreement"}}}}}}},"422":{"description":"422","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\"Billing agreement is not approved\"]\n}\n"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{}},"errors":{"type":"array","items":{"type":"string","example":"Billing agreement is not approved"}}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl -XPOST https://gateway.pmnts-sandbox.io/v1.0/paypal/billing_agreements/071-PBA-39KSADSS7YTA8CHM/cancel -u TEST:TEST"},{"language":"ruby","code":"FatZebra::Paypal::BillingAgreement.cancel('071-PBA-39KSADSS7YTA8CHM')"}],"samples-languages":["curl","ruby"]}}},"/paypal/billing_agreements/{id}/charge":{"post":{"summary":"Charge a billing agreement","description":"","operationId":"paypal-charge-a-billing-agreement","parameters":[{"name":"id","in":"path","description":"The ID of the billing agreement.","schema":{"type":"string"},"required":true},{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["amount","reference","currency","purchases"],"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"},"currency":{"type":"string","description":"Three letter [ISO currency code](https://pmnts.readme.io/v1.0/docs/iso-currency-codes-1), in UPPERCASE","default":"AUD"},"purchases":{"type":"array","description":"An array representing purchases. Please note that currently one item is accepted in this array.","items":{"properties":{"description":{"type":"string","description":"Description of the purchase"},"soft_descriptor":{"type":"string","description":"The payment descriptor on account transactions on the customer's credit card statement, that PayPal sends to processors."},"items":{"type":"array","description":"An array of items that the customer purchases from the merchant","items":{"properties":{"name":{"type":"string","description":"Item name"},"unit_amount":{"type":"integer","description":"Item unit amount","format":"int32"},"qty":{"type":"integer","description":"The item quantity","format":"int32"},"tax":{"type":"integer","description":"The item tax for each unit. If tax is specified, `purchase_units[].amount.breakdown.tax_total` is required. Must equal `tax * quantity` for all items.","format":"int32"},"sku":{"type":"string","description":"The stock keeping unit (SKU) for the item"},"category":{"type":"string","description":"Item category; Possible values: PHYSICAL_GOODS, DIGITAL_GOODS"}},"required":["name","unit_amount","qty"],"type":"object"}},"shipping_address":{"type":"object","properties":{"method":{"type":"string","description":"Shipping address method, e.g. `Australia Post`"},"address":{"type":"object","required":["first_name","last_name","address_1","address_2","city","state","postcode","country"],"properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postcode":{"type":"string"},"country":{"type":"string"}}}}},"amount":{"type":"object","properties":{"amount.item_total":{"type":"integer","description":"The subtotal for all items. Required if the request includes `purchase_units[].items[].unit_amount`. Must equal the sum of (`items[].unit_amount * items[].quantity`) for all items.","format":"int32"},"amount.shipping":{"type":"integer","description":"The shipping fee for all items","format":"int32"},"amount.tax_total":{"type":"integer","description":"The total tax for all items. Required if the request includes `purchase_units.items.tax`. Must equal the sum of (`items[].tax * items[].quantity`) for all items.","format":"int32"},"amount.handling":{"type":"integer","description":"The handling fee for all items","format":"int32"},"amount.shipping_discount":{"type":"integer","description":"The shipping discount for all items","format":"int32"},"amount.discount":{"type":"integer","description":"The discount for all items","format":"int32"},"amount.insurance":{"type":"integer","description":"The insurance fee for all items","format":"int32"}}}},"type":"object"}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"id\": \"071-PPO-8JGDRKEVMBBX6IQH\",\n \"reference\": \"ref_12345_34636456\",\n \"amount\": 12000,\n \"decimal_amount\": 120.0,\n \"successful\": true,\n \"message\": \"Approved\",\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-PPO-8JGDRKEVMBBX6IQH\",\n \"transaction_date\": \"2020-10-13T12:54:02+11:00\",\n \"intent\": \"Capture\",\n \"paypal_reference\": \"ref_12345_34636456\",\n \"invoice_id\": \"ref_12345_34636456\",\n \"billing_agreement_id\": \"071-PBA-KIKSZHGXIQF5POME\",\n \"status\": \"Completed\",\n \"payment_source\": \"BILLING_AGREEMENT\",\n \"authorized_amount\": 0.0,\n \"captured_amount\": 120.0,\n \"refunded_amount\": 0.0,\n \"authorizations\": [],\n \"captures\": [\n {\n \"id\": \"071-PPC-YS3DA76TDUBTJEHB\",\n \"status\": \"Completed\",\n \"captured\": true,\n \"amount\": 12000,\n \"decimal_amount\": 120.0,\n \"successful\": true,\n \"currency\": \"AUD\",\n \"transaction_id\": \"071-PPC-YS3DA76TDUBTJEHB\",\n \"transaction_date\": \"2020-10-13T12:54:03+11:00\",\n \"invoice_id\": \"ref_12345_34636456\",\n \"paypal_fee\": 318,\n \"seller_receivable_net_amount\": 11682,\n \"note_to_payer\": \"Sporting Goods\",\n \"is_final_capture\": true\n }\n ],\n \"refunds\": [],\n \"payer\": {\n \"id\": \"SNGQ72BA8UA4W\",\n \"email\": \"test-buyer@example.com\",\n \"address\": { \"country_code\": \"AU\" }\n },\n \"payee\": { \"id\": \"D5RX47YP2688U\", \"email\": null }\n },\n \"errors\": [],\n \"test\": true\n}\n"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"id":{"type":"string","example":"071-PPO-8JGDRKEVMBBX6IQH"},"reference":{"type":"string","example":"ref_12345_34636456"},"amount":{"type":"integer","example":12000,"default":0},"decimal_amount":{"type":"integer","example":120,"default":0},"successful":{"type":"boolean","example":true,"default":true},"message":{"type":"string","example":"Approved"},"currency":{"type":"string","example":"AUD"},"transaction_id":{"type":"string","example":"071-PPO-8JGDRKEVMBBX6IQH"},"transaction_date":{"type":"string","example":"2020-10-13T12:54:02+11:00"},"intent":{"type":"string","example":"Capture"},"paypal_reference":{"type":"string","example":"ref_12345_34636456"},"invoice_id":{"type":"string","example":"ref_12345_34636456"},"billing_agreement_id":{"type":"string","example":"071-PBA-KIKSZHGXIQF5POME"},"status":{"type":"string","example":"Completed"},"payment_source":{"type":"string","example":"BILLING_AGREEMENT"},"authorized_amount":{"type":"integer","example":0,"default":0},"captured_amount":{"type":"integer","example":120,"default":0},"refunded_amount":{"type":"integer","example":0,"default":0},"authorizations":{"type":"array"},"captures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"071-PPC-YS3DA76TDUBTJEHB"},"status":{"type":"string","example":"Completed"},"captured":{"type":"boolean","example":true,"default":true},"amount":{"type":"integer","example":12000,"default":0},"decimal_amount":{"type":"integer","example":120,"default":0},"successful":{"type":"boolean","example":true,"default":true},"currency":{"type":"string","example":"AUD"},"transaction_id":{"type":"string","example":"071-PPC-YS3DA76TDUBTJEHB"},"transaction_date":{"type":"string","example":"2020-10-13T12:54:03+11:00"},"invoice_id":{"type":"string","example":"ref_12345_34636456"},"paypal_fee":{"type":"integer","example":318,"default":0},"seller_receivable_net_amount":{"type":"integer","example":11682,"default":0},"note_to_payer":{"type":"string","example":"Sporting Goods"},"is_final_capture":{"type":"boolean","example":true,"default":true}}}},"refunds":{"type":"array"},"payer":{"type":"object","properties":{"id":{"type":"string","example":"SNGQ72BA8UA4W"},"email":{"type":"string","example":"test-buyer@example.com"},"address":{"type":"object","properties":{"country_code":{"type":"string","example":"AU"}}}}},"payee":{"type":"object","properties":{"id":{"type":"string","example":"D5RX47YP2688U"},"email":{}}}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\"Could not find Billing Agreement\"]\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 Billing Agreement"}}}}}}},"422":{"description":"422","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\"Billing agreement is not approved\"]\n}\n"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{}},"errors":{"type":"array","items":{"type":"string","example":"Billing agreement is not approved"}}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl -XPOST https://gateway.pmnts-sandbox.io/v1.0/paypal/billing_agreements/071-PBA-39KSADSS7YTA8CHM/charge -u TEST:TEST -d '\n{\n \"currency\": \"AUD\",\n \"reference\": \"ref_12345_34636456\",\n \"amount\": 12000,\n \"purchases\": [\n {\n \"description\": \"Sporting Goods\",\n \"soft_descriptor\": \"HighFashions\",\n \"amount\": { \n \t\"item_total\": 9000, \n \"shipping\": 2000, \n \"tax_total\": 1000 \n },\n \"items\": [\n {\n \"name\": \"T-Shirt\",\n \"unit_amount\": 9000,\n \"tax\": 1000,\n \"qty\": 1,\n \"sku\": \"sku01\",\n \"category\": \"PHYSICAL_GOODS\"\n }\n ],\n \"shipping_address\": {\n \"method\": \"United States Postal Service 1\",\n \"address\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"address_1\": \"100 Kent Street\",\n \"address_2\": \"Cafe Lane\",\n \"city\": \"Sydney\",\n \"state\": \"NSW\",\n \"postcode\": \"2000\",\n \"country\": \"AU\"\n }\n }\n }\n ]\n}'"},{"language":"ruby","code":"FatZebra::Paypal::BillingAgreement.charge('071-PBA-39KSADSS7YTA8CHM', {\n currency: \"AUD\",\n reference: \"ref_12345_34636456\",\n amount: 12000,\n purchases: [\n {\n description: \"Sporting Goods\",\n soft_descriptor: \"HighFashions\",\n amount: { \n item_total: 9000, \n shipping: 2000, \n tax_total: 1000 \n },\n items: [\n {\n name: \"T-Shirt\",\n unit_amount: 9000,\n tax: 1000,\n qty: 1,\n sku: \"sku01\",\n category: \"PHYSICAL_GOODS\"\n }\n ],\n shipping_address: {\n method: \"United States Postal Service 1\",\n address: {\n first_name: \"John\",\n last_name: \"Doe\",\n address_1: \"100 Kent Street\",\n address_2: \"Cafe Lane\",\n city: \"Sydney\",\n state: \"NSW\",\n postcode: \"2000\",\n country: \"AU\"\n }\n }\n }\n ] \n})"}],"samples-languages":["curl","ruby"]}}},"/authenticate/session":{"post":{"summary":"Generate a JWT token","description":"This API generates a JWT token to initiate the SCA/3DS2 process.","operationId":"generate-a-jwt-token","parameters":[{"name":"Content-Type","in":"header","description":"application/json","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","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"},"currency":{"type":"string","description":"Three letter [ISO currency code](https://pmnts.readme.io/docs/iso-currency-codes), in UPPERCASE","default":"AUD"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"jwt\": \"eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NzYxMjcxMTEsImlhdCI6MTU3NjExMjcxMSwiaXNzIjoiNWRjM2VhMzVhZmE4MGQyZWEwZWUxMGU3IiwianRpIjoiMGE0ZTQ1ZjUtZjlmNi00NDNlLWI0OGYtM2IyMWIxMDUxNTg2IiwiT3JnVW5pdElkIjoiNWRiMTVhMzQwMDViOTMwZmM0MGM4OWVlIiwiT2JqZWN0aWZ5UGF5bG9hZCI6dHJ1ZSwiUGF5bG9hZCI6eyJPcmRlckRldGFpbHMiOnsiQ3VycmVuY3lDb2RlIjoiMDM2IiwiQW1vdW50IjoiMTAwIn19fQ.gtcM2t8VdMQcZmG2CJrRiGe0CfIycWwinVva4w-i8F4\"\n },\n \"errors\": [],\n \"test\": true\n}"},"Invalid currency":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\"Currency XXX is not valid for this merchant. Permitted currencies: USD, EUR, GBP, AUD, CAD, JPY, CHF, HKD, NZD, SGD, and JPY\"],\n \"test\": true\n}"},"Invalid amount":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\"Amount is invalid\"],\n \"test\": true\n}"}},"schema":{"oneOf":[{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"jwt":{"type":"string","example":"eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NzYxMjcxMTEsImlhdCI6MTU3NjExMjcxMSwiaXNzIjoiNWRjM2VhMzVhZmE4MGQyZWEwZWUxMGU3IiwianRpIjoiMGE0ZTQ1ZjUtZjlmNi00NDNlLWI0OGYtM2IyMWIxMDUxNTg2IiwiT3JnVW5pdElkIjoiNWRiMTVhMzQwMDViOTMwZmM0MGM4OWVlIiwiT2JqZWN0aWZ5UGF5bG9hZCI6dHJ1ZSwiUGF5bG9hZCI6eyJPcmRlckRldGFpbHMiOnsiQ3VycmVuY3lDb2RlIjoiMDM2IiwiQW1vdW50IjoiMTAwIn19fQ.gtcM2t8VdMQcZmG2CJrRiGe0CfIycWwinVva4w-i8F4"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}},{"title":"Invalid currency","type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{}},"errors":{"type":"array","items":{"type":"string","example":"Currency XXX is not valid for this merchant. Permitted currencies: USD, EUR, GBP, AUD, CAD, JPY, CHF, HKD, NZD, SGD, and JPY"}},"test":{"type":"boolean","example":true,"default":true}}},{"title":"Invalid amount","type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{}},"errors":{"type":"array","items":{"type":"string","example":"Amount is invalid"}},"test":{"type":"boolean","example":true,"default":true}}}]}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/authenticate/session -u TEST:TEST -d'\n { \n \"amount\": 1000, \n \"currency\": \"USD\"\n }'"},{"language":"ruby","code":"FatZebra::Authenticate.session(\n amount: 100,\n currency: 'AUS'\n)"}],"samples-languages":["curl","ruby"]}}},"/authenticate/decode_session":{"get":{"summary":"Decode a JWT token","description":"","operationId":"decode-a-jwt-token","parameters":[{"name":"Content-Type","in":"header","description":"application/json","schema":{"type":"string"}},{"name":"token","in":"query","description":"A JWT token to be decrypted","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"consumer_session_id\": \"bfdfb337-abc5-4aa9-82cc-c837a7352c60\",\n \"type\": \"CCA\",\n \"processor_transaction_id\": \"5d3b3653336a85e4e411b37e1e0a97f6\",\n \"error_number\": 0,\n \"error_description\": \"Success\"\n },\n \"errors\": [],\n \"test\": true\n}"},"Invalid token":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\"The token is invalid\"],\n \"test\": true\n}"}},"schema":{"oneOf":[{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"consumer_session_id":{"type":"string","example":"bfdfb337-abc5-4aa9-82cc-c837a7352c60"},"type":{"type":"string","example":"CCA"},"processor_transaction_id":{"type":"string","example":"5d3b3653336a85e4e411b37e1e0a97f6"},"error_number":{"type":"integer","example":0,"default":0},"error_description":{"type":"string","example":"Success"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}},{"title":"Invalid token","type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{}},"errors":{"type":"array","items":{"type":"string","example":"The token is invalid"}},"test":{"type":"boolean","example":true,"default":true}}}]}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/authenticate/decode_session -u TEST:TEST -d'\n { \n \"token\": \"eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NzYxMjcxMTEsImlhdCI6MTU3NjExMjcxMSwiaXNzIjoiNWRjM2VhMzVhZmE4MGQyZWEwZWUxMGU3IiwianRpIjoiMGE0ZTQ1ZjUtZjlmNi00NDNlLWI0OGYtM2IyMWIxMDUxNTg2IiwiT3JnVW5pdElkIjoiNWRiMTVhMzQwMDViOTMwZmM0MGM4OWVlIiwiT2JqZWN0aWZ5UGF5bG9hZCI6dHJ1ZSwiUGF5bG9hZCI6eyJPcmRlckRldGFpbHMiOnsiQ3VycmVuY3lDb2RlIjoiMDM2IiwiQW1vdW50IjoiMTAwIn19fQ.gtcM2t8VdMQcZmG2CJrRiGe0CfIycWwinVva4w-i8F4\"\n }'"},{"language":"ruby","code":"FatZebra::Authenticate.decode_session(\n token: \"eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NzYxMjcxMTEsImlhdCI6MTU3NjExMjcxMSwiaXNzIjoiNWRjM2VhMzVhZmE4MGQyZWEwZWUxMGU3IiwianRpIjoiMGE0ZTQ1ZjUtZjlmNi00NDNlLWI0OGYtM2IyMWIxMDUxNTg2IiwiT3JnVW5pdElkIjoiNWRiMTVhMzQwMDViOTMwZmM0MGM4OWVlIiwiT2JqZWN0aWZ5UGF5bG9hZCI6dHJ1ZSwiUGF5bG9hZCI6eyJPcmRlckRldGFpbHMiOnsiQ3VycmVuY3lDb2RlIjoiMDM2IiwiQW1vdW50IjoiMTAwIn19fQ.gtcM2t8VdMQcZmG2CJrRiGe0CfIycWwinVva4w-i8F4\"\n)"}],"samples-languages":["curl","ruby"]}}},"/authenticate":{"post":{"summary":"Authenticate a transaction","description":"This API is used to authenticate a transaction. The first step is to call this API with sca.type = \"enrollment\" to check whether the transaction is frictionless or needs further challenge. After a successful challenge, this API should be called with sca.type = \"validation\" which will return 3DS2/SCA fields.","operationId":"authenticate-a-transaction","parameters":[{"name":"Content-Type","in":"header","description":"application/json","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["card_token","amount","currency"],"properties":{"card_token":{"type":"string"},"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"},"currency":{"type":"string","description":"Three letter [ISO currency code](https://pmnts.readme.io/docs/iso-currency-codes), in UPPERCASE","default":"AUD"},"customer_ip":{"type":"string","description":"RFC791-compliant IP address"},"sca":{"properties":{"type":{"type":"string","description":"The authentication type: enrollment, validation"},"merchant_reference_code":{"type":"string","description":"Merchant order reference"},"customer":{"type":"object","description":"Details about the customer","required":["address_1","city","state","country","email","first_name","last_name","post_code"],"properties":{"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"},"country":{"type":"string","description":"The ISO 3166 alpha-2 country code for the customer"},"email":{"type":"string","description":"The customer's email address"},"first_name":{"type":"string","description":"The customer's first name"},"last_name":{"type":"string","description":"The customer's last name"},"post_code":{"type":"string","description":"The customer's post code"},"passport_number":{"type":"string","description":"The customer's passport number"},"passport_country":{"type":"string","description":"The ISO 3166 numeric passport country"},"account_changed_at":{"type":"string","description":"Date the cardholder’s account was last changed (format: YYYYMMDD)"},"account_created_at":{"type":"string","description":"Date the cardholder opened the account (format: YYYYMMDD)"},"account_password_changed_at":{"type":"string","description":"Date the cardholder last changed or reset password on account (format: YYYYMMDD)"}}},"shipping_address":{"type":"object","description":"Details about the shipping","properties":{"address_1":{"type":"string","description":"The shipping address primary address line"},"address_2":{"type":"string","description":"The shipping address secondary address line"},"city":{"type":"string","description":"The shipping address city or suburb"},"state":{"type":"string","description":"The shipping address state"},"country":{"type":"string","description":"The ISO 3166 alpha-2 country code for the shipping"},"email":{"type":"string","description":"The shipping email address"},"first_name":{"type":"string","description":"The shipping address first name"},"last_name":{"type":"string","description":"The shipping address last name"},"home_phone":{"type":"string","description":"The shipping phone number"},"post_code":{"type":"string","description":"The shipping post code"},"method":{"type":"string","description":"The shipping method for the product"},"destination_code":{"type":"string","description":"The destination chosen for the transaction"}}},"custom":{"type":"object","description":"Custom data for the SCA. Please discuss using these fields with Support should you require assistance. x may be numerical or a string.","required":["transaction_mode","reference_id"],"properties":{"transaction_mode":{"type":"string","description":"Transaction mode identifier: moto, mobile, retail, computer, tablet"},"reference_id":{"type":"string","description":"Reference ID that corresponds to the device fingerprinting data that was collected previously"},"merchant_name":{"type":"string","description":"Your company’s name as you want it to appear to the customer in the issuing bank’s authentication form"},"merchant_new_customer":{"type":"boolean","description":"Indicates whether the consumer is a new or existing customer with the merchant"},"preorder":{"type":"integer","description":"Indicates whether cardholder is placing an order with a future availability or release date: 0 (Merchandise available), 1 (Future availability)","format":"int32"},"http_accept":{"type":"string","description":"Value of the Accept header sent by the customer’s web browser"},"http_user_agent":{"type":"string","description":"Value of the User-Agent header sent by the customer’s web browser"},"http_user_accept":{"type":"string","description":"The exact content of the HTTP accept header"},"recurring_end_date":{"type":"string","description":"The date after which no further recurring authorizations should be performed (format: YYYYMMDD)"},"recurring_frequency":{"type":"integer","description":"Integer value indicating the minimum number of days between recurring authorizations. A frequency of monthly is indicated by the value 28. Multiple of 28 days will be used to indicate months.","format":"int32"},"recurring_original_purchase_date":{"type":"string","description":"Date of original purchase (format: YYYYMMDDHH:MM:SS)"}}},"items":{"type":"array","description":"Details about purchased items","items":{"properties":{"unit_price":{"type":"number","description":"Price of the product","format":"float"},"product_description":{"type":"string","description":"Brief description of item"},"product_name":{"type":"string","description":"Name of the product"},"quantity":{"type":"integer","description":"Quantity of the product being purchased. The default value is 1.","default":1,"format":"int32"},"product_sku":{"type":"string","description":"Merchant’s product identifier code"},"passenger_first_name":{"type":"string","description":"Passenger's first name"},"passenger_last_name":{"type":"string","description":"Passenger's last name"}},"type":"object"}},"airline_data":{"type":"object","description":"Details about the airline data","properties":{"number_of_passengers":{"type":"integer","description":"Number of passengers for whom the ticket was issued. The default value is 1 if no value is provided.","format":"int32"},"passengers":{"type":"array","description":"Details about passengers","items":{"properties":{"first_name":{"type":"string","description":"passenger's first name"},"last_name":{"type":"string","description":"Passenger's last name"}},"type":"object"}},"legs":{"type":"array","items":{"properties":{"carrier_code":{"type":"string","description":"International Air Transport Association (IATA) code for the carrier for this leg of the trip. Required for each leg."},"departure_date":{"type":"string","description":"Departure date for the first leg of the trip (format: YYYYMMDD)"},"destination":{"type":"string","description":"International Air Transport Association (IATA) code for the destination airport for this leg of the trip. Required for each leg."},"originating_airport_code":{"type":"string","description":"International Air Transport Association (IATA) code for the originating airport for the first leg of the trip."}},"type":"object"}}}}},"required":["type","merchant_reference_code","customer"],"type":"object"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Frictionless":{"value":"{\n \"successful\": true,\n \"response\": {\n \"action\": {\n \"proceed\": true,\n \"challenge\": false,\n \"frictionless\": true,\n \"bypass\": false\n },\n \"version\": \"2.2.0\",\n \"enrolled\": \"Y\",\n \"acs_url\": \"\",\n \"pareq\": null,\n \"pares\": \"Y\",\n \"xid\": \"Y2FyZGluYWxjb21tZXJjZWF1dGg=\",\n \"eci\": \"05\",\n \"cavv\": \"Y2FyZGluYWxjb21tZXJjZWF1dGg=\",\n \"aav\": null,\n \"ucaf_collection_indicator\": null,\n \"authentication_path\": null,\n \"authentication_result\": \"0\",\n \"authentication_transaction_id\": \"3gbaF10cRR3AKYlHWR70\",\n \"authentication_status_message\": \"Success\",\n \"card_bin\": \"400000\",\n \"card_type_name\": \"VISA\",\n \"commerce_indicator\": \"vbv\",\n \"proxy_pan\": null,\n \"currency\": null,\n \"request_id\": \"5765389399326807603008\",\n \"request_token\": \"AxjzbwSTOIrZyFh1GLdAAAoBUaf/fn4iEg6cQkhoZNJMvRivpPBAFAAA7gPd\",\n \"decision\": \"ACCEPT\"\n },\n \"errors\": [],\n \"test\": true\n}"},"Challenge":{"value":"{\n \"successful\": true,\n \"response\": {\n \"action\": {\n \"proceed\": true,\n \"challenge\": true,\n \"frictionless\": false,\n \"bypass\": false\n },\n \"version\": \"2.2.0\",\n \"enrolled\": \"Y\",\n \"acs_url\": \"https://example.com\",\n \"pareq\": \"eyJtZXNzYWdlVHlwZSI6IkNSZXEiLCJtZXNzYWdlVmVyc2lvbiI6IjIuMi4wIiwidGhyZWVEU1NlcnZlclRyYW5zSUQiOiJmMGRmZmJiZS01ZjI2LTQ1YWItOTBkYS0xYmE0NmE1Zjc4OTMiLCJhY3NUcmFuc0lEIjoiMmJkYmVmZDEtOGU1ZC00NmM2LWE3YzUtMzY1YzE4MWFiMzFmIiwiY2hhbGxlbmdlV2luZG93U2l6ZSI6IjAyIn0\",\n \"pares\": null,\n \"xid\": null,\n \"eci\": null,\n \"cavv\": null,\n \"aav\": null,\n \"ucaf_collection_indicator\": null,\n \"authentication_path\": null,\n \"authentication_result\": null,\n \"authentication_transaction_id\": \"Qc5RRD656zPXidZnTKT0\",\n \"authentication_status_message\": null,\n \"card_bin\": \"400000\",\n \"card_type_name\": \"VISA\",\n \"commerce_indicator\": null,\n \"proxy_pan\": null,\n \"currency\": null,\n \"request_id\": \"5765392049476929003010\",\n \"request_token\": \"AxjzbwSTOIrjMqSdrx4CAAoBUaf/foN6Eg6cQkhl29JMvRivpPBAPAAA8QJZ\",\n \"decision\": \"REJECT\"\n },\n \"errors\": [],\n \"test\": true\n}"},"Validation":{"value":"{\n \"successful\": true,\n \"response\": {\n \"action\": {\n \"proceed\": true\n },\n \"version\": \"2.2.0\",\n \"enrolled\": null,\n \"acs_url\": \"\",\n \"pareq\": null,\n \"pares\": \"Y\",\n \"xid\": \"MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=\",\n \"eci\": \"05\",\n \"cavv\": \"MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=\",\n \"aav\": null,\n \"ucaf_collection_indicator\": null,\n \"authentication_path\": null,\n \"authentication_result\": \"0\",\n \"authentication_transaction_id\": null,\n \"authentication_status_message\": \"Success\",\n \"card_bin\": \"400000\",\n \"card_type_name\": \"VISA\",\n \"commerce_indicator\": \"vbv\",\n \"proxy_pan\": null,\n \"currency\": null,\n \"request_id\": \"5765394444636957403010\",\n \"request_token\": \"0\",\n \"decision\": \"ACCEPT\"\n },\n \"errors\": [],\n \"test\": true\n}"},"Invalid Currency":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\"Currency XXX is not valid for this merchant. Permitted currencies: USD, EUR, GBP, AUD, CAD, JPY, CHF, HKD, NZD, SGD, and JPY\"],\n \"test\": true\n}"},"Invalid Amount":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\"Amount is invalid\"],\n \"test\": true\n}"}},"schema":{"oneOf":[{"title":"Frictionless","type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"action":{"type":"object","properties":{"proceed":{"type":"boolean","example":true,"default":true},"challenge":{"type":"boolean","example":false,"default":true},"frictionless":{"type":"boolean","example":true,"default":true},"bypass":{"type":"boolean","example":false,"default":true}}},"version":{"type":"string","example":"2.2.0"},"enrolled":{"type":"string","example":"Y"},"acs_url":{"type":"string","example":""},"pareq":{},"pares":{"type":"string","example":"Y"},"xid":{"type":"string","example":"Y2FyZGluYWxjb21tZXJjZWF1dGg="},"eci":{"type":"string","example":"05"},"cavv":{"type":"string","example":"Y2FyZGluYWxjb21tZXJjZWF1dGg="},"aav":{},"ucaf_collection_indicator":{},"authentication_path":{},"authentication_result":{"type":"string","example":"0"},"authentication_transaction_id":{"type":"string","example":"3gbaF10cRR3AKYlHWR70"},"authentication_status_message":{"type":"string","example":"Success"},"card_bin":{"type":"string","example":"400000"},"card_type_name":{"type":"string","example":"VISA"},"commerce_indicator":{"type":"string","example":"vbv"},"proxy_pan":{},"currency":{},"request_id":{"type":"string","example":"5765389399326807603008"},"request_token":{"type":"string","example":"AxjzbwSTOIrZyFh1GLdAAAoBUaf/fn4iEg6cQkhoZNJMvRivpPBAFAAA7gPd"},"decision":{"type":"string","example":"ACCEPT"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}},{"title":"Challenge","type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"action":{"type":"object","properties":{"proceed":{"type":"boolean","example":true,"default":true},"challenge":{"type":"boolean","example":true,"default":true},"frictionless":{"type":"boolean","example":false,"default":true},"bypass":{"type":"boolean","example":false,"default":true}}},"version":{"type":"string","example":"2.2.0"},"enrolled":{"type":"string","example":"Y"},"acs_url":{"type":"string","example":"https://example.com"},"pareq":{"type":"string","example":"eyJtZXNzYWdlVHlwZSI6IkNSZXEiLCJtZXNzYWdlVmVyc2lvbiI6IjIuMi4wIiwidGhyZWVEU1NlcnZlclRyYW5zSUQiOiJmMGRmZmJiZS01ZjI2LTQ1YWItOTBkYS0xYmE0NmE1Zjc4OTMiLCJhY3NUcmFuc0lEIjoiMmJkYmVmZDEtOGU1ZC00NmM2LWE3YzUtMzY1YzE4MWFiMzFmIiwiY2hhbGxlbmdlV2luZG93U2l6ZSI6IjAyIn0"},"pares":{},"xid":{},"eci":{},"cavv":{},"aav":{},"ucaf_collection_indicator":{},"authentication_path":{},"authentication_result":{},"authentication_transaction_id":{"type":"string","example":"Qc5RRD656zPXidZnTKT0"},"authentication_status_message":{},"card_bin":{"type":"string","example":"400000"},"card_type_name":{"type":"string","example":"VISA"},"commerce_indicator":{},"proxy_pan":{},"currency":{},"request_id":{"type":"string","example":"5765392049476929003010"},"request_token":{"type":"string","example":"AxjzbwSTOIrjMqSdrx4CAAoBUaf/foN6Eg6cQkhl29JMvRivpPBAPAAA8QJZ"},"decision":{"type":"string","example":"REJECT"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}},{"title":"Validation","type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"action":{"type":"object","properties":{"proceed":{"type":"boolean","example":true,"default":true}}},"version":{"type":"string","example":"2.2.0"},"enrolled":{},"acs_url":{"type":"string","example":""},"pareq":{},"pares":{"type":"string","example":"Y"},"xid":{"type":"string","example":"MTIzNDU2Nzg5MDEyMzQ1Njc4OTA="},"eci":{"type":"string","example":"05"},"cavv":{"type":"string","example":"MTIzNDU2Nzg5MDEyMzQ1Njc4OTA="},"aav":{},"ucaf_collection_indicator":{},"authentication_path":{},"authentication_result":{"type":"string","example":"0"},"authentication_transaction_id":{},"authentication_status_message":{"type":"string","example":"Success"},"card_bin":{"type":"string","example":"400000"},"card_type_name":{"type":"string","example":"VISA"},"commerce_indicator":{"type":"string","example":"vbv"},"proxy_pan":{},"currency":{},"request_id":{"type":"string","example":"5765394444636957403010"},"request_token":{"type":"string","example":"0"},"decision":{"type":"string","example":"ACCEPT"}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}},{"title":"Invalid Currency","type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{}},"errors":{"type":"array","items":{"type":"string","example":"Currency XXX is not valid for this merchant. Permitted currencies: USD, EUR, GBP, AUD, CAD, JPY, CHF, HKD, NZD, SGD, and JPY"}},"test":{"type":"boolean","example":true,"default":true}}},{"title":"Invalid Amount","type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{}},"errors":{"type":"array","items":{"type":"string","example":"Amount is invalid"}},"test":{"type":"boolean","example":true,"default":true}}}]}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/authenticate -u TEST:TEST -d'\n { \n \"card_token\": \"fke8jmra\"\n \"amount\": 100,\n \"currency\": \"AUD\",\n \"customer_ip\": \"111.111.111.111\",\n \"sca\": {\n \"type\": \"enrollment\",\n \"merchant_reference_code\": \"2dffc05a-5e0d-4481-84a3-b1c005746263\",\n \"customer\": {\n \"address_1\": \"23 Smith Road\",\n \"address_2\": \"North Shore\",\n \"city\": \"Sydney\",\n \"country\": \"AU\",\n \"state\": \"ACT\",\n \"email\": \"test@test.com\",\n \"first_name\": \"James\",\n \"last_name\": \"Smith\",\n \"phone_number\": \"0444555666\",\n \"post_code\": \"2000\",\n \"passport_number\": \"X1234567890\",\n \"passport_country\": \"036\",\n \"account_changed_at\": \"20191210\",\n \"account_created_at\": \"20191210\",\n \"account_password_changed_at\": \"20191210\"\n },\n \"shipping_address\": {\n \"address_1\": \"23 Smith Road\",\n \"address_2\": \"North Shore\",\n \"city\": \"Sydney\",\n \"country\": \"AU\",\n \"state\": \"NSW\",\n \"email\": \"test@test.com\",\n \"first_name\": \"James\",\n \"last_name\": \"Smith\",\n \"phone_number\": \"0444555666\",\n \"post_code\": \"2000\",\n \"method\": \"pickup\",\n \"destination_code\": \"01\",\n },\n \"custom\": {\n \"transaction_mode\": \"mobile\",\n \"reference_id\": \"64420544-ffbb-4f62-b796-e6ce3e1d23ee\",\n \"merchant_name\": \"TEST\",\n \"merchant_new_customer\": true,\n \"preorder\": 1,\n \"http_accept\": \"text/html\",\n \"http_user_agent\": \"Mozilla/5.0 (Windows NT 6.1; Win64; x64;)\",\n \"recurring_end_date\": \"20201015\",\n \"recurring_frequency\": 3,\n \"recurring_original_purchase_date\": \"2019120112\":00\":00\" \n },\n \"items\": [\n { \n \"unit_price\": 23.3,\n \"product_description\": \"Widgets\",\n \"product_name\": \"Watch\",\n \"quantity\": 1,\n \"product_sku\": \"9999\",\n \"passenger_first_name\": \"john\",\n \"passenger_last_name\": \"smith\",\n }\n ],\n \"airline_data\": {\n \"legs\": [\n {\n \"carrier_code\": \"code\",\n \"departure_date\": \"20221012\",\n \"destination\": \"SYD\",\n \"originating_airport_code\": \"MEL\",\n }\n ],\n \"number_of_passengers\": 2,\n \"passengers\": [\n {\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n },\n {\n \"first_name\": \"Megan\",\n \"last_name\": \"Doe\",\n } \n ]\n },\n }\n }'"},{"language":"ruby","code":"FatZebra::Authenticate.authenticate(\n card_token: \"fke8jmra\"\n amount: 100,\n currency: \"AUD\",\n customer_ip: \"111.111.111.111\",\n sca: {\n type: \"enrollment\",\n merchant_reference_code: \"2dffc05a-5e0d-4481-84a3-b1c005746263\",\n customer: {\n address_1: \"23 Smith Road\",\n address_2: \"North Shore\",\n city: \"Sydney\",\n country: \"AU\",\n state: \"ACT\",\n email: \"test@test.com\",\n first_name: \"James\",\n last_name: \"Smith\",\n phone_number: \"0444555666\",\n post_code: \"2000\",\n passport_number: \"X1234567890\",\n passport_country: \"036\",\n account_changed_at: \"20191210\",\n account_created_at: \"20191210\",\n account_password_changed_at: \"20191210\"\n },\n shipping_address: {\n address_1: \"23 Smith Road\",\n address_2: \"North Shore\",\n city: \"Sydney\",\n country: \"AU\",\n state: \"NSW\",\n email: \"test@test.com\",\n first_name: \"James\",\n last_name: \"Smith\",\n phone_number: \"0444555666\",\n post_code: \"2000\",\n method: \"pickup\",\n destination_code: \"01\",\n },\n custom: {\n transaction_mode: \"mobile\",\n reference_id: \"64420544-ffbb-4f62-b796-e6ce3e1d23ee\",\n merchant_name: \"TEST\",\n merchant_new_customer: true,\n preorder: 1,\n http_accept: \"text/html\",\n http_user_agent: \"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0)\",\n recurring_end_date: \"20201201\",\n recurring_frequency: 3,\n recurring_original_purchase_date: \"2019120112:00:00\" \n },\n items: [\n { \n unit_price: 23.3,\n product_description: \"Widgets\",\n product_name: \"Watch\",\n quantity: 1,\n product_sku: \"9999\",\n passenger_first_name: \"john\",\n passenger_last_name: \"smith\",\n }\n ],\n airline_data: {\n legs: [\n {\n carrier_code: \"code\",\n departure_date: \"20221012\",\n destination: \"SYD\",\n originating_airport_code: \"MEL\",\n }\n ],\n number_of_passengers: 2,\n passengers: [\n {\n first_name: \"John\",\n last_name: \"Smith\",\n },\n {\n first_name: \"Megan\",\n last_name: \"Doe\",\n } \n ]\n },\n }\n)"}],"samples-languages":["curl","ruby"]}}},"/oauth_clients":{"post":{"summary":"Create an OAuth Client","description":"","operationId":"create-an-oauth-client","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name for the OAuth Client, used to differentiate between different clients/keys"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"access_key\" : \"Bwq5112385pDtg==\",\n \"access_secret\" : \"yekVasd23hqW_Fnodvt5-GZeCdXA=\"\n}"}},"schema":{"type":"object","properties":{"access_key":{"type":"string","example":"Bwq5112385pDtg=="},"access_secret":{"type":"string","example":"yekVasd23hqW_Fnodvt5-GZeCdXA="}}}}}},"422":{"description":"422","content":{"application/json":{"examples":{"Result":{"value":"{\n \"errors\" : [\n \"already exists\"\n ]\n}"}},"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string","example":"already exists"}}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/oauth_clients -d '{\"name\": \"test-client\"} -U TEST:TEST"}],"samples-languages":["curl"]}}},"/reports/payouts/{date}":{"get":{"summary":"Fetch a payout report for date","description":"","operationId":"fetch-a-payout-report-for-date","parameters":[{"name":"Content-Type","in":"header","description":"application/json","schema":{"type":"string"}},{"name":"date","in":"path","schema":{"type":"string","format":"date","default":"2022-01-01"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"successful\": true,\n\t\"response\": {\n\t\t\"payout_date\": \"2022-01-01\",\n\t\t\"payouts\": [{\n\t\t\t\"method\": \"VISA/MASTERCARD\",\n\t\t\t\"funding_account\": {\n\t\t\t\t\"bsb\": '123-345,\n\t\t\t\t\"account_number\": '0123456789'\n\t\t\t},\n\t\t\t\"amount\": 1000.00,\n\t\t\t\"reference\": \"FZ-20220929-HWZIJX\",\n\t\t\t\"detail\": {\n\t\t\t\t\"gross_processing_amount\": 1000.00,\n\t\t\t\t\"transaction_count\": 1,\n\t\t\t\t\"processing_fees_amount\": -10.00,\n\t\t\t\t\"disputes_count\": 1,\n\t\t\t\t\"disputes_amount\": -10.0\n\t\t\t}\n\t\t}]\n\t},\n\t\"errors\": []\n}"}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Invalid Date":{"value":"{\n\t\"successful\": false,\n\t\"response\": null,\n\t\"errors\": [\n\t\t\"Invalid date parameter\"\n\t],\n}"}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/reports/payouts/2022-01-01 -u TEST:TEST"}],"samples-languages":["curl"]}}},"/reports/payouts/{date}/transactions":{"get":{"summary":"Fetch a payout's transactions for date","description":"","operationId":"fetch-a-payout-report-for-date-transactions","parameters":[{"name":"Content-Type","in":"header","description":"application/json","schema":{"type":"string"}},{"name":"date","in":"path","schema":{"type":"string","format":"date","default":"2022-01-01"},"required":true}],"responses":{"200":{"description":"200","content":{"text/plain":{"examples":{"Result":{"value":"payout_date,transaction_date,amount,currency,txn_fee,payout_amount,transaction_type,card_type,Int/Domestic,card_category,reference,merchant_reference,receipt_number,payout_description,msf_fee,transaction_fee,interchange_fee,scheme_fee,fee_total\n2024-01-01,2024-06-12,\"$1,500.00\",AUD,-$18.10,\"$1,500.00\",purchase,visa,International,Credit,001-P-NV0PZDZ3IINK3TEE,ref1422098896,75212PNV0PZD,FZ-20240613-C7OF8T,-$18.00,-$0.10,,,-$18.10\n2024-01-01,2024-06-12,\"$5,000.00\",AUD,-$60.10,\"$5,000.00\",purchase,visa,International,Credit,001-P-EHVKBDVUUAGK4Q6C,ref633332999,75212PEHVKBD,FZ-20240613-C7OF8T,-$60.00,-$0.10,,,-$60.10"}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Invalid Date":{"value":"{\n\t\"successful\": false,\n\t\"response\": null,\n\t\"errors\": [\n\t\t\"Invalid date parameter\"\n\t],\n}"}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/reports/payouts/2024-01-01/transactions -u TEST:TEST"}],"samples-languages":["curl"]}}},"/disputes":{"get":{"summary":"List disputes","description":"","operationId":"list-disputes","parameters":[{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}},{"name":"from","in":"query","description":"Return disputes that were opened on or after this date, provided in the format 'YYYY-DD-MM'.","schema":{"type":"string","default":"90 days ago"}},{"name":"to","in":"query","description":"Return disputes that were opened up to and on this date, provided in the format 'YYYY-MM-DD'.","schema":{"type":"string","default":"today"}},{"name":"search","in":"query","description":"Dispute reference or transaction fatzebra ID to search on.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Disputes of any status will be returned if this is not provided. Acceptable values: open, lost, won, expired, accepted.","schema":{"type":"string"}},{"name":"order_by","in":"query","description":"Acceptable values: opened_on, next_due_date.","schema":{"type":"string","default":"opened_on"}},{"name":"order_direction","in":"query","description":"Acceptable values: asc, desc.","schema":{"type":"string","default":"desc"}},{"name":"offset","in":"query","description":"Page number.","schema":{"type":"integer","format":"int32","default":1}},{"name":"limit","in":"query","description":"Number of disputes to return per page.","schema":{"type":"integer","format":"int32","default":10}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": true,\n \"response\": {\n \"has_more\": true,\n \"records\": 2,\n \"total_records\": 9,\n \"page\": 1,\n \"total_pages\": 5,\n \"disputes\": [\n {\n \"opened_on\": \"2022-09-15\",\n \"transaction_id\": \"092-P-JHXOULO0\",\n \"reference\": \"202208036718\",\n \"reason_code\": \"001\",\n \"reason_description\": \"Fraud\",\n \"amount_cents\": 1000000,\n \"amount_currency\": \"AUD\",\n \"next_due_date\": \"2022-09-30\",\n \"status\": \"open\"\n },\n {\n \"opened_on\": \"2022-09-15\",\n \"transaction_id\": \"093-P-AX6XLKRT\",\n \"reference\": \"342f0e9f3aa82119\",\n \"reason_code\": \"001\",\n \"reason_description\": \"Fraud\",\n \"amount_cents\": 1000000000,\n \"amount_currency\": \"AUD\",\n \"next_due_date\": \"2022-09-30\",\n \"status\": \"lost\"\n }\n ]\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"has_more":{"type":"boolean","example":true,"default":true},"records":{"type":"integer","example":2,"default":0},"total_records":{"type":"integer","example":9,"default":0},"page":{"type":"integer","example":1,"default":0},"total_pages":{"type":"integer","example":5,"default":0},"disputes":{"type":"array","items":{"type":"object","properties":{"opened_on":{"type":"string","example":"2022-09-15"},"transaction_id":{"type":"string","example":"092-P-JHXOULO0"},"reference":{"type":"string","example":"202208036718"},"reason_code":{"type":"string","example":"001"},"reason_description":{"type":"string","example":"Fraud"},"amount_cents":{"type":"integer","example":1000000,"default":0},"amount_currency":{"type":"string","example":"AUD"},"next_due_date":{"type":"string","example":"2022-09-30"},"status":{"type":"string","example":"open"}}}}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"422":{"description":"422","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\n \"Invalid date range\"\n ],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{}},"errors":{"type":"array","items":{"type":"string","example":"Invalid date range"}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/disputes -u TEST:TEST"}],"samples-languages":["curl"]}}},"/transactions/{transaction_fatzebra_id}/dispute":{"get":{"summary":"Fetch dispute","description":"","operationId":"fetch-dispute","parameters":[{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}},{"name":"transaction_fatzebra_id","in":"path","description":"The fatzebra id of the transaction.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Disputed":{"value":"{\n \"successful\": true,\n \"response\": {\n \"disputed\": true,\n \"dispute\": {\n \"opened_on\": \"2022-11-08\",\n \"reference\": \"20210929603011-5\",\n \"amount_cents\": 420,\n \"amount_currency\": \"AUD\",\n \"next_due_date\": \"2022-11-22\",\n \"status\": \"open\",\n \"reason_code\": \"4837\",\n \"reason_description\": \"No Cardholder Authorization\",\n \"dispute_events\": [\n {\n \"acquirer_event_code\": \"CB1\",\n \"acquirer_event_description\": \"1st Chargeback\",\n \"posting_date\": \"2022-11-08\"\n }\n ]\n }\n },\n \"errors\": [],\n \"test\": true\n}"},"Not Disputed":{"value":"{\n \"successful\": true,\n \"response\": {\n \"disputed\": false\n },\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"oneOf":[{"title":"Disputed","type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"disputed":{"type":"boolean","example":true,"default":true},"dispute":{"type":"object","properties":{"opened_on":{"type":"string","example":"2022-11-08"},"reference":{"type":"string","example":"20210929603011-5"},"amount_cents":{"type":"integer","example":420,"default":0},"amount_currency":{"type":"string","example":"AUD"},"next_due_date":{"type":"string","example":"2022-11-22"},"status":{"type":"string","example":"open"},"reason_code":{"type":"string","example":"4837"},"reason_description":{"type":"string","example":"No Cardholder Authorization"},"dispute_events":{"type":"array","items":{"type":"object","properties":{"acquirer_event_code":{"type":"string","example":"CB1"},"acquirer_event_description":{"type":"string","example":"1st Chargeback"},"posting_date":{"type":"string","example":"2022-11-08"}}}}}}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}},{"title":"Not Disputed","type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{"disputed":{"type":"boolean","example":false,"default":true}}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}]}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\n \"Could not find transaction\"\n ],\n \"test\": true\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 transaction"}},"test":{"type":"boolean","example":true,"default":true}}}}}},"422":{"description":"422","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\"Merchant not configured for TPP\"],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":false,"default":true},"response":{"type":"object","properties":{}},"errors":{"type":"array","items":{"type":"string","example":"Merchant not configured for TPP"}},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/transactions/001-P-154WFRUM/dispute -u TEST:TEST"}],"samples-languages":["curl"]}}},"/transactions/{transaction_fatzebra_id}/dispute/accept":{"put":{"summary":"Accept dispute","description":"","operationId":"accept-dispute","parameters":[{"name":"Content-Type","in":"header","schema":{"type":"string","default":"application/json"}},{"name":"transaction_fatzebra_id","in":"path","description":"The fatzebra id of the transaction.","schema":{"type":"string"},"required":true}],"responses":{"201":{"description":"201","content":{"application/json":{"examples":{"OK":{"value":"{\n \"successful\": true,\n \"response\": {},\n \"errors\": [],\n \"test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{}},"errors":{"type":"array"},"test":{"type":"boolean","example":true,"default":true}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\": [\n \"Could not find transaction\"\n ],\n \"test\": true\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 transaction"}},"test":{"type":"boolean","example":true,"default":true}}}}}},"422":{"description":"422","content":{"application/json":{"examples":{"Result":{"value":"{\n \"successful\": false,\n \"response\": {},\n \"errors\" => ['Dispute has already been closed']\n \"test\": true\n}"}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/transactions/001-P-154WFRUM/dispute/accept -u TEST:TEST"}],"samples-languages":["curl"]}}},"/utlities/mastercard/click_to_pay/registration":{"post":{"summary":"Create Registration","description":"In order to start using Mastercard Click to Pay you must first register your account with Mastercard. To do this you can use the following API endpoint:","operationId":"mastercard-clicktopay-create-registration","responses":{"200":{"description":"200","content":{"application/json":{"examples":{"OK - Pending":{"value":"{\n \"errors\" : [],\n \"response\" : {\n \"registered\" : false,\n \"status\" : \"Pending\"\n },\n \"successful\" : true,\n \"test\" : true\n}"},"OK - Active":{"value":"{\n \"errors\" : [],\n \"response\" : {\n \"registered\" : true,\n \"status\" : \"Active\"\n },\n \"successful\" : true,\n \"test\" : true\n}"}},"schema":{"oneOf":[{"title":"OK - Pending","type":"object","properties":{"errors":{"type":"array"},"response":{"type":"object","properties":{"registered":{"type":"boolean","example":false,"default":true},"status":{"type":"string","example":"Pending"}}},"successful":{"type":"boolean","example":true,"default":true},"test":{"type":"boolean","example":true,"default":true}}},{"title":"OK - Active","type":"object","properties":{"errors":{"type":"array"},"response":{"type":"object","properties":{"registered":{"type":"boolean","example":true,"default":true},"status":{"type":"string","example":"Active"}}},"successful":{"type":"boolean","example":true,"default":true},"test":{"type":"boolean","example":true,"default":true}}}]}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl http://api.test/v1.0/utilities/mastercard/click_to_pay/registration -XPOST -u TEST:TEST"}],"samples-languages":["curl"]}}},"/utilities/mastercard/click_to_pay/registration":{"get":{"summary":"Check Registration","description":"In order to check the status of your Mastercard Click to Pay Registration the following API endpoint can be used.","operationId":"mastercard-clicktopay-check-registration","responses":{"200":{"description":"200","content":{"application/json":{"examples":{"OK - Registered":{"value":"{\n \"errors\" : [],\n \"response\" : {\n \"registered\" : true,\n \"status\" : \"Active\"\n },\n \"successful\" : true,\n \"test\" : true\n}"},"OK - Not Registered":{"value":"{\n \"errors\" : [],\n \"response\" : {\n \"registered\" : false,\n \"status\" : \"Inactive\"\n },\n \"successful\" : true,\n \"test\" : true\n}"}},"schema":{"oneOf":[{"title":"OK - Registered","type":"object","properties":{"errors":{"type":"array"},"response":{"type":"object","properties":{"registered":{"type":"boolean","example":true,"default":true},"status":{"type":"string","example":"Active"}}},"successful":{"type":"boolean","example":true,"default":true},"test":{"type":"boolean","example":true,"default":true}}},{"title":"OK - Not Registered","type":"object","properties":{"errors":{"type":"array"},"response":{"type":"object","properties":{"registered":{"type":"boolean","example":false,"default":true},"status":{"type":"string","example":"Inactive"}}},"successful":{"type":"boolean","example":true,"default":true},"test":{"type":"boolean","example":true,"default":true}}}]}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"curl","code":"curl https://gateway.pmnts-sandbox.io/v1.0/utilities/mastercard/click_to_pay/registration -u TEST:TEST"}],"samples-languages":["curl"]}}},"/utilities/apple_pay/domains/www.example.com":{"post":{"summary":"Register (Create) an Apple Pay on the Web Domain","description":"","operationId":"register-create-an-apple-pay-on-the-web-domain","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"async":{"type":"boolean","description":"If true the request will return immediately. Merchants need to subscribe to webhooks, or poll the GET endpoint to get the updated status","default":false}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"errors\" : [],\n \"response\" : {\n \"created_at\" : \"2021-04-17T22:28:44+10:00\",\n \"domain\" : \"test.com\",\n \"status\" : \"Active\",\n \"updated_at\" : \"2021-04-17T12:28:45+00:00\"\n },\n \"successful\" : true,\n \"test\" : true\n}"}},"schema":{"type":"object","properties":{"errors":{"type":"array"},"response":{"type":"object","properties":{"created_at":{"type":"string","example":"2021-04-17T22:28:44+10:00"},"domain":{"type":"string","example":"test.com"},"status":{"type":"string","example":"Active"},"updated_at":{"type":"string","example":"2021-04-17T12:28:45+00:00"}}},"successful":{"type":"boolean","example":true,"default":true},"test":{"type":"boolean","example":true,"default":true}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"errors\" : [\n \"Record for www.example.com not found\"\n ],\n \"response\" : {},\n \"successful\" : false,\n \"test\" : true\n}"}},"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string","example":"Record for www.example.com not found"}},"response":{"type":"object","properties":{}},"successful":{"type":"boolean","example":false,"default":true},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false},"get":{"summary":"Check (Get) an Apple Pay on the Web Domain","description":"","operationId":"check-get-an-apple-pay-on-the-web-domain","responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"errors\" : [],\n \"response\" : {\n \"created_at\" : \"2021-04-17T22:28:44+10:00\",\n \"domain\" : \"test.com\",\n \"status\" : \"Active\",\n \"updated_at\" : \"2021-04-17T12:28:45+00:00\"\n },\n \"successful\" : true,\n \"test\" : true\n}"}},"schema":{"type":"object","properties":{"errors":{"type":"array"},"response":{"type":"object","properties":{"created_at":{"type":"string","example":"2021-04-17T22:28:44+10:00"},"domain":{"type":"string","example":"test.com"},"status":{"type":"string","example":"Active"},"updated_at":{"type":"string","example":"2021-04-17T12:28:45+00:00"}}},"successful":{"type":"boolean","example":true,"default":true},"test":{"type":"boolean","example":true,"default":true}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"errors\" : [\n \"Record for www.example.com not found\"\n ],\n \"response\" : {},\n \"successful\" : false,\n \"test\" : true\n}"}},"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string","example":"Record for www.example.com not found"}},"response":{"type":"object","properties":{}},"successful":{"type":"boolean","example":false,"default":true},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false},"delete":{"summary":"Remove (Delete) an Apple Pay on the Web Domain","description":"","operationId":"remove-delete-an-apple-pay-on-the-web-domain","responses":{"202":{"description":"202","content":{"application/json":{"examples":{"Result":{"value":"{\n\t\"successful\": true,\n \"response\": {},\n \"errors\": [],\n \"is_test\": true\n}"}},"schema":{"type":"object","properties":{"successful":{"type":"boolean","example":true,"default":true},"response":{"type":"object","properties":{}},"errors":{"type":"array"},"is_test":{"type":"boolean","example":true,"default":true}}}}}},"404":{"description":"404","content":{"application/json":{"examples":{"Result":{"value":"{\n \"errors\" : [\n \"Record for www.example.com not found\"\n ],\n \"response\" : {},\n \"successful\" : false,\n \"test\" : true\n}"}},"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string","example":"Record for www.example.com not found"}},"response":{"type":"object","properties":{}},"successful":{"type":"boolean","example":false,"default":true},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false}},"/utilities/apple_pay/domains":{"get":{"summary":"List Apple Pay (web) domains","description":"","operationId":"list-apple-pay-web-domains","responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"errors\" : [],\n \"response\" : [{\n \"domain\" : \"test.com\",\n \"status\" : \"Active\"\n }],\n \"successful\" : true,\n \"test\" : true\n}"}},"schema":{"type":"object","properties":{"errors":{"type":"array"},"response":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","example":"test.com"},"status":{"type":"string","example":"Active"}}}},"successful":{"type":"boolean","example":true,"default":true},"test":{"type":"boolean","example":true,"default":true}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"text","code":"curl https://gateway.pmnts-sandbox.io/v1.0/utilities/apple_pay/domains"}],"samples-languages":["text"]}}},"/health":{"get":{"description":"","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"integer","example":1769469514,"default":0},"echo":{"type":"string","example":"my_echo","description":"Returns the string supplied in the path , or `NONE` if no string is supplied"}}},"examples":{"OK":{"summary":"OK","value":{"timestamp":1769469514,"echo":"NONE"}},"OK - 1":{"summary":"OK - 1","value":{"timestamp":1769469514,"echo":"my_echo"}}}}}}},"parameters":[{"in":"query","name":"echo","schema":{"type":"string","default":"echo"},"description":"An optional query string to be returned back by the API"}],"operationId":"get_health"}}},"x-readme":{"headers":[],"explorer-enabled":true,"proxy-enabled":true},"x-readme-fauxas":true}