# ArtsPay documentation (full text) > Every ArtsPay merchant documentation page in one file. Page index: https://www.artspay.com/docs/llms.txt --- Source: https://www.artspay.com/docs/api # ArtsPay API The Arts Pay payment gateway is built on the Fat Zebra REST API. It is designed around predictable, resource-oriented URLs, uses standard HTTP verbs, accepts JSON request bodies, and returns JSON in every response. Authentication is handled via HTTP Basic Auth — no OAuth flows, no SDK required. ## Getting Started All API requests are made over HTTPS to one of two base URLs depending on the environment you're targeting. Start in the Sandbox. Your sandbox credentials are separate from your production credentials and all transactions made against it are simulated — no real money moves. When your integration is complete and tested, swap the base URL and credentials to go live. | Environment | Base URL | | --- | --- | | Sandbox | https://gateway.pmnts-sandbox.io/v1.0 | | Production | https://gateway.pmnts.io/v1.0 | The simplest way to verify your credentials is a `GET` against the health check endpoint: ```bash curl https://gateway.pmnts-sandbox.io/v1.0/health -u YOUR_USERNAME:YOUR_API_TOKEN ``` A `200 OK` means your credentials are valid and the gateway is reachable. > **Note** > Never use real card numbers in the Sandbox. Use the test card numbers provided in the Testing section instead. ## Authentication The API uses **HTTP Basic Authentication**. Every request must include your username and API token as the Basic Auth credentials — the username as the user, the token as the password. ```bash curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u YOUR_USERNAME:YOUR_API_TOKEN -H \"Content-Type: application/json\" ``` Your sandbox username is always prefixed with `TEST` (e.g. `TEST-USERNAME`). Usernames are case-insensitive, but **API tokens are case-sensitive** — copy them exactly as provided. All requests must be made over HTTPS. Plain HTTP requests will fail. ### Keeping credentials secure - Store credentials in environment variables, never in source code. - Your API token should be treated like a password — rotate it immediately if it is ever exposed. - Sandbox and production credentials are entirely separate. You cannot use sandbox credentials against the production endpoint or vice versa — attempting to do so will return a `403 Forbidden`. ## Requests Set the `Content-Type` header to `application/json` on all `POST` and `PUT` requests. **Amounts** are always expressed as integers in the smallest unit for the currency — for AUD, that means cents. `$49.95` is sent as `4995`. This avoids any floating-point ambiguity. **Currencies** use ISO 4217 codes (e.g. `AUD`, `USD`, `NZD`). ```json curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -H "Content-Type: application/json" -X POST -d '{ "amount": 4995, "currency": "AUD", "reference": "order-1234", "card_holder": "Jane Smith", "card_number": "4005550000000001", "card_expiry": "10/2027", "cvv": "123" }' { "successful": true, "response": { "id": "001-P-ABC12345", "authorization": "12345", "card_number": "400555XXXXXX0001", "card_holder": "Jane Smith", "card_expiry": "2027-10-31", "card_token": "tok_abc123", "card_type": "VISA", "amount": 4995, "decimal_amount": 49.95, "successful": true, "message": "Approved", "reference": "order-1234", "currency": "AUD", "transaction_id": "txn_xyz789", "response_code": "00", "transaction_date": "2026-07-08T10:42:00Z", "settlement_date": "2026-07-09" }, "errors": [], "test": true } ``` The `test` field in every response confirms whether the request was processed in sandbox mode. ### Pagination List endpoints (`GET /purchases`, `GET /refunds`, etc.) return paginated results. By default, 10 records are returned per page. Pass `limit` (max 50) and `offset` (page number, starting at 1) as query parameters: ``` GET /v1.0/purchases?limit=25&offset=2 ``` Paginated responses include `records`, `total_records`, `page`, and `total_pages` at the top level alongside `response`. ## Responses Every API response shares the same top-level envelope. A `successful: true` response at the top level means the API request itself was valid and processed. For payment transactions, also check `response.successful` — a card decline returns `successful: true` (the request worked) but `response.successful: false` (the payment was declined). | Field | Type | Description | | --- | --- | --- | | successful | Boolean | Whether the request was processed without errors | | response | Object or Array | The result data — a single object for individual resources, an array for list endpoints | | errors | Array of strings | Validation or processing errors, if any | | test | Boolean | true if the request was made against the Sandbox | ```json { "successful": true, "response": { "successful": false, "message": "Declined", "response_code": "05" }, "errors": [], "test": true } ``` --- Source: https://www.artspay.com/docs/apple-pay # Apple Pay Setup #### Set up Apple Pay **Setup guide** 1. Please look into the Fat Zebra docs: [Apple Pay Fat Zebra Guide](https://docs.fatzebra.com/docs/apple-pay) 1. Contact ArtsPay Support to enable Apple Pay on your account. Apple Pay generally requires domain verification (Apple Pay on the Web) as part of setup. > **Note** > Apple Pay availability depends on your integration method (plugin vs custom) and configuration. --- Source: https://www.artspay.com/docs/clover-hub # Clover Hub ## Clover Dashboard Below is the link to log-in to your Clover Dashboard. [Log in to your Clover Dashboard](https://www.ap.clover.com/login?webRedirectUrl=%2Fdashboard) ### Ordering Paper Rolls If you want to order receipt paper rolls, you can easily place an order by reaching out to Clover Experience. Just share the below details, and they will handle everything from there. #### Start an Email Make sure the email is to [clover_experienceanz@fiserv.com](mailto:clover_experienceanz@fiserv.com) #### Fill out the details below First Name: Last Name: Merchant ID: Shopfront name (Trading / Site Name): Mobile number: Trading hours below - Weekdays: - Weekend: Receipt roll amount (options are 60, 120, 180, 300, 600): Clover Flex amount: Clover Mini amount: Clover Station Duo amount: Clover Kiosk amount: Address line 1: Address line 2: City: State (NSW, VIC, QLD, SA, WA, TAS, NT, ACT): Postcode: Is the delivery address the Trading/Site address or Personal/Home address?: #### What happens after you send the email You will get a confirmation once the request has been processed and receive an SMS with tracking details once the order is processed by the paper roll vendor. Please be advised that the order will be delivered within 5 to 10 business days. ### Getting started guides What do you need help with? - Using Clover Payments? [Here’s our 7-step onboarding guide](https://www.artspay.com/docs/clover-payments). - Using Clover Essential, Register and Table Service POS? [Here’s how to get started](https://www.artspay.com/docs/clover-pos). - Using Clover Dining? [A step-by-step guide to set up your inventory and dining map](https://www.artspay.com/docs/dining-app). - Need help with Restoke? [Click here for a guide.](https://www.artspay.com/docs/clover-restoke) - Set up your devices and need more help? [Here’s our comprehensive guide for all Clover devices](https://www.artspay.com/docs/comprehensive-guide), including Tap to Pay (Clover Go). ### Clover FAQ #### Where can I get more receipt paper? You can find instructions on getting more receipt paper in Order Paper Rolls on the top of this page. #### I need help with the existing Clover system. If you need urgent technical help for your Clover system, please contact our Clover Experience team on 1800 999 592 (option 2). You will need your Merchant ID and Serial number of your device. Alternatively, you can send an email to [support@artspay.com](mailto:support@artspay.com) #### How fast can I get paid? Payout speed depends on your **settlement schedule**, which is set up when your account is created. If you’re unsure whether you’re on **Same Day** or **Next Day** settlement, email ArtsPay Support at [support@artspay.com](mailto:support@artspay.com) and we’ll confirm it for you. #### Can I get an additional Clover device? Please email [support@artspay.com](mailto:support@artspay.com) with your additional Clover device request and our team can get that organised for you. Please request it at least two weeks in advance. ### How-To Library Useful how-to videos we created to help you use your Clover - [**Clover Dashboard - Processing a Refund**](https://youtu.be/gsfDImS0Ss0) - [**Clover Dashboard - Managing Order and Payment Receipts**](https://youtu.be/zK29KX-hNPM) - [**Clover Dashboard - How to Search Transactions & Send Receipts**](https://youtu.be/9r7QEGMMYHw) - [**Clover Dashboard - Finding Your Daily Sales Report**](https://youtu.be/4_hj2Osqz6U) - [**Clover Dashboard - Enabling Additional Surcharges**](https://youtu.be/Nblp3QGVBEw) - [**Clover Dashboard - Adding Employees and Managing Employee Access**](https://youtu.be/qlwku_GXJn0) - [**Clover Dashboard - Adding Discount**](https://youtu.be/SibivbOMazY) - [**Clover Dashboard - Adding and Managing Printer Labels**](https://youtu.be/BkEXx41FKgI) - [**Clover Dashboard - Adding an Item and Category**](https://youtu.be/AEuU0aPeoOY) ### Support Contacts Our Support team is ready to guide you, no matter what your enquiry relates to. Clover users can access support through their devices, and the help desk can be reached 24/7. For account enquiries, you can also contact us via email: **Sales and general enquiries **- hello@artspay.com **Accounts and settlements **- support@artspay.com For questions about your account and general enquiries, please call 1300 354 155. #### For urgent technical help, please contact our 24/7 helpline Clover Experience. **Clover Experience **- 1800 999 592 (option 2) 7 days a week, 24 hours --- Source: https://www.artspay.com/docs/clover-payments # Clover Payments #### ⚙️ Step 1: Unbox Your Clover Terminal **Inside your Clover box, you’ll find:** - 📦 Charging cradle - 🔌 Power cords - 🧾 Receipt paper roll - 💳 Clover Flex EFTPOS terminal #### Setup Instructions 1. Open the box and take out all components. 1. Build the power cord using the included parts. 1. Connect the power cord to a power source. 1. Plug the power cord into the **bottom of the charging cradle**. 1. Place the Clover Flex terminal onto the cradle — the light should turn **green**. #### 📱 Step 2: Set Up Your Device You’ll need: - 📧 Access to your **email address** - 📶 Your **Wi-Fi password **(if using Wi-Fi) **⚙️ Setup Process** 1. Press the **power button **on the right-hand side of your Clover Flex. 1. Wait for the Clover logo to appear — setup takes around **10 minutes **(including updates). 1. During setup, an **activation code **will be sent to the account owner’s email. - Each device has its **own unique code **. 1. Enter the activation code, connect to Wi-Fi, and download software updates. 1. Create a **4-digit passcode **to unlock your device. > **Note** > 🕐 Pause here to complete setup before continuing. #### 💡 Step 3: Quick Tips After setup, your Clover Flex will show several apps — just like a smartphone. Here’s a quick setting to adjust before you start taking sales: #### Turn Off “Employee Check In” 1. Log in with your passcode. 1. Open the **Shifts App**. 1. Tap the **☰ menu** (top left). 1. Go to **Settings**. 1. Uncheck **‘Check Ins’**. ✅ Done! #### Turn on “Quick Acess” 1. Log in with your passcode. 1. Open the **Employees App**. 1. Tap the **☰ menu** (top left). 1. Go to **Settings**. 1. Check ‘Allow Employees Access without Passcode’. ✅ Done! #### 👩💻 Step 4: Manage Employee Access You’ll need your **computer or laptop **(we recommend **Google Chrome or Mozilla Firefox **). ##### 🌐 Access the Clover Dashboard 1. Check your email for a Clover dashboard invite. - If you can’t find it, go to: [https://www.ap.clover.com/login](https://www.ap.clover.com/login) 1. Log in with the **account owner’s credentials **. ##### 👥 Employee Roles - **Admin **– Full access - **Manager **– Can process refunds, view reports, manage most functions - **Employee **– Can only process payments 💡 Decide if you’ll use **individual logins **or one **generic shared login **(e.g. “Bar Staff”). ##### ➕ Add Employees 1. Go to **Employees **in the left-hand menu. 1. Select **Add Employee **. 1. Enter: - Full name - Phone number - Email address - Role (Admin / Manager / Employee) - 4-digit passcode (for device access) 1. Repeat for each team member as needed. > **Note** > Tip: Managers are often best set as Admins for full access. #### 💳 Step 5: Taking a Payment ##### 🧾 How to Take a Payment 1. Log in using your **device passcode **or select **Quick Access **. 1. Tap **Sales **. 1. Enter the **amount **to process. 1. Select **Pay **and choose payment method ( **Cash **or **Card **). 1. Once complete, you can print or send a receipt digitally. 1. Tap **Done **to finish. #### 💸 Step 6: Processing a Refund _(Admin and Manager access only)_ ##### ↩️ How to Process a Refund 1. Log in with your **4-digit passcode **. 1. Open the **Transactions App **. 1. Select the transaction you wish to refund. 1. Tap the red **Refund **button. 1. Choose **Full **or **Partial **refund. 1. Once complete, the refund will appear in transaction history. #### 📊 Step 7: End of Day Reporting _(Admin and Manager access only)_ ##### 🧮 How to Print an End of Day Report 1. Log in to your Clover device. 1. Open the **Reports App **. 1. Under **Date Range **, select **Today **(or customise as needed). 1. Choose either: - **All Devices **(for combined reports), or - **This Device **(for individual reports). 1. Tap the **Printer App **to print your End of Day report. #### ✅ You’re All Set! 🎉 Your Clover device is now ready to go! If you need further help: - Refer to our **Support Page** - Or contact us anytime: 📧 **support@artspay.com** Welcome to ArtsPay! 🌿 --- Source: https://www.artspay.com/docs/clover-pos # Clover POS #### ⚙️ Step 1: Set Up Your Devices 1. Plug in your devices and turn them on. 1. Follow the on-screen setup guide. 1. Check your email for an **activation code **and use it to complete setup. #### 🧾 Step 2: Set Up Taxes (Clover Dashboard) 1. Go to the **Settings **tab (top right). 1. Scroll down and click **View All Settings **. 1. Click **Taxes and Fees **under **Business Operations **. 1. Click **Add a Tax Rate **. 1. Label it **GST **and set the tax amount to **10% **. 1. Mark it as **default **. 1. Press **Save **. #### 🧾 Step 3: Set Up Receipts (Clover Dashboard) ##### Receipt setup for Payment Receipts - Go to the **Settings **tab (top right). - Click on **Payment Receipts **. - Adjust merchant and customer receipts in **Printing Preferences **. - Add a **logo **. - Customise **Display Preferences **for receipt content. ##### Receipt setup for Order Receipts - Go to the **Settings **tab (top right). - Scroll down and click on **View All Settings **. - Go to **Transactions > Order Receipt **. - Customise and adjust **Order Receipt settings **. > **Note** > Note: Order receipts are used for kitchen or bar printing. #### 🧩 Step 4: Create Order Types (Clover Dashboard) This is useful if you have common order types such as Dine In or Takeaway. 1. Go to the **Settings **tab (top right). 1. Scroll down and click on **View All Settings **. 1. Go to **Transactions > Order Types **. 1. Click **Add Order Types **(e.g., DINE IN, TAKEAWAY). #### 📦 Step 5: Build Your Inventory (Clover Dashboard) ##### Adding categories to your POS - Click on **Items **in the left-hand panel. - Click **Categories **and then **Add Category **(green button). - Label the category and press **Save **. - Select the category and begin adding items. - Press **Save **when done. - **Example Categories: **FOOD, BEVERAGES, MAINS, DESSERT. ##### Adding Printer Labels to your POS These labels are for your printers (Kitchen printer, Bar Printer, Floor printer). Assign the labels to your items to make sure they print in the right place. - Click on **Items **in the left-hand panel. - Click **Printer Labels **and then **Add Printer Label **(green button). ##### Adding Modifier Groups to your POS - Click on **Items **in the left-hand panel. - Click **Modifier Group **and then **Add Modifier Group **(green button). _To add modifiers to the modifier group._ - Once you Add Modifier Group, add the modifiers under this group. **Example: **Create a Steak Modifier Group - add the modifiers Rare, Medium Rare and Well Done. - Then attach the Modifier Group to the specific item. ##### Adding items to your POS - Click on **Items **in the left-hand panel. - Click **Add Item **(green button). - Assign a **category **for the item. - Assign a **printer label **for the item. - Assign a **Modifier Group **for the item if needed. - Set **stock level **in **Item Tracking **, if needed. ##### How to upload your own items in bulk - If you have existing inventory, importing items to your POS is easy. Click on the **Import **option in Items and upload your items in a separate window. - Use the template to ensure your data matches up correctly. - Download the inventory template below. [Click here to get a Clover Inventory Template for your Menu](https://docs.google.com/spreadsheets/d/1j4tTDcTMWL_Z45Ph6A488fU9bKa9rMp8/edit?usp=sharing&ouid=109887736988671559397&rtpof=true&sd=true) > **Note** > Advanced inventory management (quick explanation) > > Variants: Used for retail—for example: sizes (S, M, L, XL). > > Modifiers: Used for custom options—for example: soy milk, almond milk. #### 👩💼 Step 6: Employee Management (Clover Dashboard) Adding employees 1. Go to **Employees **on the left-hand panel. 1. Click **Add Employees **(green button). 1. Fill in the details, including adjusting the Access they have (for example Employee, Manager and Admin) and assigning **unique passcode **(this code lets the employee access terminals). 1. Click **Save **(info will be emailed to the employee). > **Note** > Please note: All Employees added must have their own individual email. ##### Managing employee permissions 1. Go to the **Employees **page. 1. Click on **Permissions **. 1. Expand **View App Permissions **. 1. Adjust access roles. 1. Click **Save **when finished. #### 📊 Step 7: Reporting - The dashboard has a number of easy-to-use reports. - Use the Clover GO App (iOS/Android) to access reports on the go. #### 📴 Step 8: Set Up Offline Mode (Clover Dashboard) In case of an outage or any connection issue, set up Offline Mode so you can still take payments. ##### How to set up offline payments 1. **Open a browser **and go to the [Clover login page ](https://www.clover.com/). 1. **Log in **to your Clover account. 1. **Go to Settings **(top right) and select either: - **Account & Setup **, or - **Settings > View all settings **(depending on what you see). 1. Under **Transactions **, click **Payments **. 1. Scroll down to **Offline Payments **and click **Edit **. 1. For each device, choose: - **Do not allow offline payments **(disables offline payments), or - **Allow offline payments **(enables transactions when there’s no signal). 1. Optional: set limits - **Limit each offline payment to $___** - **Limit total offline payments to $___** - **Require approval for offline payments over $___** 1. Click **Save **. #### ⚡ Step 9: Set Up Quick Access ##### On the Clover Flex 1. Enter your passcode into the Clover device. 1. Open the **Employees **app. 1. Tap the **three lines **(top left) and go to **Settings **. 1. Toggle **Quick Access **on. 1. Exit the screen properly. 1. Turn the device **off and on **— you should now see the **Quick Access **button appear. #### 🧾 Step 10: Remove Cheque from Tender Types (Clover Dashboard) 1. Go to the **Settings **tab (top right). 1. Scroll down and click on **View All Settings **. 1. Go to **Transactions > Payments **. 1. Click **Edit **on Tenders. 1. Untick **Check **. 1. **Save **. #### 🏷️ Step 11: Staff Discounts (Clover Dashboard) 1. Go to **Items **and then click **Discounts **. 1. Click **Add New Discount **. 1. Enter a **Name **for the discount and **Amount **(you can change it to $ or %). 1. Click **Add **. > **Note** > On the Clover Device, you can adjust and add the selected discount in Payments. #### 🖨️ Step 12: Connect Your Order Printer to Your Device Make sure your Order Printer is connected to the same Wi-Fi as your Clover device. 1. Make sure your **Order Printer **is on the **same Wi-Fi network **as your Clover device. 1. On your Clover device, open the **Printers **app. 1. Tap the green **‘+’ **button to add a new printer. 1. Choose whether the printer will be used as an **Order Printer **or a **Payment Printer **. 1. Select the **Printer Label **you want the printer assigned to (e.g., “Kitchen” or “Counter”). 1. Test the setup by printing a **Test Receipt **or firing a **Test Order **. ✅ Your Clover device and printer are now linked and ready for use. ##### Compatible Third Party Printers | Brand | Model | Printer Type | Interface | Suppliers | | --- | --- | --- | --- | --- | | Star | TSP143III (LAN) | Thermal | Ethernet | POS Central | | Star | Mc-Print 3 (MCP30) | Thermal | Ethernet | Officeworks | | Star | SP742 | Dot Matrix (heat resistant) | Ethernet | POS Central | | Epson | TM-m30II | Thermal | Ethernet | POS Central | | Epson | TM-m30III | Thermal | Ethernet | POS Central | | Epson | TM-T20III | Thermal | Ethernet | Discontinued | | Epson | TM-T82II | Thermal | Ethernet | Discontinued | | Epson | TM-T82IIIL | Thermal | Ethernet | POS Central | | Epson | TM-U220B | Dot Matrix (heat resistant) | Ethernet | POS Central | | Epson | TM-L90 | Thermal Sticky Label | USB | Discontinued | #### 📉 Step 13: Enable Automatic Stock Count (Clover Dashboard) ##### Step 1: Enable stock tracking in settings 1. Log in to your **Clover Dashboard **. 1. Click the **Settings **cog (top-right) and select **View All Settings **. 1. Under **Business Operations **, click **Inventory **. 1. Next to **Stock Tracking **, click **Edit **. 1. Toggle on: - **Track Stock** - **Automatically Update Item Counts** 1. Click **Save **. ##### Step 2: Enable automatic availability per item 1. From the Dashboard menu, go to **Items > Item List **. 1. Select the item you want to update. 1. Tick the box for **Automatically Manage Availability **. 1. Click **Save **. ✅ Once enabled, Clover will automatically track stock levels and adjust item availability based on sales. --- Source: https://www.artspay.com/docs/clover-restoke # Restoke #### ArtsPay Restoke Guide ##### ⚙️ Step 1: Set up your Clover account & menu You’ll work with the **ArtsPay team **to get your Clover account ready. **✅ What to do** 1. Confirm your Clover account is set up correctly. 1. Build your menu in Clover. 1. Add your: - Items - Modifiers - Pricing > **Note** > 🕐Pause here once your menu is complete before moving on. #### 🔌 Step 2: Set up Restoke & connect Clover **✅ What to do** 1. Complete the setup of your Restoke account. 1. In Restoke, go to **Integrations **. 1. Connect Clover and run the sync to import your Clover menu into Restoke. #### 🧾 Step 3: Build recipes, suppliers & inventory in Restoke Once your items are synced from Clover to Restoke, you can start building your inventory system. **✅ What to do** - Add your suppliers - Cost your recipes - Cost your beverages - Do a stocktake > **Note** > 💡Tip: Chat with the Restoke team to get the most out of the platform and confirm your setup matches your workflow #### 🧪 Step 4: Complete a test transaction **✅ What to do** 1. Process a small test sale in Clover. 1. Confirm the POS → inventory sync is working and inventory is debited correctly in Restoke. #### 🚀 Step 5: Go live with Clover + Restoke Once the sync is confirmed and your recipes/suppliers are set up, you’re ready to start taking orders with inventory tracking. ✅ Done! > **Note** > Want more information about Restoke? Visit their Getting Started Guide here. --- Source: https://www.artspay.com/docs/commerce-control # Commerce Control Centre For all ArtsPay merchants, we can provide access to our platform **Commerce Control Center **where you can find your Transaction, Quick Sales Overview and Funding Records. > **Note** > Use this guide to find transaction reports, settlement summaries, and monthly statements in the Commerce Control Center. ##### What you’ll be able to do - Run a detailed transaction search for a specific site/location - Expand a transaction to view deeper processing details (auth/capture/terminal info) - Generate a “Top Sites” settlement summary for a chosen date range - Download monthly statement PDFs ##### Before you start - Make sure you have access to the **Commerce Control Center** - Have your **Site ID **ready (example: _42298585175553 _) - Decide the **date range **you want to report on (e.g., **Last Month **) #### How to find a Transaction List #### Generate a detailed transaction search 1. In the left menu, click **View**. 1. Select **Settlement**. 1. Scroll down and open the **Search** tile. 1. On the right side, click **Add Filters**. 1. Search for **Site** and select **Site Hierarchy** _(only if you have multiple Merchant IDs (MIDs))_. 1. In the popup: - Enter your **Site ID** - Click **Go** - Select the site name - Click **Go** again to apply the filter 1. Click **Date Range**, choose your preferred range (e.g., **Last Month**), then click **Generate**. **What you’ll see** A transaction list for the selected site and date range. #### Review transaction details (and expand technical info) 1. Review the transaction list. 1. Scroll horizontally to see additional fields such as **Batch Sequence ID**, **Order Number**, and **Processed Amount**. 1. To view deeper details for a transaction, click the **Plus (+)** icon on the left of the row. **Expanded details can include** - Auth code - Capture method - Terminal ID - Other processing fields #### How to find a Overview Summary #### Access the “Top Sites” summary 1. Return to **Settlement**. 1. Open the **Top Sites** tile. 1. Click **Add Filters** and apply **Site Hierarchy** again using your **Site ID** _(only if you have multiple MIDs)_. 1. Set your **date range** and click **Generate**. **What you’ll see** A high-level summary for the selected site, including: - Sales count - Net amount - Processed sale amount #### How to find a Monthly Statement #### Retrieve monthly statements (PDF) on Commerce Control Center 1. Navigate to **View** → **Statements & Documents**. 1. Enter your **Site ID** and click **Go**. 1. Expand the relevant year (e.g., **2026 statements**). 1. Select a month to download the PDF. #### How to find a Funding Records #### Find funding records 1. Go to **View** then **Funding** in **Commerce Control Center.** 1. Scroll down and find **Generic Analysis.** 1. In **Generic Analysis**, update these fields: 1. Customise the **Date Range** for the funding date you’re after. 1. Change **Group 1** to **Funded Date**. 1. Change **Time Zone** to **Australia/Sydney**. 1. _(Optional)_ If you have multiple Merchant IDs (MIDs), add another filter for **Site Hierarchy**. 1. Once you have entered the required fields, select **Generate** 1. Refer to the last column: **Processed Amount Paid** for the funding figure. 1. Also take into consideration: - **Processed Adjustments** - Any reprocessed fees **What you’ll see** - The amount funded into the merchant’s account after settlement. ![Commerce Control Centre](https://cdn.sanity.io/images/rdtjgnzx/production/c21c335a351b8af09444606c335d5528ce598903-1091x443.png) --- Source: https://www.artspay.com/docs/comprehensive-guide # Clover Comprehensive Guide Welcome to your Clover Comprehensive Guide. My name is Vivian and I’m here to guide you and help set up your Clover devices. Let’s get started. Scroll below and follow the steps. #### Set up employees & access levels ##### Creating employee profiles and assigning device access codes 1. Log in to your Clover Dashboard. 1. From the menu on the left-hand side, click on **‘Employees’ **. 1. Select **‘Add Employee’ **on the main Employee page. 1. Enter the following details for each team member: - Full name - Phone number - Email address - Role within the business - Four-digit passcode (this is important for device access) The four-digit passcode acts as the employee’s login code. It allows them to access their account on the Clover device as well as on the Clover Go app. ##### Modifying and adjusting employee access 1. In your Clover Dashboard, navigate to the **‘Employees’ **section. 1. Click on the **three dots **on the Employee page. 1. Select the **‘Permissions’ **tab. 1. Expand each category to adjust access levels. Click the **pen icon **to edit each task and manage employee permissions. For example, you can limit manual refund access to Owners, Managers, or Admins—ensuring regular employees cannot perform refunds. You can also edit to allow employees to manage refunds too. #### Enable Quick Access (and understand limits) ##### Adding Quick Access and functions/limitations on Quick Access 1. To add Quick Access, you need to disable the device passcode requirement. 1. Go back to the **Employees **section. 1. Click on the three dots on the Employee page. 1. Select **Device Passcode **. 1. Enable Quick Access by ensuring the circle is selected to allow **unlocking Clover devices without a passcode **. ⚠️ Quick Access allows faster access into the device without the passcode. You can take payments and make a sale, however you cannot perform a refund. You will need to log in with your passcode to perform a refund. #### Taking a payment ##### Sales App 1. On your Clover device, tap the **Sales **app. 1. Enter the **sale amount **, then select either **Cash **or **Charge **. 1. If you select **Charge **, the customer can tap, insert, or swipe their card to complete the payment. 1. Choose the preferred **receipt option **(print, email, or no receipt). ##### Phone Sales App (card-not-present) The **Phone Sales App **is used to take payments over the phone. Please contact our team if you need access to this feature. 1. On your Clover device, tap the **Phone Sales **app. 1. Enter the **sale amount **. 1. Tap **Phone Sale **and enter the customer’s **address details **. 1. Enter the **card information **: card number, CVV, and expiry date. 1. Tap **Continue **to process the payment. #### Processing a refund ##### Transactions App 1. On your Clover device, tap the **Refund **icon. 1. Tap **Past Payments **— this will open the **Transactions **app. 1. Scroll through the list and **select the transaction **you want to refund. 1. Tap **Refund **. 1. To print a receipt, return to the transaction, tap **Receipt **, and select **Print **. ##### Dashboard 1. Log in to your **Clover Dashboard **. 1. Go to **Sales Activity **> **Transactions **> **Payments **. 1. Locate the transaction you want to refund. 1. Click **Detail **next to the transaction. 1. Scroll down and click **Refund **. 1. Enter the **refund amount **, then click **Refund **again. 1. Follow the on-screen prompts to complete the process. You can filter by date, payment method, employee, etc., to find it more easily. ##### Orders App (Clover Mini POS) Only applicable if you’re using a Clover POS with the Orders App. 1. On your Clover POS, open the **Orders **app. 1. Search for the relevant **transaction or order **. 1. Tap **Exchange/Refund **, then choose **Refund Payment **. 1. Tap the specific **transaction **, then select **Refund **. 1. Follow the prompts to complete the refund. #### End of day reporting & settlements ##### Using the Closeout App on Your Clover Device To close your daily sales, follow the steps below: 1. On your Clover device, tap the **Closeout **app. 1. You will see a list of the **batches **from the week. 1. Tap on the batch listing to view details. 1. You can print the listing by tapping on **Print Totals Reports** A **receipt will print automatically **once the settlement is complete. This happens automatically, and you will not need to manually settle the machine. ✅ Performing a daily closeout ensures your sales are properly settled and processed. ##### Using the Reporting App on your device. 1. On your Clover device, tap the **Reporting **app. 1. You will see a Sales summary of your transactions processed. 1. You can print by tapping on the **Printer **icon. You can filter by date, employees, order type and device (all devices or specific device) ##### Clover Dashboard - Finding your Merchant Statements 1. On your Clover Dashboard, go to **Finances** 1. Click on **Statements** 1. Click on relevant Merchant Statement report to download. ##### Clover Dashboard - Transaction Reports 1. On your Clover Dashboard, go to Sales Activity 1. Select ‘Transactions’ Here, you can filter by date, employee, online/offline, etc. ### Additional tips #### Clover Go (Tap 2 Pay) Tips ##### Clover Go - Settlement Report 1. Open the app on your iPhone, log in and go to **‘More’** 1. Tap on ‘More’ and then expand Reports 1. Select Sales Report 1. Search for the relevant report. You can filter by date, employees, order type and device (all devices or specific device) The window will populate data with the relevant report ##### Clover Go - Finding your Transaction Report 1. Open the app on your iPhone, log in and go to **‘More’** 1. Tap **‘Sales Activity’ **, then select **‘Transactions’** Here, you can filter by date, employee, online/offline, etc. This will show you the **Number of Payments (Transactions) **and **Total Payment** #### Clover Flex Tips ##### Turning off pop ups for Employees 1. On your Clover device, go to the Shifts App 1. Click on the Hamburger Menu Icon on the Top Left 1. Tap on Settings 1. In Settings, uncheck the box for ‘Check Ins’ ##### Adjusting Screen Time and Brightness 1. On your Clover Device, go to the Main Page 1. Tap on Device Settings 1. Select Display 1. Select ‘Screen Time and Timeout’ to adjust Screen Time and select ‘Brightness’ to adjust the brightness of your device ##### Shorten your receipt length 1. On your Clover Device, go to Setup Apps 1. Select Payment Receipts 1. Check box that says Print Compact receipts #### Additional Dashboard Tips ##### Setting up Offline Payments 1. On your Clover Dashboard, click on the Setting cog on the right hand corner 1. Scroll down and view all settings 1. On the Transaction category, select Payments > **Note** > Here you can enable/disable Offline Payments for your device, and additionally edit the limits to Offline Payments. This feature allows you to be able to take payments when the network is down on your Clover device, and when the device is online again, that is when the transaction is processed. We recommend taking details of the customer when the device is offline. #### Additional Point of Sale (POS) Tips ##### Adding GST (Tax Rate) via Clover Dashboard To add a 10% GST to your POS system: 1. Log in to your **Clover Dashboard **. 1. Click the **Settings cog **in the top-right corner. 1. Scroll down and click **All Settings **. 1. Under **Business Operation **, select **Tax and Fees **. 1. Click **Add Tax Rate **. 1. Enter the tax details: - **Rate **: 10% - **Label **: GST - Tick the box for **Default Settings **to apply GST to all items by default. 1. Click **Save **to apply the changes. ✅ Your Clover POS will now automatically apply GST to applicable sales. ##### CUSTOMISE PAYMENT AND ORDER RECEIPTS > **Note** > You can also customise Payment Receipts, which are different from Order Receipts. While Order Receipts are generated when an order is placed (e.g., a food order that goes to the kitchen), Payment Receipts are printed after a transaction has been completed. ##### Configure Payment Receipt 1. From your Clover Dashboard, click the **Settings cog **in the top-right corner. 1. Select **View All Settings **. 1. Scroll down and click on **Payment Receipts **. **Editing Payment Receipt Preferences:** 1. Click **Edit **in the Payment Receipts section. 1. Customise options such as: - Automatically **print merchant receipts **after each order - **Skip receipt printing **and start the next transaction immediately - Automatically **mark items as printed** - Add a **custom logo or image **to the receipt - Edit the **receipt header and footer **text (e.g., business info or thank-you message) - Enable additional display preferences like: - Show **cashier’s name** - **Group items by guest** - Display **business website** 1. Click **Save **. ✅ Customising your payment receipts ensures that both you and your customers receive the right level of detail post-transaction, with branding and information tailored to your business. ##### Configure Order Receipt Follow these steps to customise how your order receipts appear and print: 1. **Log in **to your Clover Dashboard. 1. Click on the **Settings cog **in the upper right-hand corner of the screen. 1. Select **View All Settings **. 1. Scroll down and click on **Order Receipts **under the settings menu. Once inside the **Order Receipts **settings: 1. You can manage **printing preferences **such as whether a manager passcode is required to **reprint receipts **. 1. Click **Edit **to customise your receipt layout and preferences, including: - Receipt **font size **(e.g., Large) - Whether to display **order numbers** - Whether to **include notes** - Show or hide **modifier groups** - Grouping **line items **on the receipt - Using **alternative inventory names **(e.g., a back-of-house name different from the customer-facing one) - **Display a barcode **on the receipt 1. Click **Save **. ✅ These settings help you tailor what information is shown on both customer and internal order receipts to suit your business needs. ##### CONNECTING YOUR ORDER PRINTER TO YOUR DEVICE Make sure that your Order Printer is connected to the same Wi-Fi as your Clover device Follow these steps to set up your printer and link it to your Clover device: 1. Make sure your **Order Printer **is connected to the **same Wi-Fi network **as your Clover device. 1. On your Clover device, open the **Printers **app. 1. Tap the green **‘+’ button **to add a new printer. 1. Choose whether the printer will be used as an **Order Printer **or a **Payment Printer **. 1. Select the **Printer Label **you want the printer assigned to (e.g., “Kitchen” or “Counter”). 1. Test the setup by printing a **Test Receipt **or firing a **Test Order **. ✅ Your Clover device and printer are now linked and ready for use. ##### HOW TO REMOVE MODIFIERS FROM PAYMENT RECEIPTS Modifiers are options (e.g., “extra cheese” or “no onion”) that appear on receipts. You can choose to hide them if you don’t want them on your payment receipts. **To Hide Modifiers on Receipts:** 1. Click the Device **Settings cog **in your Clover Device. 1. Scroll down and click Payment **Receipts **. 1. Click **Edit **. 1. Scroll to the **Modifier Display **section. 1. Untick the box for **Show Modifiers on Receipts **. ✅ Modifiers will no longer appear on your printed or digital receipts. ##### HOW TO TURN OFF QR CODE PAYMENTS By default, Clover may display a **“Scan to Pay” **QR code on customer receipts. You can turn this feature off in your payment preferences. **To Disable QR Code / Scan to Pay:** 1. Log in to your **Clover Dashboard **. 1. Click the **Settings cog **in the top-right corner. 1. Select **View All Settings **. 1. Under **Payments **, click **Payment Preferences **. 1. Scroll to the **Scan to Pay **option. 1. Toggle **Scan to Pay **to **Off **. 1. Click **Save **. ✅ The QR code will no longer be displayed on customer receipts. --- Source: https://www.artspay.com/docs/contact-support # Contact Support #### Contact ArtsPay Support For general account or sales enquiries, please get in contact with our team. ##### General support (Mon–Fri, 9am–5pm AEST) - Email us at support@artspay.com - Call **1300 354 155** #### Terminal support (24/7) If you need urgent help with a terminal, please contact your terminal/provider support team: - **Clover: **1800 999 592 - **Fiserv (Move5000 / PAX A920): **1800 243 444 (option 1) - **Datamesh: **1300 023 282 > **Note** > We recommend having your terminal ID or serial number on hand to help speed up the process. --- Source: https://www.artspay.com/docs/dashboard-logins # Terminal Logins #### Commerce Control Centre This is for all merchants, payment terminals and online payments. Use Commerce Control Centre to get your merchant statements and invoices. Set up daily reports to your inbox - [Commerce Control Login](https://cl.businesstrack.com/clx/) - Tip: Bookmark this page for faster access. You can find more information on how to use Commerce Control here . #### Clover Dashboard For all Clover merchants. - [Clover Dashboard Login](https://www.ap.clover.com/login) > **Note** > Please make sure you save this link, this is the Australian Clover Website. #### Mentor (Datamesh reporting) Exclusively for Datamesh terminals including DX800 and Datamesh PAXA920. - [Mentor Dashboard Login](https://mentor.datameshgroup.com/user/login) Here is also a downloadable guide on how to use the **Mentor dashboard **: [Mentor dashboard user guide](https://artspay.cdn.prismic.io/artspay/ZiClxPPdc1huKl9P_DMG_Mentor_User_Guide_v07.pdf) > **Note** > Mentor is the platform for Datamesh users to collect sale data and reports from their terminals. Please refer to the Mentor dashboard user guide for more information. --- Source: https://www.artspay.com/docs/developer # ArtsPay Developer Docs Overview copy here. --- Source: https://www.artspay.com/docs/dining-app # Dining App #### 🍽️ Step 1: Install Clover Dining 1. On your Clover device, open **More Tools **. 1. Search for **Clover Dining **and install the app. #### 🚀 Step 2: Launch and start setup 1. Open the **Clover Dining **app. 1. Tap **“Let’s Get Started” **to begin the setup. #### 🗺️ Step 3: Build your floor plan (Sections + Tables) ##### Create Sections 1. Tap the **green plus (+) **button. 1. Select **Add Section **. 1. Enter a name (e.g., “Main Dining Room”, “Patio”, “Bar”) and tap **Save **. ##### Add Tables to a Section 1. Open the section you want (e.g., “Main Dining Room”). 1. Tap the **green plus (+) **button again. 1. Choose **Add Table **. 1. Enter a table name/number. 1. Select a table shape (e.g., square, round) and set the number of seats. 1. Tap **Save **. #### Arrange and save Drag and drop tables to position them on the floor plan. - Adjust table sizes as needed. - Repeat until all sections and tables are added. - Tap **Complete Setup** to save your configuration. #### ✏️ Step 4: Edit your floor plan (later, if needed) 1. Open **Clover Dining **. 1. Tap the **Menu **button (three horizontal lines). 1. Select **Floor Plan **. 1. Make changes and save. ##### 🍽️ Step 5: Set up coursing 1. Go to **Settings **→ **Coursing **. 1. Choose how many courses you want (e.g., 3-course or 5-course). 1. Select whether courses should: - fire **automatically on a schedule **, or - be fired **manually **by staff. 1. Tap **Save **. > **Note** > Important note about subscriptions\nMerchants on the Clover Table Service Restaurant subscription can publish menus and have access to Clover Dining. #### 🗓️ Step 6 (Optional): Public holiday / Sunday menu pricing To implement public holiday or Sunday pricing, create a **separate menu **(you are adjusting prices, **not **adding a surcharge). ##### Create a new menu 1. Go to **Items **→ **Menu **. 1. **Duplicate **the Default POS Menu. 1. Name the new menu (e.g., **“PH Menu” **). 1. **Select **the newly created menu. > **Note** > When you publish a menu from the Default POS Menu option, this is taken from your current inventory. ##### Adjust prices 1. Click **Categories and Items **→ **Edit **. 1. Increase prices by **15% **for public holidays (or your chosen percentage). 1. Click **Save **. ##### Switch menus on your Clover device 1. Open the **Register **app. 1. Tap the **three-dot icon **(top-right). 1. Tap **Switch/Change Menu **→ select the new menu. ##### Update receipts (recommended) 1. Go to **Payment Receipts **. 1. Add a note like: **“price includes public holiday surcharge (15% surcharge)” **to clarify the pricing. ## How to enable DayPart Menus on Clover > **Note** > 'Dayparts' let you schedule different POS menus to show automatically at different times of day (for example Breakfast, Lunch, Dinner). 'Dayparts' are only available for merchants using CSR and TSR subscriptions, and applied to only POS menus, not online ordering menus. ##### What you need before you start - The merchant already has the POS menus created in Clover Dashboard. - You know the merchant’s **business hours** and the exact **menu changeover times**. ##### Key concepts - **Daypart**: A time window you define (days + start time + end time). - **Menu availability**: Where you assign one or more dayparts to a menu. - **Fallback menu**: The menu Clover will show **whenever there is a gap** (within business hours) where no daypart menu is scheduled. #### 1) Configure dayparts (Clover Dashboard) 1. Go to **Settings → Business Operations → Business Hours**. 1. Scroll to the bottom to find **Dayparts**. 1. Select **Add**. 1. Enter the daypart details: - **Daypart name** (must be unique) - **Days** (choose specific days or **Select all**) - **Start time** and **End time** 1. Select **Save**. ![](https://cdn.sanity.io/images/rdtjgnzx/production/03260669e6df01c5b2ee13febd27633462ea6d4e-992x1006.png) ##### Editing a daypart 1. In **Dayparts**, find the daypart. 1. Select the **three vertical dots** next to the daypart. 1. Select **Edit**. 1. Update **name**, **days**, and/or **times**. > **Warning** > Changing the days or times for a Daypart can change when menus appear on the merchant’s POS. ![](https://cdn.sanity.io/images/rdtjgnzx/production/c6845cbce0f3700686ff357be6a76314af229317-1354x922.png) ##### Deleting a daypart 1. Find the daypart. 1. Select the **three vertical dots**. 1. Select **Delete**. 1. Confirm deletion. > **Warning** > Deleting a Daypart can impact which menus display on POS (and may impact online, depending on merchant setup). ![](https://cdn.sanity.io/images/rdtjgnzx/production/1464bb672662821a30540ab99c3ce034433d278a-1326x940.png) ##### Common daypart errors - **Each daypart name must be unique.** - **Each daypart timeframe must be unique.** Dayparts cannot share the same days and times (no overlapping time windows). ![](https://cdn.sanity.io/images/rdtjgnzx/production/3772d1ec2d5894f0f67c1912d5d48b3167554703-1326x956.png) #### 2) Assign a daypart to a POS menu 1. Go to **Items → Menus**. 1. Select the **menu name** you want to schedule. 1. Select **Menu details**. 1. Scroll to **Menu availability**. 1. Select **Edit** next to Menu availability. 1. Tick the daypart(s) you want assigned to that menu. 1. Select **Save**. ![](https://cdn.sanity.io/images/rdtjgnzx/production/17d44d1004f96e3855bf8e4b3e9a8d4b4aa6fafa-1350x856.png) ![](https://cdn.sanity.io/images/rdtjgnzx/production/17d44d1004f96e3855bf8e4b3e9a8d4b4aa6fafa-1350x856.png) ![](https://cdn.sanity.io/images/rdtjgnzx/production/abb8c1d936e4c627889814f7bb99ee64bd76dd28-1250x712.png) ![](https://cdn.sanity.io/images/rdtjgnzx/production/8aebfd93ebb27280753f2bb0ffc7f0055aed6492-1344x764.png) ##### If a daypart cannot be selected That daypart is already assigned to another menu. - To use it on a different menu, first remove (unassign) that daypart from the other menu. #### 3) Edit a menu’s dayparts (add or remove) 1. Open the menu in **Items → Menus**. 1. Go to **Menu details → Menu availability → Edit**. 1. Select or unselect dayparts. 1. Select **Save**. ![](https://cdn.sanity.io/images/rdtjgnzx/production/f7ae4e8352e19f7044cea98d5dc14adb16121154-1004x626.png) ![](https://cdn.sanity.io/images/rdtjgnzx/production/4be54fc54881b9ff6ff277d16295ec7782111209-1070x494.png) #### 4) Configure the fallback menu (recommended) A **fallback menu** shows on POS **during business hours** when no other daypart menu is scheduled. - Clover will automatically set the **Default POS menu** (typically the first menu created) as the fallback menu. ##### Change the fallback menu 1. Go to **Settings → Business Operations → Menu Settings**. 1. Select **Edit**. 1. Use the dropdown to choose the fallback menu. 1. Select **Save**. ![](https://cdn.sanity.io/images/rdtjgnzx/production/80eae678a4b7ffe51761fe9b76467c34f89ebe0c-1396x1004.png) ##### How to find the fallback menu On the **Menus** landing page, the fallback menu is labeled with descriptive text so it is easy to identify. ![](https://cdn.sanity.io/images/rdtjgnzx/production/f52c113a45ca46e520e49ef8c76f7595443d17fb-1402x684.png) #### 5) What the merchant sees on device (Register / Dining) - The scheduled menu will automatically display during the daypart. - A banner may show when the current menu ends and which menu will be next. ##### Manually change the menu on device (if needed) 1. In the **Register** app or **Clover Dining** app, select the **three vertical dots** (top right). 1. Select **Change menu**. 1. Choose a menu from the list. 1. Select **Done**. ![](https://cdn.sanity.io/images/rdtjgnzx/production/588d77ca6afe2b987bc30b3d652de2f1c3fc55db-1388x936.png) --- Source: https://www.artspay.com/docs/fraud-screening # Fraud Screening #### Fraud Screening for Online Payments Fraud screening helps reduce fraudulent online transactions. We offer two options: - **Forter **— risk-based screening that helps detect suspicious activity and reduce chargebacks. They implement data collected overtime and have a large database to draw from. - **3DS2 (3D Secure 2) **— an additional verification step for cardholders. Banks may prompt customers to authenticate during checkout (e.g. via their banking app or a one-time passcode). > **Note** > To discuss which option is best depends on your business, customers, and risk profile, contact [support@artspay.com](mailto:support@artspay.com) for advice. ##### Click on the link below to head to their website - [**Forter**](https://www.forter.com/) - [**3DS2**](https://3dsecure2.com/frictionless-flow/) --- Source: https://www.artspay.com/docs/frequently-asked # Frequently Asked Questions ### Merchant Account FAQ #### Where are my monthly statements? Your monthly statements are available in your Commerce Control account. Go to View > Statements & Documents #### How do I add users on Commerce Control? Email [support@artspay.com](mailto:support@artspay.com) with: - Full name - Email address - Phone number - MID (and which MIDs the user should have access to) #### How do I update my address? To update your address, email [support@artspay.com](mailto:support@artspay.com) with: 1. New address 1. Proof of address document (one of): - Signed lease - Utility bill - Bank statement with new address #### How do I update my bank account? 1. Contact ArtsPay Support and we will send you a bank account change request form (PDF) to fill out. 1. Provide proof of bank account (one of): Bank Statement or a Letter of Account Opening (within the last 3 months). 1. Email the two documents to [support@artspay.com](mailto:support@artspay.com) to request the bank account update. #### How do I close my merchant account? Please email Merchant Services a cancellation request: [merchantservicesau@fiserv.com](mailto:merchantservicesau@fiserv.com) and cc [support@artspay.com](mailto:support@artspay.com) - MID: - Exact date of termination: - Number of terminals: - Terminal pickup address: - Merchant’s email address: - Merchant’s feedback: #### How do I find my transactions and overview report on Commerce Control? Go to View > Settlement. For Transactions, go to the bottom of the page and click Search. For overview reports, go and click Top Sites. Adjust the date range and click Generate. ### Terminal FAQ General #### How to order paper rolls? For Move5000 - Fill out a paper roll request - [here](https://merchants.fiserv.com/en-au/support_resources/paper-roll-request-form/). For PAXA920 - fill out a paper roll request - [here](https://merchants.fiserv.com/en-au/support_resources/paper-roll-request-form/). For Datamesh terminals - Purchase paper rolls - [here](https://www.officeworks.com.au/shop/officeworks/p/keji-70gsm-thermal-rolls-57-x-35mm-24-pack-ketr573524). - For Clover terminals - Email [clover_experienceanz@fiserv.com](mailto:clover_experienceanz@fiserv.com) and include: - First name - Last name - Merchant ID - Shopfront name (Trading / Site Name) - Mobile number - Trading hours (weekdays + weekend) - Receipt roll amount (60, 120, 180, 300, 600) - Clover Flex amount - Clover Mini amount - Clover Station Duo amount - Clover Kiosk amount - Address line 1 - Address line 2 - City - State (NSW, VIC, QLD, SA, WA, TAS, NT, ACT) - Postcode - Is the delivery address the Trading/Site address or Personal/Home address? - You will receive a confirmation once the request has been processed, and an SMS with tracking details once the order is processed by the paper roll vendor. Delivery is within 5 to 10 business days. #### What is my refund code? The refund code for MOVE5000 and PAXA920 is the last for digits of your merchant ID (MID). #### How do I submit a manual refund? Email the request to [merchantservicesau@fiserv.com](mailto:merchantservicesau@fiserv.com) with a copy of the receipt (image) and the amount that needs to be refunded. Our team will manually process the refund. If you cannot provide the receipt, please send these details to initiate the refund. — Transaction details - Date: - Time: - Merchant ID: - Purchase amount $ - Amount to be refunded $ #### How to enable AMEX on my terminal? Get in touch with ArtsPay support to set up AMEX - support@artspay.com #### How do I add Afterpay to my terminal? In order to enable AfterPay for your terminals you need to submit some information to their system. Please contact Afterpay support and provide them with your **Merchant ID and Terminal ID** and request your accounts to be connected. It usually takes 24 - 48 hours. Here is the AfterPay support form (copy and paste below): [Link to AfterPay support form](https://help.business.afterpay.com/hc/en-au/requests/new) #### What is my Terminal Password? You can find your Terminal Passwords for your PaxA920 and DX8000 terminals on your Onboarding Email. This password is required to allow you to change settings on your terminal. See below for your reference: **PAXA920 Terminals** Terminal password - pax9876@@ Exit password - 0000 **DX8000 Terminals** Merchant password: 0000 (this can be changed in settings). Terminal password: 350000 #### I received a chargeback, what do I do? Kindly follow the instructions on the letter or email. If you have further queries regarding this letter, please contact us on [support@artspay.com](mailto:support@artspay.com). Please note: the following information will be required to assist us getting you support: - ARN/Our reference number (from letter) - Amount of Chargeback/Request - Card number (first 6 digits xxxx last 3 digits) - Date letter was sent and date of transaction #### How can I view my processed transactions? Login to your reporting platform - [Commerce Control](https://cl.businesstrack.com/clx/) - [Mentor (Datamesh terminals only).](https://mentor.datameshgroup.com/user/login) - [Clover Dashboard](https://www.ap.clover.com/login?webRedirectUrl=%2Fdashboard) #### Do you integrate with my POS? ArtsPay integrates with over 600+ POS systems. Our technicians are available to help with setup and your integration. Get in touch with support@artspay.com to schedule an integration. ### Payment Gateway FAQ #### What is Fat Zebra? Fat Zebra is ArtsPay’s online payment gateway partner. It processes online card payments for ecommerce websites, apps, and virtual terminal payments, and provides reporting, webhooks, and fraud tools. #### Where can I find the developer docs (Fat Zebra)? Fat Zebra developer documentation is [available here](https://docs.fatzebra.com/). #### Which integrations do you support (eCommerce platforms)? Fat Zebra supports common ecommerce integrations (for example WooCommerce, Shopify, Magento, and other platforms) via plugins or API-based integrations. If you tell us your platform and website provider, we can confirm the best integration approach. #### Do you have test card numbers for the sandbox? Yes — Fat Zebra provides test card numbers for use in the test/sandbox environment. Use the test card list in the [Fat Zebra docs here](https://docs.fatzebra.com/docs/test-cards). #### How can I check uptime / service status? You can check [Fat Zebra’s service status page here](https://status.fatzebra.com/). #### What fraud screening options are available? Fraud tools vary depending on your setup. We currently offer 3D Secure (where available) and Forter. If you share what you’re trying to prevent (fraud, chargebacks, card testing), we can recommend the right settings. #### Do you offer a virtual terminal? Yes — a virtual terminal is available for keyed (card-not-present) payments in a browser through Fat Zebra. Email [support@artspay.com](mailto:support@artspay.com) to request virtual terminal access and we can help set you up. #### How do I add users / permissions? In the left-side menu, click **Account → Users** to add more people to your account. You can edit permission levels to keep your account secure. #### I can’t log in — what should I do? 1. Double-check you’re using the correct login link provided during onboarding. 1. Try resetting your password (if available on your login page). 1. If you’re still stuck, email [support@artspay.com](mailto:support@artspay.com) with your business name and the email address you’re trying to use, and we’ll help you regain access. --- Source: https://www.artspay.com/docs/google-pay # Google Pay #### Get Google Pay for your business **Set up Guide** 1. Please look into the docs: [Google Pay Fat Zebra Guide](https://www.artspay.com/docs/google-pay) 1. Contact ArtsPay Support (support@artspay.com) to enable Google Pay on your Fat Zebra account. 1. Once enabled from our end and create a [Google Merchant ID ](https://pay.google.com/business/console/?utm_source=devsite&utm_medium=devsite&utm_campaign=devsite)on Google. 1. After that, follow the Fat Zebra Google Pay Guide from Step One to complete the integration. > **Note** > If you’re using an ecommerce platform (e.g., WooCommerce/Shopify), confirm whether the platform/plugin supports Google Pay natively or if it needs a custom integration. --- Source: https://www.artspay.com/docs/guides # ArtsPay Guides Guides and documentation to help you on your payments journey. #### Merchant guides Download the guides for all the information you need regarding your merchant account. #### Payment terminal guides Learn more about the payment terminals and how to use them effectively with guides from our payment partner, Fiserv. --- Source: https://www.artspay.com/docs # ArtsPay Support ArtsPay Support offers a comprehensive overview of available options and guides to help you effectively navigate your ArtsPay products. It provides valuable tips and tricks to make sure you get the most out of your payments solution. > **3D Secure x React integration** > **Using Fat Zebra's React SDK (**`**@fat-zebra/sdk**`**) for 3DS?** Upgrade to [version 2.1.7](https://www.npmjs.com/package/@fat-zebra/sdk) or later and redeploy, or 3DS may stop triggering. #### Common use cases #### To get support for your payment solution #### Popular pages --- Source: https://www.artspay.com/docs/mcp # Build with AI coding agents (MCP) *Connect Claude Code, Cursor, VS Code, Codex or Claude to the ArtsPay docs, API reference and example integrations, so your coding agent builds ArtsPay payments from the real documentation instead of guessing.* The ArtsPay MCP server gives AI coding agents direct access to the ArtsPay documentation. MCP (Model Context Protocol) is the open standard coding agents use to connect to tools and data. Once it's connected, your agent can search the guides, read any page, look up exact API fields and pull code from the official example integrations while it works. Server URL: `https://mcp.artspay.com/mcp` ## Why it matters ArtsPay is a specialist payments platform, so most AI models know little about it. Left to guess, a coding agent will invent endpoints, reach for outdated patterns or borrow from another provider's API. With the MCP server connected, it looks things up instead. In our testing, agents with the MCP server connected built checkouts that followed the documented integration path, checked signed payment results on the server and used the correct test cards. They also finished faster than agents searching the web on their own. ## Before you start - **Nothing to sign up for.** The server is public and read-only. It needs no account, sign-in or API key. - **It only reads documentation.** It can't see your ArtsPay account, transactions or credentials, and it can't take any action on your account. - **Your own credentials still come from ArtsPay.** Your agent will build against the sandbox. To process payments you need your ArtsPay gateway credentials, and some features (3D Secure, Apple Pay, Google Pay) must be enabled on your account by ArtsPay support first. ## Set up Pick your coding agent. You can also open **Set up agent** at the top of any docs page. ### What your agent can do | Tool | What it does | | --- | --- | | `search_docs` | Searches the guides, product docs, developer docs and API reference, and returns the best-matching sections with links. | | `get_doc` | Reads a full docs page, or one section of it, as Markdown. | | `get_endpoint` | Returns the exact reference for an API endpoint: method, path, base URL, parameters and example requests and responses. | | `list_examples` | Lists the official example integrations by flow and stack, such as Hosted Payment Pages with Vue and Node. | | `get_example` | Reads an example integration's README, file list or a single file, with a download link for the full project. | | `lookup_response_code` | Explains a gateway response code and what to do about it. | | `get_test_cards` | Returns the sandbox test cards and the result each one produces. | The server also gives your agent a short set of ArtsPay best practices, such as preferring the Hosted Payments Page, how to enable 3D Secure correctly and keeping credentials on the server. ### Try it Once it's connected, ask your agent to build something. For example: - "Set up a Vue cart and checkout that takes card payments with ArtsPay, with a Node backend and 3D Secure." - "How do I set up 3D Secure on WordPress with ArtsPay?" - "Save a customer's card at checkout and charge it monthly from my Node backend." - "What does response code 51 mean, and what should my checkout show the customer?" If your agent doesn't use the ArtsPay tools on its own, mention ArtsPay in your request or ask it to "use the ArtsPay docs". ### Security and privacy - **Read-only.** The server only returns public documentation and example code. It has no access to ArtsPay accounts or payment data. - **Don't paste secrets or card numbers into your agent.** The server never needs them. Keep gateway credentials in environment variables on your server, as the examples do. - **Usage logging.** To improve the docs, we log which tools are called and what was searched for, such as "3D Secure WooCommerce". We don't log IP addresses, and anything that looks like a card number or key is removed before it's stored. - **Review what your agent writes.** Treat generated code like any other code: review it, and test it in the sandbox before going live. ### Without MCP If your agent doesn't support MCP, it can still read the docs directly: - **Copy for LLM** at the top of any docs page copies that page as Markdown, ready to paste into any AI tool. - Every docs page is available as Markdown at its URL plus `.md`, for example `https://www.artspay.com/docs/guides/3d-secure.md`. - [llms.txt](https://www.artspay.com/docs/llms.txt) lists every page for AI tools, and [llms-full.txt](https://www.artspay.com/docs/llms-full.txt) contains them all in one file. ## FAQ #### Does it cost anything? No. The MCP server is free to use and needs no account. #### Can my agent take payments or change my account through it? No. It only reads documentation and example code. Anything involving your account, such as processing payments or refunds, uses your own credentials in your own code. #### It won't connect. What should I check? Check the URL is exactly https://mcp.artspay.com/mcp. On a company network, ask your IT team to allow mcp.artspay.com. In Claude Code, /mcp shows the connection status; restart the agent after adding the server. #### Why do the API docs mention Fat Zebra? ArtsPay is built on the Fat Zebra gateway, so the gateway API, fatzebra.js and @fat-zebra/sdk carry that name. Use them as documented with your ArtsPay credentials. #### Where do I send feedback? Email [support@artspay.com](mailto:support@artspay.com). If your agent couldn't find something it needed, we'd like to know. --- Source: https://www.artspay.com/docs/online-logins # Online Logins #### Payment Gateway and Payment Link Dashboard logins For logins to your Payment Gateway and Payment Links Dashboard. - [**Payment Gateway (Fat Zebra) login**](https://artspay.pmnts.io/sessions/new) - [**Payment Links dashboard login**](https://identity.artspay.com/login) #### Commerce Control Centre This is for all merchants, payment terminals and online payments. Use Commerce Control Centre to get your merchant statements and invoices. Set up daily reports to your inbox - [Commerce Control Login](https://cl.businesstrack.com/clx/) - Tip: Bookmark this page for faster access. You can find more information on how to use Commerce Control [here ](https://www.artspay.com/docs/commerce-control). --- Source: https://www.artspay.com/docs/online-payments # Online Payments ArtsPay supports two ways to take payments online: - **Payment Gateway **(powered by Fat Zebra): for websites, shopping carts and custom integrations. - **Payment Links **: create and send secure links from the ArtsPay dashboard, with optional integrations (e.g. Xero, Harvest). ### Dashboard logins For logins to your Payment Gateway and Payment Links Dashboard. - [**Payment Gateway (Fat Zebra) login**](https://artspay.pmnts.io/sessions/new) - [**Payment Links dashboard login**](https://identity.artspay.com/login) ### Developer Docs #### Technical documentation If you are planning a custom integration, refer to the developer documentation: [Developer Documentation](https://www.artspay.com/docs/developer) ### Fraud Screening Fraud screening helps reduce fraudulent online transactions. We offer two options: - Forter - 3DS2 Head to our [Fraud Screening](https://www.artspay.com/docs/fraud-screening) page for more information. ### Test Card Numbers Test card numbers are available here: - [Test Card Numbers](https://www.artspay.com/docs/test-card-numbers) ### Payment Links Payment Links let you take payments online by creating secure, shareable links from the ArtsPay dashboard—no website or coding required. For more information, go to our [Payment Links](https://www.artspay.com/docs/payment-links) page. ### Product Links Product Links let you create a simple “buy now” link for a specific product or service, with the price (and optional surcharge) set upfron For more information, go to our [Product Links](https://www.artspay.com/docs/product-links) page. ### Frequently Asked Questions #### Where can I access developer docs? If you are planning on doing a custom integration or building a website, you can access the Fat Zebra documentation to help you get started: [Review technical docs](https://www.artspay.com/docs/developer). #### Can you integrate with online platforms and shopping carts? Yes — ArtsPay integrates with WooCommerce, Magento 2, Gravity Forms, Shopify Plus, and Circle (bookstores). Get in touch to learn more: [support@artspay.com](mailto:support@artspay.com) #### Is the gateway down? Can I see the uptime? Yes — [view the Fat Zebra uptime status report](https://status.fatzebra.com/). #### How do I use the virtual terminal? The virtual terminal can be used to take card payments over the phone. In the left-side menu, click **Virtual Terminal**, then enter the payment details. #### How do I add users to my account / dashboard? In the left-side menu, click **Account → Users** to add more people to your account. You can edit permission levels to keep your account secure. #### What is Fat Zebra? Fat Zebra is an Australian payment gateway and online payments provider with over 15 years’ experience. Together, we help companies accept payments and manage growth seamlessly. For more information, [click here](https://www.fatzebra.com/platform/payments). #### How do I reconcile multiple payments? All daily transactions are rolled up and deposited as one payment, which means there is an extra reconciliation step required. You can download transactions from your dashboard to support reconciliation. If you are using the Xero integration, this guide may help you set up a robust reconciliation process: [Read more](https://developer.xero.com/documentation/guides/how-to-guides/handling-payment-processor-receipts-in-xero/#accounts-setup). --- Source: https://www.artspay.com/docs/payment-links # Payment Links ## Want to use Payment Links? Payment Links are a quick way to request a payment associated to an invoice, an item, a service when you do not need to create a product or service that is ongoing. Perfect for a one-off payment. Use Payment Links by sending a link to customers by email or SMS, track payment status, and optionally connect to tools like Harvest to streamline invoicing and reconciliation. #### Creating a Payment Link 1. Login to your ArtsPay Dashboard, and simply click the '$ Create Payment Link' any time you need to request a payment. 1. Fill in the Amount, Currency and Reference. 1. Check the box if you wish the details to be editable. 1. Copy your generated Payment Link 1. Send your link to your customer over email, social media, messages etc ... ![ArtsPay Payment Links](https://cdn.sanity.io/images/rdtjgnzx/production/53b23cf3c60295eaabcb756a9a90068cd0dff405-1962x1174.png) ### **Payment Links Integration** You can choose to connect your Payment Links with Harvest. #### Harvest Connect your ArtsPay account to your Harvest account and give your customers the option to pay your invoices with a credit card immediately. As a complete integrated payment services, currently Harvest only supports PayPal and Stripe. However you can very simply generate a URL to include in any of your Harvest email messaging. #### Configure Harvest and your Payment URL 1. Copy the custom Payment URL - _this URL is generated for your account only_. 1. Log in to your Harvest account and navigate to Invoices > Configure > Messages where you can include the ArtsPay Payment URL in all of your Harvest Messaging, further [details here](https://support.getharvest.com/hc/en-us/articles/360048686431-Configuring-Invoice-and-Estimate-Settings#invoice-and-estimate-messages). 1. That's it! Harvest messaging can automatically include dependent information, such as the invoice balance, the invoice issue date, or the invoice due date. A complete list of Harvest variables is available In your Harvest Invoices > Configure > Messages section. ### **Archiving a payment link** Archiving a payment link cancels it. Once archived, customers will no longer be able to use that link to pay you unless it’s unarchived. This doesn't affect any payments already made through the link, only future use of it. #### To archive a payment link: 1. Log in to your ArtsPay Dashboard. 1. Find the payment link (or the product it's linked to) in your list of links. 1. Select Archive. **Note: **Editing a payment link's amount does not update it for the customer. If you need to change the price, archive the old link and create a new one rather than re-sending the original. If you're not sure which link to archive, or need help finding one, contact support@artspay.com. ### **Payment Link Troubleshooting** _Proposed new docs page — could sit under the Payment Links section, linked from the main payment-links page._ ##### My customer can't complete a payment using my link. If a customer tells you they can't pay using a link you've sent, work through these checks in order. 1. **Check the link hasn't been archived:** Archiving a payment link cancels it. Check your ArtsPay Dashboard to confirm the link is still active. 1. **Check you haven't edited the price on an old link:** Editing a payment link's amount updates it for the customer, the link still charges the original amount. 1. **Check for a declined card:** The most common causes are insufficient funds or an expired card. Ask the customer to try a different card. 1. **Check whether fraud screening is involved: **If you have 3DS2 on your account, the payment may require extra verification from the customer's bank. See [Fraud Screening](https://www.artspay.com/docs/fraud-screening) for details. _**Still not resolved?**_ Email support@artspay.com with the payment link and the approximate time of the failed attempt, and our team will investigate on our end. --- Source: https://www.artspay.com/docs/payment-links-guides # Payment Links #### Want to use Payment Links? Payment Links are a quick way to request a payment associated to an invoice, an item, a service when you do not need to create a product or service that is ongoing. Perfect for a one-off payment. Use Payment Links by sending a link to customers by email or SMS, track payment status, and optionally connect to tools like Harvest to streamline invoicing and reconciliation. ![Payment Links](https://cdn.sanity.io/images/rdtjgnzx/production/620e04b07c09a691a69b7566a03db28d41709cd8-1687x1303.png) ### Payment Links Integration You can choose to connect your Payment Links with Harvest. Harvest Connect your ArtsPay account to your Harvest account and give your customers the option to pay your invoices with a credit card immediately. As a complete integrated payment services, currently Harvest only supports PayPal and Stripe. However you can very simply generate a URL to include in any of your Harvest email messaging. > **Note** > Harvest messaging can automatically include dependent information, such as the invoice balance, the invoice issue date, or the invoice due date. A complete list of Harvest variables is available In your **Harvest Invoices > Configure > Messages** section. --- Source: https://www.artspay.com/docs/product-links # Product Links #### Want to use Product Links? Product Links let you create a payment page to share a link with your customers via email or text message. #### How do I create a Product Link? 1. Login to your [ArtsPay Dashboard](https://identity.artspay.com/login), and simply click the 'Product Links' in the navigation. 1. If you have already created previous links, they will be displayed here. 1. To create a new link click New Product on the right side. 1. Fill in the Name, Description (optional), Amount, Tax %, Images (optional). 1. Check the boxes to collect email and address details. 1. You can choose to send the Product Link via SMS or Email to your customer. When you ‘Save’, the product will be sent. ![Product links](https://cdn.sanity.io/images/rdtjgnzx/production/969207d608b85b0351eed5cfe7af2745f8c121d8-2830x1230.png) *Create a Product Link* ![](https://cdn.sanity.io/images/rdtjgnzx/production/73f1513457699674f3373212d5e4ad1dd63f628b-1940x1154.png) *Product Link Page* ![](https://cdn.sanity.io/images/rdtjgnzx/production/149de9afdeb732d37a348935ba4f0cc442dc687a-1936x1166.png) ![](https://cdn.sanity.io/images/rdtjgnzx/production/facd3841ececfe2d280b26051d7dde9d637898cd-1468x1120.png) ![](https://cdn.sanity.io/images/rdtjgnzx/production/41350aef98bca21d3cf02734d10a770b2311755b-1444x1112.png) You can now copy the short URL to access the payment page for this product. Send the link to the customer via email or text message and they will go to a secure check out page, to make the payment. ![Product links](https://cdn.sanity.io/images/rdtjgnzx/production/2ae48a0e5addb6c0c4891eb209361d1605788e16-878x1012.png) *The Short Link to send to your customers* ![Product links](https://cdn.sanity.io/images/rdtjgnzx/production/cf214beeddc04dcce07c2bc2a247f691fb0b68cd-1050x599.png) *What the customers will see once they click on the links* > **Note** > To view your processed payments, you can view all them on the payment page. You can also look through your customer list and see payments associated with each customer. All data can be downloaded by clicking export in the top right corner. --- Source: https://www.artspay.com/docs/terminal-guides # Eftpos Terminal Guides #### Move5000 Guides Click below to download guides to help with your Move500 terminals - [Move5000 User Guide](https://merchants.fiserv.com/content/dam/firstdata/au/en/documents/1737553-ingenico-move-5000-terminal-technical-document-v2-ksc.pdf) - [Move5000 Quick Reference Guide](https://merchants.fiserv.com/content/dam/firstdata/au/en/documents/Move_5000_Quick_Reference_Guide.pdf) ##### **Common issues for Move5000** Below are common issues you may have using the Move5000, please click below to see trouble shooting steps to help navigate the issues. #### Pinpad Offline 1. Press **FUNC** + **CLEAR** together for **2 seconds**. 1. Press and hold the **green** button for **2 seconds** to refresh the terminal. #### Seeing ‘R’ on the Terminal Screen **Method 1** 1. Press **FUNC**, [9], [9]. 1. Enter security code **787237**. 1. When prompted: - Set **Type**: press [9] - Set **Func**: press [6] 1. After the pinpad attempts to complete the transaction, perform a **Logon**: - **Integrated:** **FUNC**, [1], [1], [0] - **Standalone:** **FUNC**, [1], [0], [2] **Method 2 (Integrated only)** 1. Disable Wi‑Fi (if applicable): Grey Menu Key → Terminal → Others → Settings → WIFI → **Switch Off**. 1. Set the terminal to **Standalone**: **FUNC**, [2], [ENTER]. 1. Enter access code **0240**, press [ENTER], then press [ENTER] at the **TID** prompt. 1. Set: - **Interface type:** None - **ETH Settings:** Skip 1. Reboot: press **FUNC** + [CLEAR] together. 1. Run **TMS & Logon**, then press **FUNC**, [1], [0], [2], [ENTER] — this should clear the reversal. 1. Re-enable Wi‑Fi (if applicable): Grey Menu Key → Terminal → Others → Settings → WIFI → **Switch On**. 1. Set the terminal back to **Integrated Mode**: - **FUNC**, [2], [ENTER] - Enter access code **0240**, press [ENTER], press [ENTER] at **TID** - **Interface type:** PCEFTPOS - **ETH Settings:** Skip 1. Reboot again: press **FUNC** + [CLEAR] together. #### Terminal offline: how to keep taking payments If the terminal can’t transmit a transaction to the card issuer (for example, due to a communications issue or the issuer being unavailable), it may switch into **electronic fallback (EFB)** mode. - EFB transactions require a **signature**. - You may see response code **“08 Approved with signature”**. Keep the terminal powered on (and keep mobile devices on charge), as offline transactions will be submitted automatically once the terminal is back online. If you’re using a Move5000, you can also try forcing submission by selecting **ADMIN → REPEATS** on the terminal. For more detail, please reference your [terminal user manual](https://www.notion.so/Payment-Terminal-Guides-8c00472c878041768d52c524a00bdf89?pvs=21). #### Switch from Integrated to Standalone 1. Press **FUNC**, then **2**, then **ENTER**. 1. Enter access code **0240**, then press **ENTER**. 1. Press **ENTER** again at the **TID** prompt. 1. Highlight **NONE** (Standalone), then select **Skip**. 1. Select **Cancel** #### Re-pair from Standalone to Integrated 1. Press **FUNC**, then **2**, then **ENTER**. 1. Enter access code **0240**, then press **ENTER**. 1. Press **ENTER** again at the **TID** prompt. 1. Highlight **PCEFTPOS** (Integrated), then select **Skip**. 1. Select **Cancel**. (Call Technical Support if you need assistance re-pairing). #### PAXA920 Guides Click below to download guides to help with your Move500 terminals - [PAXA920 User Guide](https://merchants.fiserv.com/content/dam/firstdata/au/en/documents/PAX-A920-User-Guide_V5_KR_SV.pdf) #### Datamesh terminals For more information and guides about Datamesh DX8000 and PAXA920 terminals. #### DX8000 Guides Click below to download guides to help with your DX8000 terminals [DX8000 user guide](https://prismic-io.s3.amazonaws.com/artspay/ae2d4d0e-1658-44e8-a457-41a7cd30cb89_ArtsPay_Datamesh_DX8000_Terminal_User-Guide.pdf) #### PAXA920 (Datamesh) Guides Click below to download guides to help with your PAXA920 terminals [Datamesh PAXA920 user guide](https://prismic-io.s3.amazonaws.com/artspay/551745aa-284e-49e3-a5c9-66be41b2eb39_ArtsPay_Datamesh_PAXA920_Terminal_User-Guide.pdf) ### **Returning a terminal you no longer need** If you have a terminal you no longer need, you can return it without closing your ArtsPay account. This is called decommissioning, and it's different from closing your account altogether: - **Decommissioning a terminal** returns the device but keeps your account and Merchant ID (MID) active. You can keep processing payments on your other terminals, or request a new one later. - **Closing your account **returns all terminals and **ends** your ability to process payments with ArtsPay. #### To return a terminal: 1. Email support@artspay.com with your Merchant ID (MID) and the Terminal ID (TID) of the device you want to return. Let the team know you want to decommission the terminal, not close your account. 1. You'll receive an SMS and email with a link to print a return label (Connote). 1. Drop the terminal off at your local Australia Post office using the label. There's no delivery charge, and you can track the return using the Connote number. Alternatively, you can arrange a technician pickup instead, just mention this when you contact support. **Note:** Terminals that aren't returned may incur a lost or stolen terminal fee, so it's best to start the return as soon as you know you don't need the device. If you have several terminals to return at once, mention this in your email and support can help coordinate it. **** ### **My terminal isn't working, how do I get it replaced?** If your terminal isn't working properly (won't turn on, battery issues, not printing, screen damage, etc.), call technical support first. They can troubleshoot the issue with you, and organise a replacement if needed. **Which number to call depends on your device:** - **Clover devices (Flex, Mini, Station Duo, Kitchen Display Screen):** call **Clover Experience** on **1800 999 592** (option 2). They'll troubleshoot the issue with you, and if a replacement is needed, they'll organise it on your behalf. - **All other terminals (Move5000, PAX A920, DX8000):** call the **AMTEK Technical Helpdesk** on **1800 243 444** (press 1, then 2). They handle troubleshooting and can organise a replacement or book a technician directly. **Note: **Have your Terminal ID (TID) or serial number ready before you call, it's usually on a sticker on the device, this helps speed up the process. If you're not sure which number applies to your device, or you can't get through, email support@artspay.com and our team can help from there. --- Source: https://www.artspay.com/docs/test-card-numbers # Test Card Numbers #### About Test Card Numbers Please note, these cards should only be used in the Test / Sandbox environment. You can find more information about Test Cards on the [Fat Zebra website](https://docs.fatzebra.com/docs/test-card-numbers). For example, every purchase made with _VISA 4005 5500 0000 0001 _will respond with **00 Approved **, and every purchase made with _VISA 4557 0123 4567 8902 _will respond with **05 Declined **. ##### See Test Card details below: | Card Type | Card number | Status | | --- | --- | --- | | 💳 Mastercard | `5123 4567 8901 2346` | 00 Approved | | | `5313 5810 0012 3430` | 05 Declined | | 💳 VISA | `4005 5500 0000 0001` | 00 Approved | | | `4557 0123 4567 8902` | 05 Declined | | 💳 AMEX | `3456 789012 34564` | 00 Approved | | | `3714 496353 98431` | 05 Declined | > **Note** > For further information, please go to Fat Zebra website for more information. --- Source: https://www.artspay.com/docs/woocommerce # WooCommerce > **PHP2Shell (October 2026)** > The ArtsPay plugin is not affected. The vulnerability is in PHP itself, so check with your host that your WordPress site runs PHP 8.2.35, 8.3.36, 8.4.27, 8.5.12 or later. ``` title="readme.txt" Version 3.1.1 | By ArtsPay Requirements: WordPress 6.0+ PHP 8.0+ WooCommerce (not version specific) Recaptcha/Turnstile API Keys (optional for robust bot detection) Supports WooCommerce Subscriptions. Added support for Forter Fraud screening ``` #### Connect to your Woo Commerce install to ArtsPay Installation is a simple two step process, first we add the ArtsPay x Woo Commerce plugin to your current WordPress installation, then we configure it to your ArtsPay/Fat Zebra settings. 1. Go to plugins in your WordPress Dashboard 1. Click Add New plugin in the top left and click Upload Plugin 1. Download the above latest build - [Woo Commerce ArtsPay ZIP](https://github.com/ArtsPay/artspay-woocommerce-plugin/releases/latest) (do not unpack, leave as ZIP) 1. Select the ZIP file from your computer and install the plugin, this may take a few minutes ... ☕ 1. Activate the plugin, either as part of installation or in the Installed Plugins list > **Note** > The plugin name might appear blank on first install because the gateway name can be **white labelled** in the settings. Go to **Manage** and save to set the name. #### Configure your ArtsPay x Woo Commerce installation 1. Once the plugin is installed, visit the WooCommerce settings page, and click on the Payment tab. 1. Click on Credit Card using ArtsPay to edit the settings. If you do not see ArtsPay in the list, make sure you have activated the plug in in the WordPress Plug in Manager. 1. Enable the Payment Method, and add in your Fat Zebra credentials Username, Token, Shared Secret. 1. For Production/Live accounts, make sure Test Mode is unticked, and Sandbox Mode is unticked. For Sandbox/Test accounts, see notes below. 1. Click Save. You can now make purchases! ![WooCommerce](https://cdn.sanity.io/images/rdtjgnzx/production/f58f24fb05bad195a00628b71275892a997c05a3-2874x1016.png) > **Note** > For all Sandbox and Test accounts, you can enter in any Username, Token and Secret combination. Make sure the 'Test Mode' and 'Sandbox Mode' is ticked. This setting will create a test purchase, but importantly, not display in your Payment Gateway list of transactions, ONLY in WooCommerce. #### Woo Commerce Order Statuses For each order made in your Woo Commerce payment system, they each have a status dependent on what stage an order is at. [Order statuses](https://woocommerce.com/document/managing-orders/) let you know how far along the order is, starting with “Pending payment” and ending with “Completed.” The following order statuses are used: | Status | Description | | --- | --- | | Pending payment | Order received, no payment initiated. Awaiting payment (unpaid). | | Failed | Payment failed or was declined (unpaid) or requires authentication (SCA). Note that this status may not show immediately and instead show as Pending until verified (e.g., PayPal). | | Processing | Payment received (paid) and stock has been reduced; order is awaiting fulfilment. All product orders require processing, except those that only contain products which are both Virtual and Downloadable. | | Completed | Order fulfilled and complete – requires no further action. | | On Hold | Awaiting payment – stock is reduced, but you need to confirm payment. | | Canceled | Canceled by an admin or the customer – stock is increased, no further action required. | | Refunded | Refunded by an admin – no further action required. | | Authentication required | Awaiting action by the customer to authenticate the transaction and/or complete SCA requirements. | ## Legacy Downloads ``` title="readme.txt" Version 2.4.2 | By Fat Zebra Requirements: WordPress 5.7.* PHP 7.4.* WooCommerce 8.0.* ``` For older WordPress installs, there is a legacy build by Fat Zebra available for download, this build uses a Hosted Payment Page to render the checkout experience. The install steps are as above. [**Download 2.4.2**](https://cdn.artspay.com/integration/woocommerce-artspay-gateway-2.4.2.zip ) --- Source: https://www.artspay.com/docs/guides/3d-secure # 3D Secure (3DS2) *Authenticate cardholders with 3D Secure 2 to reduce fraud and shift chargeback liability to the card issuer. Covers choosing an integration path, running the check, and passing results into your purchase call.* > **3D Secure x React integration** > **Using Fat Zebra's React SDK (**`**@fat-zebra/sdk**`**) for 3DS?** Upgrade to [version 2.1.7](https://www.npmjs.com/package/@fat-zebra/sdk) or later and redeploy, or 3DS may stop triggering. 3DS2 is the current industry standard for authenticating a cardholder during an online payment. Depending on the issuer's risk assessment, the customer either passes through invisibly (**frictionless**) or is prompted for a second factor, typically a one-time code or bank app approval (**challenge**). Used correctly, 3DS2 shifts liability for fraudulent transactions to the card issuer. It's the single biggest lever most merchants have for reducing chargebacks. ### Before you start 1. Contact ArtsPay support to have 3DS2 enabled on your account. Nothing below works until this is done. 1. Decide your integration path based on whether you already have an MPI (Merchant Plug-in) and what card data your own systems touch: see "Choosing your integration path" below. 1. If you're integrating with the Hosted Payments Page, you must use **fatzebra.js** (`renderPaymentsPage`), not the plain iframe-URL approach described in the [Hosted Payment Pages guide](https://www.artspay.com/docs/guides/hosted-payment-pages). That simpler integration doesn't support 3DS2. 1. Create a one-off OAuth Client in the Merchant Dashboard, then generate a fresh access token per checkout session before initialising fatzebra.js: see "Getting an OAuth access token" below. ### Choosing your integration path The right approach depends on whether you already have an MPI (Merchant Plug-in) and what card data your own systems touch. | You have | PCI level required | Path | | --- | --- | --- | | Your own MPI already | Depends on your existing setup | Authenticate with your MPI, then pass the resulting 3DS fields into ArtsPay's Purchase/Refund extra payload (see below) | | No MPI, ArtsPay's Hosted Payments Page | SAQ A | Path A: Hosted Payments Page | | No MPI, your own payment form | SAQ A-EP | Path B: Custom payment form | ### Getting an OAuth access token Both paths below need a short-lived OAuth token before initialising fatzebra.js: 1. In the Merchant Dashboard, go to **Settings → OAuth Clients → Create new OAuth Client** and download the `access_key` / `access_secret` (a one-off download, so save them securely) 1. Exchange them for a token: ```bash curl -X POST https://api.pmnts-sandbox.io/oauth/token \ -H "Content-Type: application/json" \ -d '{"access_key": "xxx", "access_secret": "xxx"}' ``` ```json // Response { "message": "created", "data": { "token": "xxx" } } ``` Store `data.token` from that response in the browser's `localStorage` under the key `fz-access-token` before initialising fatzebra.js Tokens expire after **15 minutes**, so create a fresh one per checkout session. ## Path A: Hosted Payments Page ```html ``` Setting `options.enableSca: true` is what turns the 3DS2 check on. Without it, the page behaves like a plain hosted payment page. When the customer submits, fatzebra.js tokenises the card, runs the 3DS2 check, then submits the purchase itself; you just react to the emitted events. ## Path B: Custom payment form If you collect card details on your own form, run the check explicitly with `verifyCard`: ```javascript fz.on('fz.sca.success', (event) => { // event.data contains cavv, sli, xid, ver, par, directoryServerTxnId, threedsVersion // send these to your backend to make the purchase call }) fz.on('fz.sca.error', (event) => { // event.data.errorCode, show an error, offer retry }) fz.verifyCard({ customer: { firstName: 'Captain', lastName: 'America', email: 'hello.world@example.com', address: '123 Australia Blvd.', city: 'Sydney', postcode: '2000', state: 'NSW', country: 'AU' }, paymentIntent: { payment: { amount: 1000, currency: 'AUD', reference: 'ref_123490' }, verification: 'ver_123480', }, paymentMethod: { type: 'card', data: { number: '4111111111111111', holder: 'John Doe', expiryMonth: '01', expiryYear: '2022', cvv: '123' }, }, }) ``` The issuing bank then decides between a **frictionless** pass-through or a **challenge** (OTP) flow; fatzebra.js displays the challenge modal automatically if one is required, no extra code needed. ### Passing the result into your purchase call On `fz.sca.success`, send the 3DS result fields to your backend and include them under `extra` on the Purchase or Refund call (**snake_case**, not the camelCase used in the browser event): ```json { "amount": 10, "currency": "AUD", "card_token": "syupxv5b1tqv4bqdsazr", "reference": "GfNStL8XJ1111", "customer_ip": "111.222.111.123", "extra": { "sli": "05", "cavv": "kAMRDwUADQVXiAPovxs+SQNhfGpb", "xid": "", "ver": "Y", "par": "Y", "directory_server_txn_id": "a8a35bcf-21d5-4f55-995a-a4b5e60d356d", "threeds_version": "2" } } ``` **Important:** A successful 3DS check can only be used for **one** purchase. Run a fresh `verifyCard` for each payment attempt; you can't reuse the same result data across retries. ### The 3D Secure extra fields (reference) | Field | Description | | --- | --- | | `sli` | Security Level Indicator (see table below) | | `xid` | Transaction ID from your 3DS provider (Base64, or 36-char string for Eftpos) | | `cavv` | Card authentication verification value (Base64) | | `par` | The `PARes` value from 3D Secure | | `ver` | The `VERes` value from 3D Secure | | `threeds_version` | e.g. `2`, `2.1`, `2.1.0`; defaults to `1` if omitted | | `directory_server_txn_id` | Directory Server Transaction ID, usually a UUID | | Visa & eftpos sli | Mastercard sli | Meaning | | --- | --- | --- | | `05` | `02` | Authenticated: XID and CAVV present | | `06` | `01` | Attempted: XID present, CAVV not present | | `07` | `00` | Not authenticated: neither present (default) | Full field reference: [3D Secure Card Payments](https://www.artspay.com/docs/developer/purchases/extra-and-extended-fields/3d-secure). ## Tools ## Testing | Scenario | Visa | Mastercard | Liability shift | | --- | --- | --- | --- | | Successful frictionless authentication | `4000000000001000` | `5200000000001005` | Yes | | Successful step-up (OTP) authentication | `4000000000001091` | `5200000000001096` | Yes | | Unsuccessful enrolment check | `4000000000002446` | `5200000000002037` | No | | Unsuccessful frictionless authentication | `4000000000001018` | `5200000000001013` | No | | Unsuccessful step-up authentication | `4000000000001109` | `5200000000001104` | No | Full list including Amex numbers and error codes: [3DS Cards for Testing](https://www.artspay.com/docs/developer/3ds2-integration/testing). **Note:** Watch for `ver: "N"` in a successful response: it means the card isn't enrolled in 3DS at all. The check technically "succeeds" but there's **no liability shift** for that transaction. ## FAQ #### Do I need my own MPI? No. If you don't have one, ArtsPay can act as your MPI. Contact support to have it enabled, then choose the Hosted Payments Page or custom-form path based on your PCI level. #### What happens if the customer's issuer doesn't support 3DS2? You'll usually see "attempts processing": the cardholder is enrolled but the issuer can't run the full check, so a stand-in authentication occurs. This still qualifies for liability shift. #### What happens if the OTP challenge fails? fz.sca.error fires with an error code, no liability shift applies, and you should prompt the customer to retry the check (which may result in a different frictionless/challenge outcome). #### Can I reuse a successful 3DS check across multiple purchase attempts? No. Each purchase you want liability-shifted needs its own fresh verifyCard result. #### Which PCI SAQ level applies to my integration? Hosted Payments Page keeps you at **SAQ A**. Building your own payment form (even calling fatzebra.js from it) puts you at **SAQ A-EP**, since your page is handling raw card fields before they're sent client-side. A direct backend API integration is **SAQ D**. --- Source: https://www.artspay.com/docs/guides/apple-pay-web # Apple Pay (Web) *Add a Buy with Apple Pay button to your website checkout, backed by ArtsPay. Covers merchant activation, domain verification, session creation and charging the resulting token.* Apple Pay lets a customer check out with a single touch using a card already saved in their Apple Wallet, instead of typing card details. This guide covers **Apple Pay on the Web** (Safari); native iOS/macOS app integrations use a different flow (`PKPaymentAuthorizationController`) and aren't covered here. Apple retrieves the card details securely and hands your site an encrypted payment token, so your systems are never exposed to raw card data for that transaction. > **Important** > Fat Zebra's Hosted Payment Page has an applepay URL parameter, but their own team confirmed this path isn't ready to rely on yet: their SDK support for showing wallet buttons inside the hosted page is still incomplete. Use the standalone integration in this guide instead. ### Before Starting 1. Activate Apple Pay (web) in the ArtsPay Merchant Dashboard and register your domain (see Step 1 below). Unlike Google Pay, nothing here works until this is done. Requires an Admin (or above) account role. 1. All pages showing the Apple Pay button must be served over HTTPS, on a domain you've verified with Apple. This applies in sandbox too: Apple has no separate "test domain" exemption, so plain `http://localhost` won't work. 1. An Apple Developer account, needed to register your Merchant ID. 1. Your site must meet Apple's [Acceptable Use Guidelines for Websites](https://developer.apple.com/apple-pay/acceptable-use-guidelines-for-websites/). 1. For testing, set up an [Apple Sandbox Tester account](https://developer.apple.com/apple-pay/sandbox-testing/) and add a sandbox test card to a real device's Wallet. There's no way to trigger the payment sheet without genuine Safari and Wallet support, unlike Google Pay's browser-only test flow. Domain verification and certificates are issued by Apple and have their own lead times, so start Step 1 well before your go-live date, not the week before. ## Step 1: Activate Apple Pay (web) and register your domain 1. In the Merchant Dashboard, go to **Settings → Apple Pay & Google Pay** (visible to Admin and above) and turn on **Apple Pay**. This automatically registers ArtsPay's own checkout domain with Fat Zebra, that part only matters if you're also using ArtsPay Payment Links, not for the custom integration in this guide. 1. Click **+ Add domain** and enter the domain your Apple Pay button will actually run on 1. Download the domain-association file from the dialog and host it at exactly `https://yourdomain.com/.well-known/apple-developer-merchantid-domain-association`, served as-is, with no redirect and no file extension 1. Click **Register domain**. Fat Zebra accepts the registration immediately, but the domain shows as **Pending** until ArtsPay has independently confirmed the file is hosted correctly, this is checked automatically every few seconds for a couple of minutes, or click **Recheck** to force an immediate check. Once confirmed, it flips to **Verified** 1. Add further domains the same way from the same screen ![Add new Domain to ArtsPay](https://cdn.sanity.io/images/rdtjgnzx/production/55ede86b50819b5693d6a9a002f563a2747135b2-2656x1614.png) ![ArtsPay Domain additional](https://cdn.sanity.io/images/rdtjgnzx/production/6fc5e702ae76d0ed2f3cdba1053e1bf039afa37b-2656x1614.png) Domain registration can also be managed programmatically via the [Digital Wallet Registration API](https://www.artspay.com/docs/api/digital-wallet-registration/merchant-registration) if you need to automate onboarding across many merchant subdomains. > **Note** > This dashboard flow replaces the older manual process of generating a Merchant Identity Certificate CSR and uploading it to the Apple Developer Dashboard yourself; ArtsPay now handles certificate issuance for you. ## Step 2: Add the Apple Pay button Check availability and render Apple's button: ```javascript if (window.ApplePaySession && ApplePaySession.canMakePayments()) { document.getElementById('apple-pay-button').hidden = false } ``` Style the button using [Apple's official button CSS](https://developer.apple.com/documentation/apple_pay_on_the_web/displaying_apple_pay_button) rather than a custom image. This is a requirement of Apple's guidelines. ## Step 3: Create a session and validate the merchant ```javascript const request = { countryCode: 'AU', currencyCode: 'AUD', supportedNetworks: ['visa', 'masterCard', 'amex'], merchantCapabilities: ['supports3DS'], total: { label: 'ArtsPay Merchant', amount: '10.25' }, } const session = new ApplePaySession(3, request) session.onvalidatemerchant = async (event) => { const res = await fetch('/api/apple-pay/session', { method: 'POST', body: JSON.stringify({ validationURL: event.validationURL }), }) const merchantSession = await res.json() session.completeMerchantValidation(merchantSession) } ``` Your backend calls ArtsPay's **Get Apple Pay Session** endpoint with that validation URL: ```bash curl "https://paynow.pmnts-sandbox.io/v2/apple_pay/payment_session?url=&domain_name=yourdomain.com&display_name=Your Store" \ -u YOUR_USERNAME:YOUR_TOKEN ``` This returns an opaque session object. Pass it straight back to the browser and into `completeMerchantValidation`. > **Note** > Note: The url value must come from Apple's whitelisted domains, or the endpoint returns 400 Bad Request. ## Step 4: Handle authorization and charge the card ```javascript session.onpaymentauthorized = async (event) => { const res = await fetch('/api/apple-pay/charge', { method: 'POST', body: JSON.stringify({ token: event.payment.token, amount: '10.25', reference: 'order_123' }), }) const result = await res.json() session.completePayment(result.successful ? ApplePaySession.STATUS_SUCCESS : ApplePaySession.STATUS_FAILURE) } ``` Your backend then calls **Create a purchase using a wallet**, passing the Apple Pay token through as-is: ```json { "amount": 1025, "currency": "AUD", "reference": "order_123", "wallet": { "type": "APPLEPAYWEB", "token": { "paymentData": { "...": "as provided by Apple" }, "paymentMethod": { "...": "as provided by Apple" } } } } ``` For transactions routed over **EFTPOS**, `token.paymentMethod.network` must be `"eftpos"` (case-insensitive); the response will include `metadata.least_cost_routed: "true"` when this happens. ## Testing In the ArtsPay sandbox, Apple Pay responses are **cent-based**: a $1.00 request returns response code `00` (approved), a $1.05 request returns `05` (declined), so you can drive any outcome by choosing the amount. ## FAQ #### Do I need to onboard separately for the app and the web? Apple Pay (app) and Apple Pay (web) are activated and configured separately in **Settings → Payment Methods**, even though they share the same underlying Merchant ID. #### Do I still need to manually generate CSRs and upload certificates to Apple? No. Onboarding via the Merchant Dashboard generates the certificate signing request for you and handles the certificate exchange. The manual CSR process still exists as a fallback but isn't the recommended path. #### Why does my domain show as "Pending" instead of "Verified"? Fat Zebra accepts a domain registration immediately regardless of whether the association file is actually hosted yet, so a new domain always starts as Pending. ArtsPay separately and repeatedly checks the file itself, byte-for-byte, against Fat Zebra's reference file for your environment — once that check passes, the domain flips to Verified automatically. If it stays Pending, double-check the file is hosted at exactly the path shown in the Add Domain dialog, served directly with no redirect, then click **Recheck**. #### Should I use the Apple Pay JS API or the W3C Payment Request API? Either works with ArtsPay. Apple Pay JS API (ApplePaySession, shown above) is the more common and simpler choice; the W3C Payment Request API is a cross-wallet standard if you're also supporting other payment request APIs on the same checkout. #### Can I test without real cards? Yes. The ArtsPay sandbox accepts Apple's sandbox test cards and returns cent-based response codes, so you can trigger any decline scenario deterministically. #### Does Apple Pay support recurring payments? Yes, using the card_token returned from the first Apple Pay transaction, but acquirer support for recurring Apple Pay transactions varies, so check with your acquirer before relying on it. --- Source: https://www.artspay.com/docs/guides/error-handling # Error Handling *Three small, high-level patterns for turning a Fat Zebra decline or API error into the right behaviour in your code, with examples in Node.js, Python, PHP and Ruby.* This guide pairs with the [Response Codes guide](https://www.artspay.com/docs/guides/response-codes), which covers what each `response_code` means and how to map it to a safe message. This one is about where that check actually lives in your code: three small patterns every integration needs, shown in Node.js, Python, PHP and Ruby. A decline isn't an exception, it's a normal response your code has to branch on every time a card is charged. Handle it once, in one place, and every checkout page in your app behaves the same way. Handle it ad hoc on each page, and you end up with some pages showing raw bank text to customers and others swallowing declines silently. ## The response shape Every Purchase, Refund and Auth/Capture call returns the same envelope. The top-level `successful` means the _request_ was valid; `response.successful` means the _transaction_ was approved. A malformed request and a declined card look different at this level, so check both: ```json { "successful": true, "response": { "successful": false, "response_code": "05", "message": "Declined" }, "errors": [] } ``` The examples below assume `result` is already the parsed JSON body of that call, however you're making it (raw HTTP, or your own wrapper). Nothing here depends on a particular SDK. ## Pattern 1: Check both levels of successful A 400-style problem (bad data, a permissions error) and a declined card both come back as JSON, not as a thrown error, so check the request-level and transaction-level `successful` separately before doing anything else. **node** ```node title="checkout.js" if (!result.successful) { // The request itself was invalid, not a decline throw new Error(result.errors.join(', ')) } if (!result.response.successful) { return handleDecline(result.response.response_code) } return handleApproved(result.response) ``` **python** ```python title="checkout.py" if not result["successful"]: raise ValueError(", ".join(result["errors"])) if not result["response"]["successful"]: return handle_decline(result["response"]["response_code"]) return handle_approved(result["response"]) ``` **php** ```php title="checkout.php" if (!$result['successful']) { throw new Exception(implode(', ', $result['errors'])); } if (!$result['response']['successful']) { return handle_decline($result['response']['response_code']); } return handle_approved($result['response']); ``` **ruby** ```ruby title="checkout.rb" raise result["errors"].join(", ") unless result["successful"] unless result["response"]["successful"] return handle_decline(result["response"]["response_code"]) end handle_approved(result["response"]) ``` ## Pattern 2: Map the code to a safe message Once you know it's a decline, look `response_code` up in a small message map instead of showing the bank's own wording. This mirrors the bucket table in Step 1 of the [Response Codes guide](https://www.artspay.com/docs/guides/response-codes): **node** ```node title="messages.js" const DECLINE_MESSAGES = { '51': 'This card was declined. Please use a different card or payment method.', '33': 'This card has expired. Please use a different card.', '54': 'This card has expired. Please use a different card.', } const LOST_OR_STOLEN = ['04', '07', '34', '35', '36', '37', '41', '43'] const GENERIC = 'Your bank declined this payment. Please use a different card or contact your bank.' function messageFor(code) { if (LOST_OR_STOLEN.includes(code)) return GENERIC return DECLINE_MESSAGES[code] ?? GENERIC } ``` **python** ```python title="messages.py" DECLINE_MESSAGES = { "51": "This card was declined. Please use a different card or payment method.", "33": "This card has expired. Please use a different card.", "54": "This card has expired. Please use a different card.", } LOST_OR_STOLEN = {"04", "07", "34", "35", "36", "37", "41", "43"} GENERIC = "Your bank declined this payment. Please use a different card or contact your bank." def message_for(code): if code in LOST_OR_STOLEN: return GENERIC return DECLINE_MESSAGES.get(code, GENERIC) ``` **php** ```php title="messages.php" $declineMessages = [ '51' => 'This card was declined. Please use a different card or payment method.', '33' => 'This card has expired. Please use a different card.', '54' => 'This card has expired. Please use a different card.', ]; $lostOrStolen = ['04', '07', '34', '35', '36', '37', '41', '43']; $generic = 'Your bank declined this payment. Please use a different card or contact your bank.'; function messageFor($code) { global $declineMessages, $lostOrStolen, $generic; if (in_array($code, $lostOrStolen, true)) { return $generic; } return $declineMessages[$code] ?? $generic; } ``` **ruby** ```ruby title="messages.rb" DECLINE_MESSAGES = { "51" => "This card was declined. Please use a different card or payment method.", "33" => "This card has expired. Please use a different card.", "54" => "This card has expired. Please use a different card.", }.freeze LOST_OR_STOLEN = %w[04 07 34 35 36 37 41 43].freeze GENERIC = "Your bank declined this payment. Please use a different card or contact your bank.".freeze def message_for(code) return GENERIC if LOST_OR_STOLEN.include?(code) DECLINE_MESSAGES.fetch(code, GENERIC) end ``` ## Pattern 3: Retry or refocus, don't just re-show the decline A handful of codes need different behaviour, not just different wording; see Step 2 of the [Response Codes guide](https://www.artspay.com/docs/guides/response-codes). Temporary errors deserve an automatic retry, and card-number or CVV problems deserve focus back on the field the customer needs to fix: **node** ```node title="next-action.js" const RETRY_CODES = ['19', '22', '90', '91', '92', '96', '99'] const FIELD_CODES = { '14': 'cardNumber', '82': 'cvv' } function nextAction(code) { if (RETRY_CODES.includes(code)) return { type: 'retry' } if (FIELD_CODES[code]) return { type: 'refocus', field: FIELD_CODES[code] } return { type: 'decline' } } ``` **python** ```python title="next_action.py" RETRY_CODES = {"19", "22", "90", "91", "92", "96", "99"} FIELD_CODES = {"14": "card_number", "82": "cvv"} def next_action(code): if code in RETRY_CODES: return {"type": "retry"} if code in FIELD_CODES: return {"type": "refocus", "field": FIELD_CODES[code]} return {"type": "decline"} ``` **php** ```php title="next_action.php" $retryCodes = ['19', '22', '90', '91', '92', '96', '99']; $fieldCodes = ['14' => 'card_number', '82' => 'cvv']; function nextAction($code) { global $retryCodes, $fieldCodes; if (in_array($code, $retryCodes, true)) { return ['type' => 'retry']; } if (isset($fieldCodes[$code])) { return ['type' => 'refocus', 'field' => $fieldCodes[$code]]; } return ['type' => 'decline']; } ``` **ruby** ```ruby title="next_action.rb" RETRY_CODES = %w[19 22 90 91 92 96 99].freeze FIELD_CODES = { "14" => "card_number", "82" => "cvv" }.freeze def next_action(code) return { type: :retry } if RETRY_CODES.include?(code) return { type: :refocus, field: FIELD_CODES[code] } if FIELD_CODES.key?(code) { type: :decline } end ``` ## FAQ #### Does this apply to Refunds and Auth/Capture too, not just Purchase? Yes. All three share the same envelope shape, so the same checks work unchanged. #### What about the top-level errors array? That covers request-level problems: bad JSON, a missing field, invalid credentials. Treat those as a bug in your integration to fix, not a payment outcome to show a customer. #### Do I need to retry indefinitely on the temporary error codes? No. Retry once or twice with a short delay. If it's still failing after that, fall through to the generic decline message rather than looping. --- Source: https://www.artspay.com/docs/guides/google-pay-web # Google Pay (Web) *Add a Google Pay button to your website checkout, backed by ArtsPay. Covers the gatewayMerchantId, requesting payment data, and charging the resulting token.* Google Pay lets a customer check out using a card already saved to their Google account, without typing card details into your form. The Google Pay button hands your site an **encrypted token** rather than a raw card number, so your systems aren't exposed to PCI scope for that data. > **Important** > Fat Zebra's own docs describe a Hosted Payment Page integration for Google Pay too, but their team confirmed this path isn't ready to rely on yet: their SDK support for showing wallet buttons inside the hosted page is still incomplete. Use the standalone integration in this guide instead. ### Before Starting 1. Nothing to enable in the ArtsPay dashboard: Google Pay is on by default for every merchant account, unlike Apple Pay. 1. Get your `gatewayMerchantId` (see Step 1 below). 1. For a production deployment, register a Google-issued `merchantId` by following [Google's production deploy guidelines](https://developers.google.com/pay/api/web/guides/test-and-deploy/publish-your-integration) and agreeing to Google's [terms of service](https://payments.developers.google.com/terms/sellertos). Not required for sandbox testing. 1. For testing, request access to Google's [test-mode stub data group](https://groups.google.com/g/googlepay-test-mode-stub-data): Google Pay's test cards require a real Google account. ## Step 1: Get your gatewayMerchantId Email [support@artspay.com](mailto:support@artspay.com) and ask for it, or derive it yourself deterministically from your API token (The hex digest must be lowercase. Some languages emit uppercase hex by default, which will produce the wrong ID). ```bash digest = OpenSSL::Digest::SHA256.hexdigest(api_token).downcase gateway_merchant_id = "#{username}-#{digest[0, 16]}" ``` ## Step 2: Configure the gateway tokenization spec When setting up the Google Pay `PaymentDataRequest`, point `tokenizationSpecification` at ArtsPay: ```javascript const tokenizationSpecification = { type: 'PAYMENT_GATEWAY', parameters: { gateway: 'fatzebra', gatewayMerchantId: '', }, } ``` ## Step 3: Render the button and request payment data Follow Google's own [Web integration checklist](https://developers.google.com/pay/api/web/guides/test-and-deploy/integration-checklist) to render the button with `google.payments.api.PaymentsClient` and call `loadPaymentData()`. This part is entirely Google's SDK; ArtsPay only comes into play once you have the resulting payment token. ## Step 4: Charge (or tokenize) the payment token Send the token from `paymentData.paymentMethodData.tokenizationData.token` to your backend, then call **Create a purchase using a wallet**: ```json { "amount": 1025, "currency": "AUD", "reference": "order_123", "wallet": { "type": "GOOGLE", "token": { "...": "the parsed JSON object from Google's tokenizationData.token" } } } ``` To save the card for later instead of charging it immediately, use **Tokenize a card with wallet credentials** with the same `wallet` object. ## Testing Google Pay's test cards require a **real Google account**. Request access via the [Google Pay test-mode stub data group](https://groups.google.com/g/googlepay-test-mode-stub-data). Set your Google Pay environment to match ArtsPay's: | ArtsPay environment | Google Pay environment | | --- | --- | | Sandbox | `ENVIRONMENT_TEST` | | Production | `ENVIRONMENT_PRODUCTION` | Like Apple Pay, sandbox responses are **cent-based**: a request for $1.05 returns response code `05` (declined), letting you drive any outcome deterministically. ArtsPay's API doesn't require a billing address to be sent with Google Pay transactions. ## FAQ #### Do I need to contact ArtsPay support to enable Google Pay? No. It's on by default for every merchant account. You only need your gatewayMerchantId. #### Where does gatewayMerchantId come from, and can it change? It's deterministically derived from your API token and username. If your API token is ever rotated, the derived ID changes too, so regenerate it from the new token rather than hardcoding the old value. #### Do I need to send a billing address? No, the ArtsPay API doesn't require one for Google Pay transactions (this may change in future). #### Can I use Google Pay for recurring or instalment payments? Yes. Use the **card_token** returned from the customer's first Google Pay transaction for subsequent charges, following the same [card-on-file rules](https://www.artspay.com/docs/guides/tokenisation) as any other stored card. As with Apple Pay, acquirer support for recurring transactions varies. #### Can I add this to the Hosted Payments Page instead of building a custom web integration? Not currently. Fat Zebra's recommendation is to render the Google Pay button on your parent page, as in this guide, rather than inside the HPP/iframe — their SDK support for wallets inside the hosted page itself hasn't been completed yet. --- Source: https://www.artspay.com/docs/guides # Payment Guides Integrate with ArtsPay to start accepting payments online and in person, embed into your own platform, and find the ArtsPay products that best fit your business. ### Payment options ### Tools ### Essentials ### Merchant guides Download the guides for all the information you need regarding your merchant account. ### Payment terminal guides Learn more about the payment terminals and how to use them effectively with guides from our payment partner, Fiserv. --- Source: https://www.artspay.com/docs/guides/hosted-payment-pages # Hosted Payment Pages *Embed ArtsPay's hosted payment form directly in your checkout as an iframe — card data never touches your server, and PCI scope drops to SAQ A.* The V3 Hosted Payment Page is a payment form hosted entirely by ArtsPay and Fat Zebra, embedded in your checkout as an ` ``` **react** ```react title="embed.jsx" import { useEffect, useState } from 'react' // Must match the environment used to build the checkout URL (sandbox shown // here; swap to https://paynow.pmnts.io for live). const PAYMENT_HOST = 'https://paynow.pmnts-sandbox.io' function HostedPaymentFrame() { const [checkoutUrl, setCheckoutUrl] = useState(null) const [verified, setVerified] = useState(null) useEffect(() => { // 1. Ask your backend for a signed checkout URL (see Step 1), then embed it. fetch('/api/checkout-url?amount=10.25') .then((res) => res.json()) .then((data) => setCheckoutUrl(data.url)) }, []) useEffect(() => { // 2. Adapted from Fat Zebra's documented IFRAME/postMessage listener. async function handleMessage(event) { if (event.origin !== PAYMENT_HOST) return let payload = event.data if (typeof payload === 'string') { // Older browsers deliver a query-string style payload instead of an object. const pairs = payload.split('&') payload = {} for (const pair of pairs) { const [key, value] = pair.split('=') payload[decodeURIComponent(key)] = decodeURIComponent(value || '') } } if (!payload || typeof payload !== 'object' || !('message' in payload)) return // payload.message can also be 'transaction.cancelled' if the customer backs out. if (payload.message !== 'transaction.complete') return // 3. The response is untrusted until your backend confirms the signature -- // the shared secret needed to check it never reaches this page. const res = await fetch('/api/verify', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload.data), }) setVerified((await res.json()).verified) } window.addEventListener('message', handleMessage) return () => window.removeEventListener('message', handleMessage) }, []) if (!checkoutUrl) return null return ``` If your **` ``` --- Source: https://www.artspay.com/docs/developer/wallets/google-pay/google-pay-merchant-id # Google Pay Merchant ID All new merchant accounts setup in the Fat Zebra platform are configured to support Google Pay by default. In order to setup Google Pay in your website or app you will require the **gatewayMerchantID** which is a unique value assigned to each merchant. As this is automatically setup we have configured our system to create the **gatewayMerchantID** deterministically, so that partners and merchants can determine this themselves when using automated onboarding. The following steps can be used to build the **gatewayMerchantID**: 1. Take the API token, and derive a SHA256 hash of the value as a hexadecimal digest - the result should be in lower case: ```ruby digest = OpenSSL::Digest::SHA256.hexdigest(token) # IF required: digest = digest.downcase ``` > Resulting Digest MUST be lowercase > > Different systems may emit a hexadecimal digest in uppercase. It is important to ensure that you convert this to a lowercase string to ensure you have the correct value, as it is case sensitive. 2. Take the merchant username, and the first 16 characters of the digest, and join these with a hyphen (-): ```ruby merchant_id = "#{username}-#{digest[0, 16]}" ``` 3. The final resulting ID will look something like the following: `username-ce91989e4d0f0fd1` A full example (in Ruby) is below: ```ruby username = "TESThooli" token = "738439923571d79914391d257afb0c3e" digest = OpenSSL::Digest::SHA256.hexdigest(token) merchant_id = "#{username}-#{digest[0, 16]}" ``` With these inputs, the resulting value will be `TESThooli-63b648806b4eba75` - you can use these inputs and this resulting value to test your code to ensure the values match. --- Source: https://www.artspay.com/docs/developer/webhooks/webhooks-overview # Overview A Webhook is an out of band communications mechanism which allows our systems to sent events to external systems, such as the notification of a payment, batch file completion, etc. Normally webhooks are used where notifications from an automated or asynchronous process are required, or if additional systems (apart from the one interacting with the gateway) require notification of events. --- Source: https://www.artspay.com/docs/developer/webhooks/handling-webhooks # Handling Webhooks ## 3rd Party System Responses When you receive webhooks the Gateway will consider the webhook successfully sent if it receives a HTTP 200 or HTTP 201 response. The system which delivers the webhooks will not follow redirects (e.g. HTTP 301 or HTTP 302), and will consider these responses as failed. ## Retries Failed webhooks will be retried on an exponential backoff, where each time a request fails, it will be pushed back onto the processing queue, and a delay will be added, growing each time until finally the retries are exhausted. Webhooks will be attempted for up to 2 days until they are eventually considered permanently failed and will not be re-attempted. ## Idempotency As webhooks are asynchronous and are transmitted across the internet there is always a chance that the successful posting of a webhook from the Gateway into the receiving system could fail, such as due to network timeouts, receiving end errors etc. Because of this it is recommended that the systems receiving the webhooks act on the events idempotently. This means that if you depend on webhooks to, for example, dispatch an order, it is important that you check the status of that order in your system's database before executing the workflow to dispatch the order, just in case multiple webhooks for the same subject are received. --- Source: https://www.artspay.com/docs/developer/webhooks/events # Events Each webhook that is sent is the result of an event within the payment gateway. These events are usually named with the following convention: `subject:event` For example, when a purchase succeeds your system (if configured) may receive the `purchase:success` event. Currently the following events are published out of the gateway: | Name | Description | | :----------------------------- | :---------------------------------------------------------------------------------------------- | | purchase:success | A purchase has successfully been processed | | purchase:failed | A purchase was not processed successfully | | capture:success | A capture has successfully been processed | | capture:failed | A capture was not processed successfully | | refund:failed | A refund was not processed successfully | | direct_entry:submitted | A direct entry was submitted to the bank for processing | | direct_entry:completed | A direct entry successfully completed processing | | direct_entry:rejected | A direct entry was rejected by the bank and did not successfully complete processing | | direct_entry:disbursed | A direct entry was disbursed | | payment_plan:activated | A payment plan has been activated | | payment_plan:suspended | A payment plan was suspended | | payment_plan:cancelled | A payment plan was cancelled | | payment_plan:completed | A payment plan was completed | | payment_plan_payment:completed | A payment plan payment was completed | | payment_plan_payment:declined | A payment plan payment was declined | | payment_plan_payment:error | A payment plan payment failed due to an error | | dispute:opened | A new dispute has been opened | | dispute:status_changed | The status of an existing dispute has changed | | card_account:update | There is an update to an existing card account - see [Card Account events](https://www.artspay.com/docs/developer/webhooks/events/card-account-events) | ## Filtering Events New webhook events may be added as the gateway evolves, so it is important that you ensure the systems receiving these events checks the event type before attempting to process the data received. If an event is received that is not supported it is recommended that you discard the request. --- Source: https://www.artspay.com/docs/developer/webhooks/events/example-webhooks # Example Webhooks ## Event Structure For each webhook that is sent to the receiving system, a JSON payload will be included with the following structure: | Name | Type | Description | | :-------- | :---------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `event` | string | The event name in the format of `type:event`, such as `purchase:success` | | `payload` | Array\ or Object | The payload of the webhook. Usually this will either be the record as a hash you would normally receive via the API, or an array of hashes, where a webhook is triggered at one time for multiple objects | For Webhooks triggered as a result of batch operations (for example, direct entry completion or rejection) the request sent will contain an array of objects under the `payload` field. Please ensure that your code checks for an object or array before processing the request. ## Purchases ```json purchase:success { "event": "purchase:success", "payload": { "authorization": "389768", "id": "071-P-245JAGI0", "card_number": "400555XXXXXX0001", "card_holder": "Joe Bloggs", "card_expiry": "2023-05-31", "card_token": "fke8tr3e", "card_type": "VISA", "card_category": "Credit", "card_subcategory": "Standard", "amount": 123, "decimal_amount": 1.23, "successful": true, "message": "Approved", "reference": "0k7uchjosk38", "currency": "AUD", "transaction_id": "071-P-245JAGI0", "settlement_date": "2018-09-07", "transaction_date": "2018-09-07T17:06:00+10:00", "response_code": "00", "captured": true, "captured_amount": 123, "rrn": "071P245JAGI0", "cvv_match": "M", "metadata": { }, "addendum_data": { } } } ``` ```json purchase:failed { "event": "purchase:failed", "payload": { "authorization": null, "id": "071-P-C68432C5", "card_number": "400000XXXXXXXXX5678", "card_holder": "Joe Bloggs", "card_expiry": "2023-05-31", "card_token": "fke8saky", "card_type": "VISA", "card_category": "Credit", "card_subcategory": "Credit", "amount": 123, "decimal_amount": 1.23, "successful": false, "message": "Declined", "reference": "0balpb3tfglq", "currency": "AUD", "transaction_id": "071-P-C68432C5", "settlement_date": "2018-09-07", "transaction_date": "2018-09-07T17:06:07+10:00", "response_code": "23", "captured": false, "captured_amount": 0, "rrn": null, "cvv_match": "M", "metadata": { }, "addendum_data": { } } } ``` ## Refunds ```json refund:success { "event": "refund:success", "payload": { "authorization": "1533336051", "id": "071-R-3RCHNEJT", "amount": 1000, "refunded": "Approved", "message": "Approved", "card_holder": "Jim Smith", "card_number": "512345XXXXXX2346", "card_expiry": "2023-05-31", "card_type": "MasterCard", "transaction_id": "071-R-3RCHNEJT", "reference": "rmt1533336049913", "currency": "AUD", "successful": true, "transaction_date": "2018-08-04T08:40:51+10:00", "response_code": "00", "settlement_date": "2018-08-05", "metadata": { }, "standalone": false, "rrn": "071R3RCHNEJT" } } ``` ```json refund:failed { "event": "refund:failed", "payload": { "authorization": "1533336051", "id": "071-R-3RCHNEJT", "amount": 1000, "refunded": "Declined", "message": "Declined", "card_holder": "Jim Smith", "card_number": "512345XXXXXX2346", "card_expiry": "2023-05-31", "card_type": "MasterCard", "transaction_id": "071-R-3RCHNEJT", "reference": "rmt1533336049913", "currency": "AUD", "successful": false, "transaction_date": "2018-08-04T08:40:51+10:00", "response_code": "05", "settlement_date": "2018-08-05", "metadata": { }, "standalone": false, "rrn": "071R3RCHNEJT" } } ``` ## Direct Entries ```json direct_entry:created { "event": "direct_entry:created", "payload": { "id": "1229-DD-C3VM4MXV", "amount": 10.0, "bsb": "085-124", "account_number": "091765432", "account_name": "Bob Smith", "description": "DD INV002", "reference": "DD1357924680004", "date": "2019-12-25", "process_date": null, "status": "New", "result": null, "type": "Debit", "metadata": {} } } ``` ```json direct_entry:submitted { "event": "direct_entry:submitted", "payload": [ { "id": "1229-DD-C3VM4MXV", "amount": 10.0, "bsb": "085-124", "account_number": "091765432", "account_name": "Bob Smith", "description": "DD INV002", "reference": "DD1357924680004", "date": "2019-12-25", "process_date": "2019-12-25", "status": "Pending", "result": "Submitted to Institution", "type": "Debit", "metadata": {} } ] } ``` ```json direct_entry:completed { "event": "direct_entry:completed", "payload": [ { "id": "1229-DD-C3VM4MXV", "amount": 10.0, "bsb": "085-124", "account_number": "091765432", "account_name": "Bob Smith", "description": "DD INV002", "reference": "DD1357924680004", "date": "2019-12-25", "process_date": "2019-12-25", "status": "Completed", "result": "Submitted to Institution", "type": "Debit", "metadata": {} } ] } ``` ```json direct_entry:rejected { "event": "direct_entry:rejected", "payload": [ { "id": "1229-DD-C3VM4MXV", "amount": 10.0, "bsb": "085-124", "account_number": "091765432", "account_name": "Bob Smith", "description": "DD INV002", "reference": "DD1357924680004", "date": "2019-12-25", "process_date": "2019-12-25", "status": "Rejected", "result": "Invalid Account", "type": "Debit", "metadata": {} } ] } ``` ## Payment Plans ```json payment_plan:active { { "event": "payment_plan:active", "payload": { "id": "1486-PP-ECY8AH07", "customer": "1486-C-9R9FY0FE", "amount": 25000, "currency": "AUD", "setup_fee": 0, "frequency": "Monthly", "anniversary": 1, "start_date": "2018-08-04", "end_date": null, "total_count": null, "total_amount": null, "payment_method": "Credit Card", "reference": "Plan456", "description": "", "status": "Active", "status_reason": "None", "created_at": "2018-08-03T10:28:09.901+10:00", "failed_payment_fee": 0, "retry_interval": 3, "status_change_date": null, "payments": [ { "id": "1486-PT-ASASNHVE", "payment_plan": "1486-PP-ECY8AH07", "reference": "Plan456-0001", "amount": 25000, "currency": "AUD", "scheduled_date": "2018-09-01", "payment_method": "Credit Card", "status": "Scheduled", "result": null, "records": [] } ] } } } ``` ```json payment_plan:completed { { "event": "payment_plan:completed", "payload": { "id": "1486-PP-ECY8AH07", "customer": "1486-C-9R9FY0FE", "amount": 25000, "currency": "AUD", "setup_fee": 0, "frequency": "Monthly", "anniversary": 1, "start_date": "2018-08-04", "end_date": "2018-09-04", "total_count": 1, "total_amount": 25000, "payment_method": "Credit Card", "reference": "Plan456", "description": "", "status": "Completed", "status_reason": "Contract Completed", "created_at": "2018-08-03T10:28:09.901+10:00", "failed_payment_fee": 0, "retry_interval": 3, "status_change_date": null, "payments": [ { "id": "1486-PT-ASASNHVE", "payment_plan": "1486-PP-ECY8AH07", "reference": "Plan456-0001", "amount": 25000, "currency": "AUD", "scheduled_date": "2018-09-01", "payment_method": "Credit Card", "status": "Completed", "result": "Approved", "records": [ { "authorization": "389768", "id": "071-P-245JAGI0", "card_number": "400555XXXXXX0001", "card_holder": "Joe Bloggs", "card_expiry": "2023-05-31", "card_token": "fke8tr3e", "card_type": "VISA", "card_category": "Credit", "card_subcategory": "Standard", "amount": 123, "decimal_amount": 1.23, "successful": true, "message": "Approved", "reference": "Plan456-0001", "currency": "AUD", "transaction_id": "071-P-245JAGI0", "settlement_date": "2018-09-07", "transaction_date": "2018-09-07T17:06:00+10:00", "response_code": "00", "captured": true, "captured_amount": 123, "rrn": "071P245JAGI0", "cvv_match": "M", "metadata": {}, "addendum_data": {} } ] } ] } } } ``` ```json payment_plan:suspended { { "event": "payment_plan:suspended", "payload": { "id": "379-PP-1OJWI7G1", "customer": "379-C-WHWWBSZ6", "amount": 800, "currency": "AUD", "setup_fee": 0, "frequency": "Monthly", "anniversary": 1, "start_date": "2018-08-01", "end_date": null, "total_count": 12, "total_amount": 9600, "payment_method": "Credit Card", "reference": "#46047-1533013368", "description": null, "status": "Suspended", "status_reason": "Invalid Account", "created_at": "2018-07-31T15:02:49.082+10:00", "failed_payment_fee": 0, "retry_interval": 3, "status_change_date": null, "payments": [ { "id": "379-PT-A6OKNFAL", "payment_plan": "379-PP-1OJWI7G1", "reference": "#46047-1533013368-0001", "amount": 800, "currency": "AUD", "scheduled_date": "2018-08-01", "payment_method": "Credit Card", "status": "Error", "result": "Expired Card", "records": [] } ] } } } ``` ```json payment_plan:cancelled { { "event": "payment_plan:cancelled", "payload": { "id": "071-PP-Q5KPBK9J", "customer": "071-C-ZWD0ZUNT", "amount": 100, "currency": null, "setup_fee": 0, "frequency": "Weekly", "anniversary": 5, "start_date": "2018-10-28", "end_date": null, "total_count": 5, "total_amount": 500, "payment_method": "Credit Card", "reference": "761cb4d0e5dfd280ef172afee7689857", "description": null, "status": "Cancelled", "status_reason": "Other", "created_at": "2018-07-30T17:42:17.750+10:00", "failed_payment_fee": 0, "retry_interval": 3, "status_change_date": null, "payments": [] } } } ``` ## Payment Plan Payments ```json payment_plan_payment:completed { { "event": "payment_plan_payment:completed", "payload": { "id": "787-PT-G1EBHXZR", "payment_plan": "787-PP-4745AS4X", "reference": "PPAPI-001-0400", "amount": 10, "currency": "AUD", "scheduled_date": "2049-04-23", "payment_method": "Credit Card", "status": "Completed", "result": "Ad-Hoc Payment", "records": [ { "authorization": "389768", "id": "071-P-245JAGI0", "card_number": "400555XXXXXX0001", "card_holder": "Joe Bloggs", "card_expiry": "2023-05-31", "card_token": "fke8tr3e", "card_type": "VISA", "card_category": "Credit", "card_subcategory": "Standard", "amount": 123, "decimal_amount": 1.23, "successful": true, "message": "Approved", "reference": "PPAPI-001-0400", "currency": "AUD", "transaction_id": "071-P-245JAGI0", "settlement_date": "2018-09-07", "transaction_date": "2018-09-07T17:06:00+10:00", "response_code": "00", "captured": true, "captured_amount": 123, "rrn": "071P245JAGI0", "cvv_match": "M", "metadata": {}, "addendum_data": {} } ] } } } ``` ```json payment_plan_payment:declined { { "event": "payment_plan_payment:declined", "payload": { "id": "787-PT-G1EBHXZR", "payment_plan": "787-PP-4745AS4X", "reference": "PPAPI-001-0400", "amount": 10, "currency": "AUD", "scheduled_date": "2049-04-23", "payment_method": "Credit Card", "status": "Declined", "result": "Insufficient Funds", "records": [] } } } ``` ```json payment_plan_payment:error { { "event": "payment_plan_payment:error", "payload": { "id": "787-PT-G1EBHXZR", "payment_plan": "787-PP-4745AS4X", "reference": "PPAPI-001-0400", "amount": 10, "currency": "AUD", "scheduled_date": "2049-04-23", "payment_method": "Credit Card", "status": "Error", "result": "Host or Issuer Unavailable", "records": [] } } } ``` ## Disputes ```json dispute:opened { "event": "dispute:opened", "payload": { "id": "001-P-3V8QW1BR", "reference": "MERCHREF-001", "dispute_reference": "ABC-123939847589437123412342320221205", "status": "open", "opened_on": "2022-12-06", "reason_code": "4387", "reason_description": "Card Not Present (fraud)", "amount_cents": 10000, "amount_currency": "AUD", "next_due_date": "2022-12-20" } } ``` ```json dispute:status_changed { "event": "dispute:status_changed", "payload": { "id": "001-P-3V8QW1BR", "reference": "MERCHREF-001", "dispute_reference": "ABC-123939847589437123412342320221205", "status": "lost", "last_status": "open" } } ``` ## Card Account ```json card_account:update { "event": "card_account:update", "payload": { "token": "abcd1234abcd", "card_number": "555555XXXXXX1243", "card_expiry": "2021-09-30", "card_type": "MasterCard", "card_category": "Credit", "card_updater_status": "active" } } ``` --- Source: https://www.artspay.com/docs/developer/webhooks/events/card-account-events # Card Account events For merchants taking advantage of network tokens, this webhook will fire when: * a change has occurred to a card-on-file. For example, when a card's expiry date has been updated, merchants will receive an update event with the new expiry date; * the scheme token status is updated. The network token status will be one of the following values: | Status | Description | | --- | --- | | pending | This card has been enrolled for network tokenisation but has not yet had its token activated.
Any transactions attempted with a card in this state will fall back to the original PAN. | | active | This card has an active network token. When transacting with a card in this state, a digital PAN and corresponding cryptographic signature will be fetched and used for the transaction.
If there are errors when fetching the payment instrument (for instance due to service interruptions), the transaction will fall back to the original PAN. | | suspended | This card has a network token, however the token has been suspended by either the network or issuing bank. A card that is suspended may return to the active state, or it may be deleted.
Any transactions attempted with a card in this state will fall back to the original PAN. | | deleted | This card has had its network token deleted, possibly due to account closure or some other reason. Merchants should attempt to contact the card holder for an updated payment method.
Any transactions attempted with a card in this state will fall back to the original PAN. | ```json card_account:update { "event": "card_account:update", "payload": { "token": "abcd1234abcd", "card_number": "555555XXXXXX1243", "card_expiry": "2021-09-30", "card_type": "MasterCard", "card_category": "Credit", "card_updater_status": "active" } } ``` --- Source: https://www.artspay.com/docs/developer/network-token-passthrough/third-party-network-tokens # Third Party Network Tokens *Fat Zebra allows the use of third party network tokens for Mastercard or Visa through the MDES and VTS program.* Merchants may wish to perform network tokenisation of their own cards to manage lifecycle events of these cards. Fat Zebra allows the presentment of network tokens with the cryptogram, passing these through to the switch. By supplying a network token as the card number, the token expiry as the card expiry and the network provided cryptogram in the cryptogram field, Fat Zebra will mark the card as being a provided network token. All other fields are applicable as for a regular purchase. ```Text json { "card_number": "55555555555555555", "card_holder": "Valued Cardholder", "card_expiry": "02/2027", "customer_ip": "127.0.0.1", "amount": 110, "currency": "AUD", "cryptogram": "Aaaaaa111112222223333344444==", "network_eci": "07" } ``` All subsequent transactions, either using the network token as the card number or the returned FatZebra token card will be treated as a network token transaction. The cryptogram should be fetched as per rules for the network token - through either VTS or MDES. For VTS transactions for merchants transacting with **MPGS**, the network ECI **must** be supplied. This value is obtained from Visa when the cryptogram is issued. On subsequent transactions, if the cryptogram is not present, it will be omitted. This is **not** recommended; some transactions are eligible to have the cryptogram omitted - for instance merchant initiated transactions that are recurring - however they may be declined by the issuer. --- Source: https://www.artspay.com/docs/developer/security/overview-1 # Overview Security is our highest priority - each year we go through an audit process which covers a comprehensive set of guidelines provided by the PCI Security Standards Council. In addition to our yearly audit we scan our infrastructure for any vulnerabilities (on our servers) and an external scanning vendor checks for any problems in our website, dashboard and gateway. All of this is part of what we do to ensure card holder data stays secure. --- Source: https://www.artspay.com/docs/developer/security/pci-certification # PCI Certification Fat Zebra is a PCI DSS Tier 1 certified service provider. Essentially this means that we have passed a yearly audit from a Qualified Security Assessor (QSA) – in our case, [PCI Consulting Australia](http://www.pciconsultingaustralia.com.au/). This audit covers 12 different requirements including physical security, the storage and transmission of credit card data, data security and more. For mode details on the PCI-DSS requirements please visit the [PCI-DSS website](https://www.pcisecuritystandards.org/). ### Encryption In order to protect your customers data, your passwords and your information we encrypt information stored within our database and information transmitted between website users and Fat Zebra's website. Passwords are stored as a non-reversible hash (this means that if our database is compromised your passwords will not be leaked, and are required to be changed every 90 days. We recommend that you use a passphrase, instead of a password - this is commonly 4 or 5 words which you can remember easily but is still secure. Credit Card data is encrypted with asymmetric encryption, with a keypair uniquely assigned to your merchant account, along with a 2048-bit passphrase required to decypt the card data. Card data decryption is a bit more complicated - in order to unlock the private key associated with your merchant account an approved operator must provide their own secure passphrase. This allows for quick revocation of keys and rotation of encryption keys regularly. At the end of the day this may seem complicated, but in testing and in practice we have found this is secure and fast. With security being one of our biggest concerns we're happy to have things a little bit more complicated if it means peace of mind. ### Physical Security Fat Zebra hosts its equipment, including its Cardholder Data Environment (CDE) within a secure data centre located in Canberra. Access to the computer room facilities require the following: * Identification is presented and mobile phones/cameras are surrendered * Visitors sign in and passes are issues * If after hours, the computer room master key is obtained from a Class B security safe (each visitor has individually assigned access codes) * The Class 3 alarm is disarmed with the visitors unique access code and the swipe pass is used to access the computer room doors. * The visitors sign into the computer room * The key to the secured rack is obtained from the key safe, which is accessed with the swipe pass * Signing out (and if necessary, re-arming and locking of the computer room) is required before surrendering passes and retrieving identification and mobile phones * In addition to this, access to our hosting racks is restricted to authorized Fat Zebra staff, however data centre operations staff are granted access with permission from Fat Zebra. ### Data Security and Redundancy To ensure that your data is always available we have redundant systems in place including a highly available database cluster with off site backups, redundant power, backup power supplies from diesel generators (provided within the data center), redundant cooling and redundant network links. ### Intrusion Detection Fat Zebra have implemented an industry standard Intrusion Detection System which monitors all traffic on our network for any potentially malicious traffic. When this system detects malicious traffic our security staff are notified, who then investigate the event to determine whether or not further action is required. ### Disclosure We believe that as a payment gateway, trust between us and our merchants is the most important aspect of doing business. In the event of any security vulnerabilities, intrusion attempts, data theft/loss or successful intrusions we commit to inform our merchants, merchant banks and the PCI-DSS council as soon as we are aware of the issues. If you have any questions please feel free to contact us. ### Accountability Fat Zebra staff should never need to see your merchant account, unmasked credit card numbers or your transaction data, except for the following situations: * Troubleshooting and support * Security Investigations * Requests from regulation or law enforcement bodies * Exceptional situations deemed necessary by the directors of Fat Zebra If credit card numbers need to be unmasked by authorized Fat Zebra staff appropriate procedures must be followed, and all decryption operations are recorded with full justification. --- Source: https://www.artspay.com/docs/developer/security/what-is-pci-compliance # What is PCI Compliance The Payment Card Industry Data Security Standard (PCI DSS) is a set of requirements designed to ensure that ALL companies that process, store or transmit credit card information maintain a secure environment. Essentially any merchant that has a Merchant ID (MID). Motivation to become compliant? The incentives include a 'Safe Harbour' from certain penalties and fines if a merchant is compliant at the time of breach. ### Who needs to be compliant? PCI Compliance is required for any company which sees, processes, holds or handles debit or credit card details in an electronic form, which could apply to your website, your retail shop and/or your office. In practice, this means any company which has a merchant bank account. This applies if you take payment by card in your shop, or over the phone, or using a virtual terminal, or on your website using Fat Zebra. If you take payment on your website using Google Checkout, then the answer is no, as you don't have a real merchant bank account. ### Where can I find out about the PCI Data Security Standards The standards can be found on the [PCI DSS website.](https://www.pcisecuritystandards.org/security_standards/index.php) ### Do organizations using third-party processors have to be PCI compliant? Yes. Merely using a third-party company does not exclude a company from PCI compliance. It may cut down on their risk exposure and consequently reduce the effort to validate compliance. However, it does not mean they can ignore PCI. ### How do I become compliant? PCI Compliance has two parts: a questionnaire about how you protect the card data you handle, and sometimes a software scan on your website, office and/or shop to make sure it is secure. The questionnaire and scan basically ensure you meet the list of PCI requirements, which include things like having a secure network, regular testing and a security policy. ### What will happen if I don't bother? If you have an Internet Merchant Facility, your bank may eventually start fining you until you are compliant, or put a freeze on your account until you become compliant. Should your website or application be hacked, and card details are stolen, you may be liable for crippling fines and asked to conduct a full PCI Audit by a QSA before your bank allows you to start taking payments again. --- Source: https://www.artspay.com/docs/developer/security/pgp-key # PGP Key Use our PGP key to encrypt and/or sign your sensitive content - we have provided details of our PGP key below. Once you have encrypted your content with our PGP key please email is through to [security@fatzebra.com](mailto:security@fatzebra.com), or if the content is too large reach our to our Support Team for details on how to send your file. If you have any questions, or run into any problems, please get in touch. ### PGP Key Details View this key on the [OpenPGP Key Server](https://keys.openpgp.org/vks/v1/by-fingerprint/9A84023B95E2E93FE220134770BD29802EA4E3E2) * Key ID: 2EA4E3E2 * Key Type: RSA * Key Size: 4096 * Fingerprint: 9A84 023B 95E2 E93F E220  1347 70BD 2980 2EA4 E3E2 * User ID: [security@fatzebra.com.au](mailto:security@fatzebra.com.au) ```text -----BEGIN PGP PUBLIC KEY BLOCK----- mQINBFUNbk8BEADBcnVIjNPlKSZqknaqQqZwWdmTgS+2QvhaKclfTzXpbo2weio5 vVvNnYeMzP+qZayKtMR+1zfDwNSvmmzo2u6EXXS+xzslilh8oXhnWGFl2gtebcNH a0+huY1NLNV2N2IVYENBqToyyVrbewU8PIYdZ7JqxLRcY/egKTUx7vL9DXhRA9ce kuz4EKySv2goEiOe9Y6YiIXbA5nOuBbc9hJ+xWsdrG1LfgxwXjyFnVk4i5ewlO5v awCggtZP/7R3DQVH8dxxtjZ4GUZhD1YpjrxESoVe3Z87SrBLBvldacHYcOF+MqI3 H6wIDmBvftPz5pLAaObHa+uWlR6Vp0slvwIBySTvfUGNDpbhZ3pj7S4Gzt5SXy9y kHF2+4nN0IXk8850ONwtL2SbLJnosrmJpN4SIJOaxcwKkoE8EKVAawF2F/fjbfuk CekjaEPYEv9la01bVdOAoddq5rVc+ECnI0YyMBWSrjkb+QLHvMZZR3hXAk+T5CQ1 +wvnxaPFWtuj+/WbsHiuq9PEDOIhH8wLGR6jFSa223xF0Ce0uEEFjzbQzyIUjFqA kfAmEI76iC7bvsqy0ovr/8DFT+t5v7mkM/+IFsNtIOqpzsLHhKcZ+iE+sW9JaKsV OP2RrR4WqTmd0Io9VMW5yvTtkmD+pXJeVzC/82X6rys+JcxlvT6H0X60oQARAQAB tCRGYXQgWmVicmEgPHNlY3VyaXR5QGZhdHplYnJhLmNvbS5hdT6JAlQEEwEKAD4C GwMFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AWIQSahAI7leLpP+IgE0dwvSmALqTj 4gUCZGGn7gUJFqT0lQAKCRBwvSmALqTj4rySD/0T1Utoq8RXniTXrB5eII0euRDx bzpKgGfvsBJ9+O/xFu/ovWeO8nP9nt/fm59F1xTbmGycY+2EBIPOlV9VJCWff8Ee 8yaFf00i1WdIaaBGLlwo2TStQHNNS8xgrn0BsgbpbDTtV50hC7SAqafaEynvH3J1 UyqvL0fF61B8Hr7NfEffSGXkMAWquWoBBFR4wGfrUQdE6ehGb4NbWF6ePZWpiJjN BdWf9T2jL/NlmordsvMTS9zpP7UQ3mu86jxBuYjtfIc8rrgP9b63fnx+SVFWIqtb oRsVfEuJYVy+EkqUHt+sVBTQ3ls0JbjEbOWwylIr9GzWuMHM1CqvvRhCT4Mt9+9B QUNmQ+4QBfVaxTc2mrSpQGsS/zTuPfzuFIASYKjk0IG7XcQm5v0G/3RvbDksSTVI 6LHGzuju4FbNtB5JGH7cTd2t1uM4io8DlLcKQ4hS4J33mgx1oAiEGQ6PYgpp1oFn pmF2efOYrurAzvObSFSHQempFPulCmEf1xUu3PToVtniOK1na/qWpBIHd03L69vP 42gfMjpKR0golm8fma5RuXJaYuGGu1ijgLXnz9Atnb4J+zVdI+pe15+x7aiiHfl6 H8RfKKkPiJvvQuKM8smUmibNBBQUnlZ6hysXR4Py2qHSVQ0fyQxKfhQEmj5nbKzk Ld68Z6P7e2TAF+S7fLkCDQRVDW5PARAAvzKlT4EA1OZVtP98ohzvfzVWGVQz4CiX BI42El8GXMUh0ZhEC1zvOgQEsz44hEkQelmyk6z1jD0+bQZZG0/4nciD15HPUWds drytWL0d9crImoHq6fwUgGbMTRt3fYTSiJHY1mJI9xUWbr3GNZrKwmbGj6wz7qCJ Vn+rLaKhvZMNFWkBzVpqc3VV1f8KtZFYo5MIEq+zLEn+qg4xQq/mFC9McpPcUPm/ IwxWmQOsjTWRykmqHh583g7Ken0cIodrTuP36TqJcjA4tTbuRdhiRxzQ3iLNTBsA sNnjRD7mFvk+U4jCUDwLAhv4lZy2a36692fmLWCY9q7r4nIl5OVbXhqYvL5ZkzXh jCrim5xbokELUREx9LWgxkJ8Zvr+52MHfUL0KX+PJoAshxmH/Bq7gKG/AIHsE9CL labixaFJmJbwlmFKB7qLOx8Vh3vQgYaHZUkZIbuMFxNC2YsYkyzTmkrMwCCh73hF BRWqG8Bi4A7sP1qAPbPZnCrXDLLvMryBuzLb22ai51jQR8TCzqc7lNSb6K89ePRT 1XjM5EAm/klPf8W2iiI31KvD60VnPHz9SzaIJqk6ea80n/Dnh4NEi/nJZkYmVPcN JBaKtxm8F+Ww1I140vFicVF0ZPUqHXGTBSzYUXmEe1cnvCJoUJctVb9YeOF4LT98 UhDaK7IF0nUAEQEAAYkCPAQYAQoAJgIbDBYhBJqEAjuV4uk/4iATR3C9KYAupOPi BQJkYaetBQkW45NYAAoJEHC9KYAupOPitFMQAK8vPs7ekRgBLbDbvRpbVvuKGFHG qcu7gF6ZJvtHOcNwAOh+kYNlrsJeQtL6rtm4q3B/OJBSZYIBRxCR4xjIfFG/EeUu PqMfs69O64hkVnJ/Q98NjR2HAXq9AV+BCMKUn3s+0c0np81ir/vmdRP+HGXWsokn 34Od6X4grWvfB2gUXKQddFKb/6oUgphF1R0afHxcLNWKgNxOyic7o2SntIHtJQdi r8/HITMnnpzB8tTGwgjTYeAHDKSAx2RlwQYph2nj/dGIFD8x3PxXgfebRdUHzRQh vCcR/bPRcbZ/ew/TT6/30BwyJuBfSKODClHA/46/kv6l2JUt+7eGllA8oZCsAWfd TgST2xL4Lz39+NZOuSgYYYTYv5c941rSqZrxaoxeJ3V6f68Zl6LgQFlj7y1+kHhh bQCyLo9fdXYGzV0hMgjLSIytVDcMZlDonYewRUtJBEQY46GaSi5FX/2IPWaifI4g QvbvX2OX+/TJe3JodfPQI83JPiFS37U2tkksL3t3pFfSd/itPPGe/+ga/MUfhfjI uW4X8ASHxW+tayVZIAQd4h/cgnseMQ3H1wuaOBwd6+itCaGDdFnR1OLqR+2Fo1cD wJQHOi51YSr6G1S4SHkhjv+836meZWagDOHuNByqH2MhADB2oHk0HqfHNCDjPJr0 S701U7X73o88at8B =htwZ -----END PGP PUBLIC KEY BLOCK----- ``` --- Source: https://www.artspay.com/docs/developer/react-sdk/upgrade-react-sdk-for-3ds # Upgrade React SDK to v2.1.7+ for 3DS Changes > Action required for React SDK merchants > > Fat Zebra is updating its 3D Secure integration. If you use the React SDK (`@fat-zebra/sdk`), you must be on **version 2.1.7 or later**. Older versions may fail to trigger 3DS on your transactions. ### Who this applies to Merchants using the React SDK ([@fat-zebra/sdk](https://www.npmjs.com/package/@fat-zebra/sdk)) for 3DS or card tokenisation. If you are using the fatzebra.js script integration (`renderPaymentsPage` / `verifyCard`), no changes are required. ### What you need to do 1. Upgrade `@fat-zebra/sdk` to `2.1.7` or later 2. Re-deploy your application 3. Run a test payment in sandbox with a [3DS test card](https://www.artspay.com/docs/developer/3ds2-integration/testing) to confirm 3DS still triggers ### How to upgrade With npm: ```bash npm install @fat-zebra/sdk@^2.1.7 ``` With yarn: ```bash yarn add @fat-zebra/sdk@^2.1.7 ``` With pnpm: ```bash pnpm add @fat-zebra/sdk@^2.1.7 ``` Or set the version in your `package.json` and re-install with your package manager: ```json "dependencies": { "@fat-zebra/sdk": "^2.1.7" } ``` To check which version you currently have installed: ```bash npm ls @fat-zebra/sdk ``` ### Do I need to change my code? No. Upgrading from 1.x keeps the same imports (`@fat-zebra/sdk/dist` and `@fat-zebra/sdk/dist/react`), components (`VerifyCard`, `VerifyExistingCard`) and config options. The 3DS changes all happen inside the SDK. See the [React SDK Overview](https://www.artspay.com/docs/developer/react-sdk/react-sdk-overview) for current example code. ### Need help? If you need assistance with this upgrade, contact ArtsPay support. --- Source: https://www.artspay.com/docs/developer/react-sdk/react-sdk-overview # React SDK - Overview > Version 2.1.7 or later required > > Fat Zebra is updating its 3D Secure integration. Merchants using this SDK must be on **@fat-zebra/sdk 2.1.7 or later** for 3DS to keep working. See the [Upgrade Notice](https://www.artspay.com/docs/developer/react-sdk/upgrade-react-sdk-for-3ds) for details. ### Introduction Fat Zebra provides a JavaScript package called **@fat-zebra/sdk** that enables merchants to access features including: * [3DS2](https://www.artspay.com/docs/developer/3ds2-integration/3ds2-overview) * Card tokenization #### Authentication Each feature accessible via the SDK requires OAuth authentication whereby merchants obtain an OAuth access token for each payment session required. Refer to [Obtain an OAuth token](https://www.artspay.com/docs/developer/javascript-sdk/obtain-oauth-token) for more details. #### Usage First, install the package (version 2.1.7 or later): ```bash npm install @fat-zebra/sdk@^2.1.7 ``` Or add it to your `package.json` as a dependency: ```json "dependencies": { "@fat-zebra/sdk": "^2.1.7" } ``` #### Card verification The processes for new card and existing card verification are separate. Each process is detailed below. #### Verify a new card To use this package, you can import the relevant parts we need from the SDK. To then verify a card, we can use the `VerifyCard` component along with the verification hash. ##### Calculation of the verification hash The new card verification hash is calculated using reference, amount and currency. This part needs to be done server side to protect the FATZEBRA_SHARED_SECRET variable ```javascript // server side import { createHmac } from "crypto"; const payment = { reference: "payment-001", amount: 100, currency: "AUD", }; const newCardVerificationHash = createHmac("md5", process.env.FATZEBRA_SHARED_SECRET) .update(`${payment.reference}:${payment.amount}:${payment.currency}`) .digest("hex"); ``` From this action of this component, we can pull out the token from the card tokenization event, and (if required) wait until the `PublicEvent.SCA_SUCCESS` event has happened before continuing with a customer's purchase. The `reference`, `amount` and `currency` passed to the component must match the values used to calculate the hash. ##### Example code ```tsx // app.tsx import VerifyNewCard from "./VerifyNewCard"; export default function Main() { // These are typically sourced from your backend const REFERENCE = "payment-001"; const ACCESS_TOKEN = ""; // see: Obtain an OAuth token const NEW_CARD_VERIFICATION_HASH = ""; return ( ); } ``` ```tsx // VerifyNewCard.tsx import { useState } from "react"; import { Environment, Payment, PaymentIntent, PublicEvent, PaymentConfig, Handlers, } from "@fat-zebra/sdk/dist"; import { VerifyCard } from "@fat-zebra/sdk/dist/react"; type Props = { verification: string; accessToken: string; reference: string; }; export default function VerifyNewCard({ verification, accessToken, reference }: Props) { const [events, setEvents] = useState([]); const addEvent = (event: CustomEvent) => { setEvents((prev) => [...prev, event]); }; const payment: Payment = { reference, amount: 100, currency: "AUD", }; const paymentIntent: PaymentIntent = { payment, verification, }; const config: PaymentConfig = { username: "your-username-here", environment: Environment.sandbox, // or Environment.production accessToken, paymentIntent, options: { sca_enabled: true, }, }; const tokenizationSuccessful = (event: CustomEvent) => { // event.detail contains the card token: send it to your backend addEvent(event); }; const scaSuccess = (event: CustomEvent) => { // event.detail contains the 3DS result fields to include in your purchase call addEvent(event); }; const scaError = (event: CustomEvent) => { addEvent(event); }; // Subscribe to the particular events you wish to handle const handlers: Handlers = { [PublicEvent.FORM_VALIDATION_ERROR]: addEvent, [PublicEvent.FORM_VALIDATION_SUCCESS]: addEvent, [PublicEvent.TOKENIZATION_SUCCESS]: tokenizationSuccessful, [PublicEvent.SCA_SUCCESS]: scaSuccess, [PublicEvent.SCA_ERROR]: scaError, }; return (
); } ``` #### Verify Existing Card To then verify an existing card, we can use the `VerifyExistingCard` component. From the action of this component, the successful or failed tokenised credit card event will fire. Indicating whether or not a card has been previously tokenised. This component will return either: “Could not find card on file” or “fz.tokenization.success” status and run sca on each verification. ##### Calculation of the verification hash The verification hash for verify an existing card is calculated by hashing the card token. This is to be done server-side as an example: ```javascript // server side import { createHmac } from "crypto"; const CARD_TOKEN = "fdsde3yx"; // Never expose FATZEBRA_SHARED_SECRET to the client const existingCardVerificationHash = createHmac("md5", process.env.FATZEBRA_SHARED_SECRET) .update(CARD_TOKEN) .digest("hex"); ``` ##### Example code ```tsx // app.tsx import VerifyOurCard from "./VerifyOurCard"; export default function Main() { // These are typically sourced from your backend const REFERENCE = "payment-001"; const ACCESS_TOKEN = ""; const CARD_TOKEN = "fdsde3yx"; const EXISTING_CARD_VERIFICATION_HASH = ""; return ( ); } ``` ```tsx // VerifyOurCard.tsx import { useState } from "react"; import { Environment, PaymentConfig, PublicEvent, Handlers, } from "@fat-zebra/sdk/dist"; import { VerifyExistingCard } from "@fat-zebra/sdk/dist/react"; type Props = { verification: string; accessToken: string; reference: string; cardToken: string; }; export default function VerifyOurCard({ verification, accessToken, reference, cardToken }: Props) { const [events, setEvents] = useState([]); const config: PaymentConfig = { username: "your-username-here", environment: Environment.sandbox, // or Environment.production accessToken, paymentIntent: { payment: { reference, amount: 100, currency: "AUD", }, verification, }, options: { sca_enabled: true, // if you are enabled for 3D Secure }, }; const handleEvent = (event: CustomEvent) => { setEvents((prev) => [...prev, event.type]); }; // Subscribe to the particular events you wish to handle const handlers: Handlers = { [PublicEvent.TOKENIZATION_SUCCESS]: handleEvent, [PublicEvent.TOKENIZATION_ERROR]: handleEvent, [PublicEvent.SCA_SUCCESS]: handleEvent, [PublicEvent.SCA_ERROR]: handleEvent, }; return ( <>
    {events.map((event, index) => (
  1. {event}
  2. ))}
); } ``` #### Creating a payment There's currently no form support for taking a payment with this SDK. Instead, we would recommend passing the token from a `TOKENIZATION_SUCCESS` event back to your backend, and then processing a payment from there using the FatZebra API. --- Source: https://www.artspay.com/docs/developer/react-sdk/react-sdk-overview/types # Types ### PaymentConfig | Property | Type | Description | | ------------- | -------- | ----------- | | `username` | `string` | | | `environment` | `string` | | | `accessToken` | `string` | Refer to |
### PaymentIntent | Property | Type | Description | | -------------- | --------- | ------------------------------------------------- | | `payment` | `Payment` | | | `verification` | `string` | Refer to specific component for hash calculation. | ### Payment | Property | Type | Description | | | :----------------- | :-------- | :---------- | :------------------------------------------------------------ | | `amount` | `number` | | | | `currency` | `string` | | | | `reference` | `string` | | | | `hide_card_holder` | `boolean` | | \<- not sure if this one is actually used so maybe not needed | ### Options
| Property | Type | Description | | --------------------- | --------------------- | --------------------------------------------------------- | | `buttonText` | `string` | Custom label for the payment button. | | `cards` | `string` | Supported card types for the transaction. | | `challengeWindowSize` | `ChallengeWindowSize` | Size of the challenge window for 3DS2 flows. | | `css` | `string` | Custom CSS string to style the payment form. | | `cssSignature` | `string` | Signature used to verify the integrity of the custom CSS. | | `hideButton` | `boolean` | Hides the primary payment button. | | `hideLogos` | `boolean` | Hides the card network logos from the form. | | `logoUrl` | `string` | URL of a custom logo to display. | | `enableSca` | `boolean` | Enables Strong Customer Authentication (SCA). | | `showEmail` | `boolean` | Displays an email input field. | | `showExtras` | `boolean` | Displays additional optional fields. | | `tokenizeOnly` | `boolean` | Tokenizes the card without processing a payment. | | `hideCardHolder` | `boolean` | Hides the cardholder name input field. | | `returnPath` | `string` | URL to return to after payment is completed. | | `cardTypes` | `Array` | List of supported card types for the transaction. | | `surchargeEnabled` | `boolean` or `string` | Indicates whether surcharging is enabled. | | `scaEnabled` | `boolean` | Enables Strong Customer Authentication (SCA). | #### Challenge Window Type | Enum Value | Code | Dimensions | | ---------------- | ---- | ---------- | | `SIZE_250X400` | `01` | 250 × 400 | | `SIZE_390X400` | `02` | 390 × 400 | | `SIZE_500X600` | `03` | 500 × 600 | | `SIZE_600X400` | `04` | 600 × 400 | | `SIZE_FULL_PAGE` | `05` | Full page | --- Source: https://www.artspay.com/docs/developer/javascript-sdk/javascript-sdk-overview # Overview ### Introduction Fat Zebra provides a Javascript SDK named **fatzebra.js** that enables merchants to access features including: * [3DS2](https://www.artspay.com/docs/developer/3ds2-integration/3ds2-overview) * iFraming Hosted Payments Page via Javascript * PayPal checkout flow #### Authentication Each feature accessible via fatzebra.js requires OAuth authentication whereby merchants obtain an OAuth access token for each payment session required. Refer to [Obtain an OAuth token](https://www.artspay.com/docs/developer/javascript-sdk/obtain-oauth-token) for more details. #### SDK source | Environment | URL | | :---------- | :------------------------------------------------------------------------------------------------- | | Staging | [https://cdn.pmnts-staging.io/sdk/v1/fatzebra.js](https://cdn.pmnts-staging.io/sdk/v1/fatzebra.js) | | Sandbox | [https://cdn.pmnts-sandbox.io/sdk/v1/fatzebra.js](https://cdn.pmnts-sandbox.io/sdk/v1/fatzebra.js) | | Production | [https://cdn.pmnts.io/sdk/v1/fatzebra.js](https://cdn.pmnts.io/sdk/v1/fatzebra.js) | #### Mastercard Click-To-Pay Action Sheet Installation: CDN: | Environment | URL | | :---------- | :--------------------------------------------------------------------------------------------------- | | Staging | [https://cdn.pmnts-staging.io/sdk/v1/fatzebra.css](https://cdn.pmnts-staging.io/sdk/v1/fatzebra.css) | | Sandbox | [https://cdn.pmnts-sandbox.io/sdk/v1/fatzebra.css](https://cdn.pmnts-sandbox.io/sdk/v1/fatzebra.css) | | Production | [https://cdn.pmnts.io/sdk/v1/fatzebra.css](https://cdn.pmnts.io/sdk/v1/fatzebra.css) | NPM ``` npm i @fat-zebra/sdk ``` then import the stylesheet ``` @import '@fat-zebra/sdk/dist/fatzebra.css'; ``` These are the classes and id's required to display MasterCard's recommended action sheet for click-to-pay. ```
``` This will render: on Desktop an animated side bar: ![](https://files.readme.io/509475b-Screenshot_2023-11-10_at_11.33.31_am.png) on Mobile an animated action sheet: ![](https://files.readme.io/e71d195-Screenshot_2023-11-10_at_11.33.16_am.png) For further reference: [https://github.com/Mastercard/action-sheet-reference-app](https://github.com/Mastercard/action-sheet-reference-app) --- Source: https://www.artspay.com/docs/developer/javascript-sdk/obtain-oauth-token # Obtain an OAuth token An OAuth access token is required to access most fatzebra.js features. To obtain an OAuth access token: ### OAuth Client 1. Log into the [Fat Zebra Merchant Dashboard](https://dashboard.fatzebra.com.au). 2. Navigate to **Settings** > **OAuth Clients** > **Create new OAuth Client**. 3. Download your OAuth Client credentials, access key and access secret. Make sure you save them securely. For security purposes, downloading these credentials is a one-off process and you will not be able to retrieve them again. ### OAuth Access Token An OAuth access token is a signed JWT that grants fatzebra.js access to the Fat Zebra platform. It contains basic info about the merchant and a list of access grants that determine what the features the OAuth token has access to. The token needs to be stored in browser’s local storage with key space `fz-access-token` prior to initialising fatzebra.js. If the access token is either missing or invalid, fatzebra.js will not be permitted to proceed the intended action (e.g. initiate a 3DS2 check). For security purposes, the OAuth access token is only valid for 15 mins. It is recommended that a unique access token is created for each payment session you require. #### Obtaining an access token To obtain an OAuth access token, make a **POST** call to the OAuth endpoints listed below using your `access_key` and `access_secret` that you downloaded from the Fat Zebra Merchant Dashboard. | Environment | Endpoint | | :---------- | :------------------------------------------------------------------------------------------ | | Staging | `POST` [https://api.pmnts-staging.io/oauth/token](https://api.pmnts-staging.io/oauth/token) | | Sandbox | `POST` [https://api.pmnts-sandbox.io/oauth/token](https://api.pmnts-sandbox.io/oauth/token) | | Production | `POST` [https://api.pmnts.io/oauth/token](https://api.pmnts.io/oauth/token) | ##### Request ```json Request Body { "access_key": 'xxx', "access_secret": 'xxx' } ``` ##### Response ```json Successful Response { "message": "created", "data": { "token": "xxx" } { ``` --- Source: https://www.artspay.com/docs/developer/javascript-sdk/javascript-sdk-features # Javascript SDK Features ## 3DS2 * [Overview](https://www.artspay.com/docs/developer/3ds2-integration/3ds2-overview) * [3DS2 for Hosted Payments Page](https://www.artspay.com/docs/developer/3ds2-integration/using-hosted-payments-page) * [3DS2 for Custom Payments Form](https://www.artspay.com/docs/developer/3ds2-integration/using-custom-payments-form) --- Source: https://www.artspay.com/docs/developer/javascript-sdk/event-listeners # Event Listeners *Subscribe to events* You can subscribe to [Events](https://www.artspay.com/docs/developer/javascript-sdk/events-1) in different ways depending on how your application works: * If the FatZebra class is instantiated as a singleton service, meaning it is created once and shared across the entire application, it is recommended to use the on method. This ensures the event listener remains active as long as the target object, such as window or a DOM element, exists. * If your application instantiates the FatZebra class as a singleton service (i.e. it is created once and shared across the entire application), it is recommended to use the on method. This ensures the event listener remains active as long as the target object, such as window or a DOM element, exists. * Note that if a component using the listener is unmounted, the listener will not automatically detach unless you explicitly call off to remove it, which helps prevent memory leaks caused by lingering listeners. * If your application instantiates the FatZebra class each time the page renders or the method to create the class is called, it is better to use the onOnce method. This approach ensures the listener automatically unsubscribes itself after receiving the event, preventing unnecessary listeners from remaining active and avoiding potential duplicate events from arising.
| Method | Behaviour | | :----- | :----------------------------------------------------------------------------------------------------------- | | on | subscribes to the events for the lifecycle of the window object | | off | unsubscribe from the event - usually called when the component is unmounted | | onOnce | The onOnce method listens for an event, and as soon as that event happens, it automatically stops listening. | ### Subscribing to an event for lifecycle of window ```javascript Example const fz = new FatZebra({ username: "MerchantXYZ" }); // Handle errors related to general errors. For example, client-side validations. fz.on('fz.validation.error', function(event) { // ... }); // Handle errors related to payment processing. HPP only. fz.on('fz.payment.error', function(event) { // prompt error to customer console.log('payment errors: ' + JSON.stringify(event.detail.errors)); }); // Handle successful payment processing. HPP only. fz.on('fz.payment.success', function(event) { console.log('payment data: ' + JSON.stringify(event.detail.data)); }); ``` ### Unsubscribing from an event ```javascript Example const fz = new FatZebra({ username: "MerchantXYZ" }); // Remove event listener HPP only. fz.off('fz.payment.success'); ``` ### Subscribing to onOnce event ```javascript Example const fz = new FatZebra({ username: "MerchantXYZ" }); // Handle successful payment processing. HPP only. Discard the listener once event has been received fz.onOnce('fz.payment.success', function(event) { console.log('payment data: ' + JSON.stringify(event.detail.data)); }); ``` --- Source: https://www.artspay.com/docs/developer/javascript-sdk/methods # Methods ### fatzebra.js Methods * [constructor](https://www.artspay.com/docs/developer/javascript-sdk/methods/constructor) * [renderPaymentsPage](https://www.artspay.com/docs/developer/javascript-sdk/methods/renderpaymentspage) * [checkout](https://www.artspay.com/docs/developer/javascript-sdk/methods/purchase) * [verifyCard](https://www.artspay.com/docs/developer/javascript-sdk/methods/verifycard) --- Source: https://www.artspay.com/docs/developer/javascript-sdk/methods/constructor # constructor ### Constructor(params) #### params | Attribute | Type | Mandatory | Description | | --- | --- | --- | --- | | `username` | string | Y | Merchant username | | `test` | string | N | Required to be `true` in the Sandbox environment.
Defaults to `false`. | #### usage ```json const fz = new FatZebra({ username: "MerchantXYZ", test: true }); ``` --- Source: https://www.artspay.com/docs/developer/javascript-sdk/methods/purchase # purchase If merchant decides to provide their own custom checkout button (hideButton: **true**) to work with the Hosted Payment Page loaded by **fatzebra.js**, they will need to call the *checkout* method in order to trigger the payment flow. This method sends a trigger to the Hosted Payment Page within iframe's content view. ```javascript Example const fz = new FatZebra({ username: 'xxx', test: true }); fz.renderPaymentsPage({...}) // omitted const handler = function() { fz.checkout(); } document.getElementById('checkoutButton').addEventListener('click', handler); ``` --- Source: https://www.artspay.com/docs/developer/javascript-sdk/methods/verifycard # verifyCard ## verifyCard(VerifyCardParams) Starts the 3DS2/SCA process. This method is used for API and Direct Post integration modes only. If you are integrating 3DS2 using the [Hosted Payments Page](https://www.artspay.com/docs/developer/3ds2-integration/using-hosted-payments-page) you do not need to call `verifyCard` as the Hosted Payments Page will handle this for you. The `verifyCard` method can be called with a new card (using the raw card number) or with an existing card (using a Fat Zebra card token). If using an existing card (Fat Zebra card token), specify `card_on_file` as the `paymentMethod`. Refer to the [PaymentMethod](https://www.artspay.com/docs/developer/javascript-sdk/objects/paymentmethod) object for more details. See [VerifyCardParams](https://www.artspay.com/docs/developer/javascript-sdk/objects/verifycardparams) for more details on the available parameters. ### Usage ```json const fz = new FatZebra({ username: "MerchantXYZ" }); fz.verifyCard({ customer: { firstName: 'Captain', lastName: 'America', email: 'hello.world@fatzebra.com.au', address: '123 Australia Blvd.', city: 'Sydney', postcode: '2000', state: 'NSW', country: 'AU' }, paymentIntent: { payment: { amount: 1000, currency: "AUD", reference: "ref_123490", }, verification: "ver_123480" }, paymentMethod: { type: "card", data: { number: "4111111111111111", holder: "John Doe", expiryMonth: "01", expiryYear: "2022", cvv: "123" } } }); ``` --- Source: https://www.artspay.com/docs/developer/javascript-sdk/methods/renderpaymentspage # renderPaymentsPage ## renderPaymentsPage(HppSetupParams) Renders the Fat Zebra Hosted Payments Page within the specified div element (see `containerId` in the example below). The version field will control what version of the iframe will be displayed. The field is optional and will default to V2 if not included. ```javascript const fz = new FatZebra({ username: "MerchantXYZ" }); fz.renderPaymentsPage({ containerId: "fz-paynow", version: 3, customer: { firstName: 'Captain', lastName: 'America', email: 'hello.world@fatzebra.com.au', address: '123 Australia Blvd.', city: 'Sydney', postcode: '2000', state: 'NSW', country: 'AU' }, paymentIntent: { payment: { amount: 500, currency: "AUD", reference: "ref_123490" }, verification: 'ver_123480' }, options: { // Hpp display options hideButton: false, hideLogos: true } }); ``` --- Source: https://www.artspay.com/docs/developer/javascript-sdk/objects # Objects ### fatzebra.js Objects * [Customer](https://www.artspay.com/docs/developer/javascript-sdk/objects/customer) * [PaymentIntent](https://www.artspay.com/docs/developer/javascript-sdk/objects/paymentintent) * [PaymentMethod](https://www.artspay.com/docs/developer/javascript-sdk/objects/paymentmethod) * [HppSetupParams](https://www.artspay.com/docs/developer/javascript-sdk/objects/hppsetupparams) * [VerifyCardParams](https://www.artspay.com/docs/developer/javascript-sdk/objects/verifycardparams) --- Source: https://www.artspay.com/docs/developer/javascript-sdk/objects/customer # Customer The **Customer** object holds details about a customer and is used in the following methods: * [renderPaymentsPage](https://www.artspay.com/docs/developer/javascript-sdk/methods/renderpaymentspage) * [verifyCard](https://www.artspay.com/docs/developer/javascript-sdk/methods/verifycard) | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `firstName` | string | Y | Customer first name | | `lastName` | string | Y | Customer surname | | `email` | string | Y | Customer email address | | `address` | string | Y | Customer address
e.g. `315/123, Success Blvd` | | `city` | string | Y | Customer suburb/city | | `postcode` | string | Y | Customer postcode | | `state` | string | Y | Customer state | | `country` | string | Y | Customer country.
ISO Alpha 2 country codes. e.g. AU, GB, NZ | ```json { firstName: 'Captain', lastName: 'America', email: 'hello.world@fatzebra.com.au', address: '123 Australia Blvd.', city: 'Sydney', postcode: '2000', state: 'NSW', country: 'AU' } ``` --- Source: https://www.artspay.com/docs/developer/javascript-sdk/objects/paymentintent # PaymentIntent The **PaymentIntent** object contains payment data. To ensure that this payment data is not tampered with (e.g. a customer amends the amount to be smaller), the `PaymentIntent` requires a HMAC `verification` field to be conducted in your backend using your Pay Now secret. `PaymentIntent` is used in the following methods. * [load](https://www.artspay.com/docs/developer) * [verifyCard](https://www.artspay.com/docs/developer/javascript-sdk/methods/verifycard) | Attribute | Type | Description | | --- | --- | --- | | `payment.amount` | number | Amount in subunit (non-decimal) | | `payment.currency` | string | [ISO-4217 country codes](https://www.artspay.com/docs/developer/purchases/supported-currencies/iso-currency-codes) | | `payment.reference` | string | Reference or invoice number for the payment transaction/ | | `payment.hide_card_holder` | boolean | Determines if the "Card Holder" field should be shown on the page or not. **If this is included and true, it must be appended to the end of the verification hash**. See "Verification Value Hash Calculation" below for more details. | | `verification` | string | For payments:
Hash of amount, reference, currency.
For verifyCard [verifyCard](https://www.artspay.com/docs/developer/javascript-sdk/methods/verifycard):
Hash of card\_token
See **Verification Value Hash Calculation** below for more details on how to calculate this value. | ```json Example { payment: { amount: 10025, currency: "AUD", reference: "INV1121" }, verification: "xxxxxx" } ``` ### Verification Value Hash Calculation > > > The Verification Value Hash should only ever be calculated on your backend server, and never in client-side code. > > This is because your Pay Now token is a secret value that only you should know. Calculating the Verification Value Hash on the client-side (e.g. in client-side Javascript) would make your Pay Now token secret visible to public via browser developer tools. Below is pseudo code demonstrating how the verification hash is calculated using a PayNow token. The Pay Now token can be obtained from the [Fat Zebra Merchant Dashboard](https://dashboard.fatzebra.com.au). #### VerifyCard Please make sure that the hash calculation is **only** the shared\_secret, card token ```ruby Ruby shared_secret = "abc123" # Also known as your Pay Now token card_token = "xyc12ce" # FatZebra issued token representing a debit or credit card verification = hmac_md5(shared_secret, card_token) # Expected value: 8cf7e7d50664d118c41a70b1ba22d916 ``` #### Payments Please make sure that reference (invoice #), amount (subunit) and currency are in the correct order as shown: ```ruby shared_secret = "abc123" # Also known as your Pay Now token invoice_no = "INV4567" # Also known as reference amount = "1000" currency = "AUD" hide_card_holder = true hmac = HMAC::MD5.new(shared_secret) data = [invoice_no, amount, currency] data << [hide_card_holder] if hide_card_holder # Data will be: # INV4567:1000:AUD:true verification = hmac_md5(shared_secret, data.join(":")) # Expected value: c045c96c113ae660b91b60bd09feda20 # Hash will be 0a40877ca9f75152f27bf093af7fd44b if hide_card_holder is false ``` --- Source: https://www.artspay.com/docs/developer/javascript-sdk/objects/paymentmethod # PaymentMethod The **PaymentMethod** object contains card details and is used in the following methods: * [renderPaymentsPage](https://www.artspay.com/docs/developer/javascript-sdk/methods/renderpaymentspage) * [verifyCard](https://www.artspay.com/docs/developer/javascript-sdk/methods/verifycard) It supports both new cards (where the raw card number and details are provided) or existing cards (where a Fat Zebra card token is provided). ### Pay with a new card | Attribute | Type | Description | | --- | --- | --- | | `type` | string | Specify the following value: `card` | | `data.number` | string | Card number | | `data.holder` | string | Card holder name | | `data.expiryMonth` | string | Expiry month
2 characters long
Padded with a leading zero, e.g. `01` for January | | `data.expiryYear` | string | Expiry year
4 characters long | | `cvv` | string | CVV or CVC value on the card
3 or 4 digits depending on the card scheme | ```json Example: card { type: "card", data: { number: "4005550000000001", holder: "John Doe", expiryMonth: "03", expiryYear: "2022", cvv: "123" } } ``` ### Pay with an existing card (card on file) | Attribute | Type | Description | | --- | --- | --- | | `type` | string | Specify the following value: `card_on_file` | | `data.token` | string | Card token.
See [here](https://www.artspay.com/docs/api/gateway/tokenized-cards/tokenize-a-card) for more details on how to tokenize a card. | ```json Example: card on file { type: "card_on_file", data: { token: "fke8jmra" } } ``` --- Source: https://www.artspay.com/docs/developer/javascript-sdk/objects/hppsetupparams # HppSetupParams The **HppSetupParams** object defines how the Hosted Payment Page (HPP) should be displayed via fatzebra.js, as well as setting the [PaymentIntent](https://www.artspay.com/docs/developer/javascript-sdk/objects/paymentintent). `HppSetupParams` is used in the following methods: * [renderPaymentsPage](https://www.artspay.com/docs/developer/javascript-sdk/methods/renderpaymentspage) | Attribute | Type | Description | Required/Optional | Default | | --- | --- | --- | --- | --- | | `containerId` | string | The `id` of the HTML div element where the Hosted Payment Page iframe will be rendered | required | | | `customer` | [Customer](https://www.artspay.com/docs/developer/javascript-sdk/objects/customer) | See [Customer](https://www.artspay.com/docs/developer/javascript-sdk/objects/customer) | required | | | `paymentIntent` | [PaymentIntent](https://www.artspay.com/docs/developer/javascript-sdk/objects/paymentintent) | See [PaymentIntent](https://www.artspay.com/docs/developer/javascript-sdk/objects/paymentintent) | required | | | `options.buttonText` | string | Specifies the text to be displayed for the submit button (e.g. Pay Now or Submit)
Only applicable when hideButton is `false` | optional | empty | | `options.cards` | string, comma separated | Specifies a whitelist or blacklist of accepted cards.
If the string is prefixed with an exclamation mark `!` the cards listed will not be permitted
Possible values are:
`AMEX`, `JCB`, `VISA`, `MasterCard`, `Diners`, `Discover`, `China UnionPay`
Examples
!`AMEX,JCB` - both AMEX and JCB are disabled
`VISA,AMEX` - only enable VISA and AMEX
Note if this field is present it is included in the end of the verification value string | optional | empty | | `options.css` | string | HTTPS URL for external CSS. This must be a valid HTTPS URL that serves valid CSS. If specified, `cssSignature` is also required. | optional | empty | | `options.cssSignature` | string | HMAC-MD5 of the css URL with the shared secret to sign the request | optional | empty | | `options.hideButton` | boolean | Hides the button from the checkout form for when the checkout should be triggered by a purchase | optional | false | | `options.hideCardHolder` | boolean | Hides the card holder entry field. If provided, needs to be in the verification hash calculation. | optional | false | | `options.hideLogos` | boolean | | optional | true | | `options.logoUrl` | string | HTTPS URL for the merchant logo. This must be a valid HTTPS URL that serves an image file (supported file types: PNG, JPEG or GIF). | optional | empty | | `options.showEmail` | boolean | Indicates whether to show and require the email field or not | optional | false | | `options.showExtras` | boolean | Indicates whether to display the invoice number and the amount to the customer | optional | false | | `options.tokenizeOnly` | boolean | When set to `true`, HPP will only tokenise the card and return the token via `fz.tokenization.success` event. 3DS/SCA and purchase will not run. | optional | false | | `options.enableSca` | boolean | When set to `true`, 3DS/SCA will run after card tokenisation and before payment is made
When `false`, a payment will be made after card tokenisation
Please note that 3DS/SCA will not run when both `tokenizeOnly` and `enableSca` are set to `true` | optional | false | | `options.challengeWindowSize` | string | The sizes are width x height in pixels of the window displayed in the cardholder browser.
2-character long string
Available values are
`'01'`: 250x400
`'02'`: 390x400
`'03'`: 500x600
`'04'`: 600x400
`'05'`: Full page (recommended) | optional | '05' | ```json Example const fz = new FatZebra({ username: "MerchantXYZ" }); fz.renderPaymentsPage({ containerId: "fz-paynow", customer: { firstName: 'Captain', lastName: 'America', email: 'hello.world@fatzebra.com.au', address: '123 Australia Blvd.', city: 'Sydney', postcode: '2000', state: 'NSW', country: 'AU' }, paymentIntent: { payment: { amount: 500, currency: "AUD", reference: "ref_123490" }, verification: "ver_123480" }, options: { // Hpp display options hideButton: false, hideLogos: true, enableSca: true } }); ``` --- Source: https://www.artspay.com/docs/developer/javascript-sdk/objects/verifycardparams # VerifyCardParams The **VerifyCardParams** object holds the values necessary to perform a 3DS2 check against a new or existing card. | Attribute | Type | Description | Required/Optional | | --- | --- | --- | --- | | `customer` | [Customer](https://www.artspay.com/docs/developer/javascript-sdk/objects/customer) | See [Customer](https://www.artspay.com/docs/developer/javascript-sdk/objects/customer) | required | | `paymentIntent` | [PaymentIntent](https://www.artspay.com/docs/developer/javascript-sdk/objects/paymentintent) | See [PaymentIntent](https://www.artspay.com/docs/developer/javascript-sdk/objects/paymentintent) | required | | `paymentMethod` | [PaymentMethod](https://www.artspay.com/docs/developer/javascript-sdk/objects/paymentmethod) | See [PaymentMethod](https://www.artspay.com/docs/developer/javascript-sdk/objects/paymentmethod) | required | ```javascript const fz = new FatZebra({ username: "MerchantXYZ" }); fz.verifyCard({ customer: { firstName: 'Captain', lastName: 'America', email: 'hello.world@fatzebra.com.au', address: '123 Australia Blvd.', city: 'Sydney', postcode: '2000', state: 'NSW', country: 'AU' }, paymentIntent: { payment: { amount: 1000, currency: "AUD", reference: "ref_123490", }, verification: "ver_123480" }, paymentMethod: { type: "card", data: { number: "4111111111111111", holder: "John Doe", expiryMonth: "01", expiryYear: "2022", cvv: "123" } } }); ``` --- Source: https://www.artspay.com/docs/developer/javascript-sdk/events-1 # Events The **fatzebra.js** Javascript SDK will emit various events that your client-side Javascript code can [subscribe](https://www.artspay.com/docs/developer/javascript-sdk/event-listeners) to. An event may be emitted along with a `data` payload, which is encapsulated into a [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent) object and can be retrieved via the [detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail) property of the event. ### List of fatzebra.js events * [Validation](https://www.artspay.com/docs/developer/javascript-sdk/events-1/validation) * [SCA](https://www.artspay.com/docs/developer/javascript-sdk/events-1/sca) * [Tokenization](https://www.artspay.com/docs/developer/javascript-sdk/events-1/tokenization) * [Payment](https://www.artspay.com/docs/developer/javascript-sdk/events-1/payment) ### Successful Event Data Format | Attribute | Type | Description | | :-------- | :----- | :---------- | | `message` | string | message | | `data` | object | data | ```javascript example { message: "xxx", data: { ... } } ``` ### Error Event Data Format | Attribute | Type | Description | | :-------- | :-------------- | :-------------------------------------------- | | `errors` | array of string | error messages | | `data` | object | This could be `null` if no data is available. | ```javascript example { errors: [ "xxx", ... ], data: { // } } ``` --- Source: https://www.artspay.com/docs/developer/javascript-sdk/events-1/form-validation # Form Validation (V2) *Error messages that can be used to indicate which payment form fields have invalid data.* > > > Hosted Payments Page form validation errors are propagated to the parent frame (merchant website) via fz.form\_validation.error event. This is distinct from the `fz.validation.error`, which is used to indicate errors to do with calls to functions such as `renderPaymentsPage` | Event | Description | Applicable Methods | | :------------------------- | :------------------------------------- | :------------------------------------------- | | `fz.form_validation.error` | Hosted Payments Form validation errors | [renderPaymentsPage](https://www.artspay.com/docs/developer/javascript-sdk/methods/renderpaymentspage) | ### fz.form\_validation.error Data Payload Example ```json { "message": "Form was not valid", "errors": [ "Expiry Date is required", "Security Code (CVV) is required" ], "data": { "payment_request_expiry_date": [ { "errorCode": "hpp_10401", "message": "Expiry Date is required" } ], "payment_request_security_code": [ { "errorCode": "hpp_10301", "message": "Security Code (CVV) is required" } ] } } ``` * *errors* contains an array of messages associated with the form validation errors. * *data* provides details around the affected fields and the associated errors, along with error codes. Developers can take advantage of the error code in order to customise the user experience. ### Validation Rules | Field | Rule | Error Code | | --- | --- | --- | | payment\_request\_card\_holder | required | hpp\_10101 | | payment\_request\_card\_holder | max length
• 50 characters | hpp\_10102 | | payment\_request\_card\_holder | pattern
• alphanumeric only | hpp\_10103 | | payment\_request\_card\_number | required | hpp\_10201 | | payment\_request\_card\_number | min length
• 13 characters | hpp\_10202 | | payment\_request\_card\_number | max length
• 19 characters | hpp\_10203 | | payment\_request\_card\_number | pattern
• valid credit card number pattern | hpp\_10204 | | payment\_request\_card\_number | supported card types
• **applicable only when`options.cards` is provided**.See [HppSetupParams](https://www.artspay.com/docs/developer/javascript-sdk/objects/hppsetupparams) for details | hpp\_10205 | | payment\_request\_security\_code | required | hpp\_10301 | | payment\_request\_security\_code | min length
• 3 characters | hpp\_10302 | | payment\_request\_security\_code | max length
• 4 characters for AMEX & JCB
• 3 characters for everything else. | hpp\_10303 | | payment\_request\_security\_code | pattern
• numeric only | hpp\_10304 | | payment\_request\_expiry\_date | required | hpp\_10401 | | payment\_request\_expiry\_date | valid expiry date
• greater than today | hpp\_10402 | | payment\_request\_email | required
• **applicable only when`options.showEmail` is provided**.See [HppSetupParams](https://www.artspay.com/docs/developer/javascript-sdk/objects/hppsetupparams) for details | hpp\_10501 | | payment\_request\_email | pattern
• valid email format | hpp\_10502 | | payment\_request\_email | max length
• 100 characters | hpp\_10503 | --- Source: https://www.artspay.com/docs/developer/javascript-sdk/events-1/validation # Validation *Error messages can be produced when incorrect data is passed to JS SDK methods* | Event | Description | Applicable Methods | | :-------------------- | :------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------- | | `fz.validation.error` | Client-side validation errors occurred while calling fatzebra.js methods. | [verifyCard](https://www.artspay.com/docs/developer/javascript-sdk/methods/verifycard), [renderPaymentsPage](https://www.artspay.com/docs/developer/javascript-sdk/methods/renderpaymentspage), [checkout](https://www.artspay.com/docs/developer/javascript-sdk/methods/purchase) | Examples of validation errors include: #### Required fields Calling `fz.renderPaymentsPage` without specifying an amount like this: ``` fz.renderPaymentsPage({ containerId: 'fz-paynow', version: 3, paymentIntent: { payment: { currency: "AUD", reference: "ABCD1234", } }, verification: 'verification-hash-goes-here' }); ``` Will give you a validation error: ```json fz.validation.error data payload - required field { errors: [ "/paymentIntent/payment/amount is required", ... ], data: null } ``` #### Data type invalid Similarly, providing an invalid value for fields: ``` fz.renderPaymentsPage({ containerId: 'fz-paynow', version: 3, paymentIntent: { payment: { amount: "100 dollarydoos", currency: "AUD", reference: "ABCD1234", } }, verification: 'verification-hash-goes-here' }); ``` Will also produce a validation message: ```json fz.validation.error data payload - data type invalid { errors: [ "/paymentIntent/payment/amount should be an integer", ... ], data: null } ``` --- Source: https://www.artspay.com/docs/developer/javascript-sdk/events-1/sca # SCA | Event | Description | Applicable Methods | | --- | --- | --- | | `fz.sca.success` | Emitted when 3DS validation completes successfully.
The liability shifts from merchant to the card issuer.
Please note: The edge case is when the enrolled field (ver) comes back as 'N' (3DS success - Not Enrolled), which means "No, Bank is not participating in 3-D Secure protocol". If the Enrolled value is equal to N, then the Consumer is NOT eligible for Authentication (No liability shift).
Most merchants choose to continue with these transactions, because otherwise in many cases it would be stopping customers from making legitimate transactions. | [renderPaymentsPage](https://www.artspay.com/docs/developer/javascript-sdk/methods/renderpaymentspage)
[verifyCard](https://www.artspay.com/docs/developer/javascript-sdk/methods/verifycard) | | `fz.sca.error` | Emitted when 3DS enrolment or validation failed.
The payment attempt is deemed risky and merchant shall not proceed with the payment. | [renderPaymentsPage](https://www.artspay.com/docs/developer/javascript-sdk/methods/renderpaymentspage)
[verifyCard](https://www.artspay.com/docs/developer/javascript-sdk/methods/verifycard) | ### fz.sca.success Data Payload | Attribute | Type | Description | | --- | --- | --- | | `aav` | string | Account Authentication Value. Unique 32-character transaction token for a 3D Secure transaction. For Mastercard Identity Check, the AAV is named the UCAF. For Visa Secure, the AAV is named the CAVV. | | `cavv` | string | Cardholder Authentication Verification Value. A Base64-encoded string sent back with Visa Secure-enrolled cards that specifically identifies the transaction with the issuing bank and Visa. Standard for collecting and sending AAV data for Visa Secure transactions. | | `par` | string | Payer Authentication Response. Compressed, Base64-encoded response from the card-issuing bank | | `sli` | string | The Security Level Indicator for 3DS transactions | | `xid` | string | String used by both Visa and Mastercard which identifies a specific transaction on the Directory Servers. This string value should remain consistent throughout a transaction’s history. | | `ucaf` | string | Universal Cardholder Authentication Field.
Mastercard only. | | `ver` | string | 3DS enrolment status. | | `directoryServerTxnId` | string | Directory server transaction Id | | `threedsVersion` | string | 3DS version used for verifying the intended payment. | ```json fz.sca.success data payload { message: "xxx", data: { aav: "xxx", cavv: "xxx", par: "xxx", sli: "xxx", xid: "xxx", ucaf: "xxx", ver: "xxx", directoryServerTxnId: "xxx", threedsVersion: "xxx", } } ``` ### fz.sca.error Data Payload | Attribute | Type | Description | | --- | --- | --- | | `errorCode` | string | Error code for specific 3DS/SCA failure scenario.
errorCode will be not be present in the event of request timeout or server error
See below for error code mapping. | ```json fz.sca.error data payload // Request timeout, server error, etc. Prompt user to retry. { errors: ["xxx"], data: null } // 3DS2 authentication failed. The card is deemed risky by issuer. { errors: ["xxx"], data: { errorCode: "xxx" } } ``` ### 3DS/SCA Error Code Mapping | Error Code | Description | | --- | --- | | `001` | **Bypassed authentication**
This is related to a feature that is **currently not available**. We will look at providing merchants the ability to configure rules to determine whether authentication is required for a transaction.
\--
No liability shift | | `002` | **Authentication not available on lookup**
Unable to verify 3DS enrolment status with the issuer.
\--
No liability shift | | `003` | **Unavailable frictionless authentication**
3DS authentication is unavailable with the issuer.
\--
No liability shift | | `004` | **Unsuccessful frictionless authentication**
The issuer deems the transaction as risky
\--
No liability shift | | `005` | **Rejected frictionless authentication**
\--
No liability shift | | `006` | **Unsuccessful step-up authentication**
Unsuccessful authentication due to failed OTP (one time password) challenge.
\--
No liability shift | | `007` | **Unavailable step-up authentication**
The card holder is enrolled for 3DS, but authentication is not available with that issuer.
\--
No liability shift | --- Source: https://www.artspay.com/docs/developer/javascript-sdk/events-1/tokenization # Tokenization All cards entered into the Hosted Payment Page are tokenized first before 3DS verification and payment transaction. | Event | Description | Applicable Methods | | --- | --- | --- | | `fz.tokenization.success` | Emitted when card is successfully tokenized. | [renderPaymentsPage](https://www.artspay.com/docs/developer/javascript-sdk/methods/renderpaymentspage) | | `fz.tokenization.error` | Emitted when card tokenization fails. | [renderPaymentsPage](https://www.artspay.com/docs/developer/javascript-sdk/methods/renderpaymentspage) | ### fz.tokenization.success Data Payload | Attribute | Type | Description | | --- | --- | --- | | `token` | string | Card token | ```json fz.tokenization.success data payload { message: "xxx", data: { token: "xxx", } } ``` ### fz.tokenization.error Data Payload | Attribute | Type | Description | | --- | --- | --- | | N/A | N/A | N/A | ```json fz.tokenization.error data payload { errors: ["xxx"], data: null } ``` --- Source: https://www.artspay.com/docs/developer/javascript-sdk/events-1/payment # Payment | Event | Description | Applicable Methods | | --- | --- | --- | | `fz.payment.success` | Emitted when payment is processed successfully. | [renderPaymentsPage](https://www.artspay.com/docs/developer/javascript-sdk/methods/renderpaymentspage) | | `fz.payment.error` | Emitted when a payment transaction failed. | [renderPaymentsPage](https://www.artspay.com/docs/developer/javascript-sdk/methods/renderpaymentspage) | ### fz.payment.success data payload ```json fz.payment.success data payload { "message": "Payment successful.", "data": { "transactionId": "40057-P-F7R7M9Q6", "responseCode": "00", "message": "Approved", "amount": 100, "currency": "AUD", "reference": "sgc99pycds20i97q", "cardNumber": "400000XXXXXX1091", "cardHolder": "XXX", "cardExpiry": "2023-12-31", "cardType": "VISA", "verification": "0aa8154b8cf0fe4168af0e3d0d752d10" } } ``` It is recommended that you verify the returned data against the calculated verification (see below) before consumption. ### fz.payment.error data payload ```json fz.payment.error data payload { "message": "Refer to Card Issuer", "data": { "transactionId": "40057-P-F7R7M9Q6", "responseCode": "05", "message": "Declined", "amount": 100, "currency": "AUD", "reference": "sgc99pycds20i97q", "cardNumber": "400000XXXXXX1091", "cardHolder": "XXX", "cardExpiry": "2023-12-31", "cardType": "VISA", "verification": "0aa8154b8cf0fe4168af0e3d0d752d10" } } ``` ### Transaction Data | Attribute | Type | Description | | --- | --- | --- | | `transactionId` | string | Payment transaction id | | `responseCode` | string | | | `message` | string | | | `amount` | number | amount in subunit.
e.g. AUB $10.25 -> 1025 | | `currency` | string | currency code. e.g. AUD | | `reference` | string | payment reference or invoice #. | | `cardNumber` | string | masked card number | | `cardHolder` | string | card holder name | | `cardExpiry` | string | card expiry date.
yyyy-mm-dd | | `cardType` | string | card type.
e.g. VISA, MasterCard, etc | | `verification` | string | calculated verification hash. | ### Verification hash calculation values = `[transactionId]`:`[responseCode]`:\`[message]\`:\`[amount]\`:\`[currency]\`:\`[reference]\`:`[cardNumber]`:`[cardHolder]`:`[cardExpiry]`:`[cardType]` shared\_secret = <obtained from merchant dashboard or partner webhook> verification = MD5(values, shared\_secret) **For example:** values = "40057-P-F7R7M9Q6","00":"Declined": 100 :"AUD":"sgc99pycds20i97q":"400000XXXXXX1091":"XXX":"2023-12-31":"VISA":"0aa8154b8cf0fe4168af0e3d0d752d10" shared\_secret = "123" verification = MD5(values, shared\_secret) --- Source: https://www.artspay.com/docs/developer/3ds2-integration/3ds2-overview # Overview *3DS2 allows you to authenticate your transactions to reduce fraud and shift liability* 3DS2 is a payments industry standard that promotes secure, frictionless consumer authentication for online payments. 3DS2 allows you to reduce fraud by providing methods to verify the authenticity of online payments. The steps required to implement 3DS2 using Fat Zebra will depend on: 1. If you have already have an MPI (Merchant Plug-in) or require Fat Zebra to act as your MPI 2. Your PCI level 3. Your preferred integration method ## MPI #### I already have an MPI If you have an existing MPI integration you will need to follow your MPI's instructions in order to authenticate a payment transaction. After authentication your MPI will provide you with 3DS data which may include: * Cryptogram, CAV, CAVV or AAV * Ecommerce Indicator (ECI) or Security Level Indicator (SLI) * PARes * VERes You will then need to set the [3D Secure fields](https://www.artspay.com/docs/developer/purchases/extra-and-extended-fields/3d-secure) on your Fat Zebra Purchase or Refund API calls in order to complete a 3DS2 transaction. #### I don't have an MPI Fat Zebra can act as your MPI. Please contact your Fat Zebra representative for more information on how to add Fat Zebra's 3DS2 MPI to your account. Using Fat Zebra's MPI, there are various integration methods to choose from depending on your PCI level: | Integration Method | Description | 3DS Integration Guide | | --- | --- | --- | | Hosted Payments Page | **PCI SAQ A required**
Your website uses Fat Zebra’s payment form through the Fat Zebra Hosted Payments Page iframe.
Payment processing is entirely outsourced to FatZebra, meaning you do not need to handle any raw card data. | [Using Hosted Payments Page](https://www.artspay.com/docs/developer/3ds2-integration/using-hosted-payments-page) | | Direct Post | **PCI A-EP required**
Your website hosts the payment form and you are responsible for collecting card details on front end code you host.
Card data exchange with Fat Zebra will take place via an AJAX call from your frontend directly to Fat Zebra. | [Using Custom Payments Form](https://www.artspay.com/docs/developer/3ds2-integration/using-custom-payments-form) | | API | **PCI SAQ D required**
Your website hosts the payment form and you are responsible for collecting card details in both your backend and frontend.
Card data exchange with Fat Zebra will take place via API calls from your backend system to Fat Zebra. | [Using Custom Payments Form](https://www.artspay.com/docs/developer/3ds2-integration/using-custom-payments-form) | --- Source: https://www.artspay.com/docs/developer/3ds2-integration/using-hosted-payments-page # Using Hosted Payments Page > > > 3DS2 via the Hosted Payments is only supported via **fatzebra.js**. If you are currently using a direct integration with the Hosted Payments Page by creating your own iframe and Hosted Payments Page URL you will need to switch over to **fatzebra.js** in order to implement 3DS2 > If you're using React... > > Don't use this library! Use our [React SDK](https://www.artspay.com/docs/developer/react-sdk/react-sdk-overview) instead, on **version 2.1.7 or later** (earlier versions may not trigger 3DS). ## Overview Fat Zebra's Hosted Payments Page (HPP) provides a seamless way to perform 3DS2 checks on either new or existing cards before a purchase is made. When your customers submit a payment, the Fat Zebra Hosted Payments Page form will perform the following operations behind the scenes and emit javascript events so that you can react appropriately: 1. Tokenise the card details entered into the Hosted Payments Page 2. Perform a 3DS2 check against the card (Note: the `enableSca` URL parameter must be set to **true** in order for this to happen, more details in Step 5 below) 3. Upon a successful 3DS2 check, HPP will then make a purchase call with the 3DS2 results to process the payment. If the 3DS2 check is unsuccessful, fatzebra.js will emit an event that you can react to. > > > Before completing the steps below, speak to the Fat Zebra support team to have 3DS2 enabled on your account #### Step 1 - Obtain an OAuth access token Follow the steps in [Obtain an OAuth token](https://www.artspay.com/docs/developer/javascript-sdk/obtain-oauth-token) to obtain an access token for your checkout session. #### Step 2 - Include fatzebra.js on your page ```html ``` #### Step 3 - Initialise the FatZebra JS SDK Initialize the `FatZebra` object in the footer of your page: ```javascript // Initialize the FatZebra object in the footer of your page ``` Note: your merchant username can be obtained from the Fat Zebra Merchant Dashboard. #### Step 4 - Subscribe to fatzebra.js events fatzebra.js will emit various javascript events. Subscribe to the ones relevant to you. Available events include: * [Validation](https://www.artspay.com/docs/developer/javascript-sdk/events-1/validation) - for validation errors * [Tokenization](https://www.artspay.com/docs/developer/javascript-sdk/events-1/tokenization) - for success or failure of the tokenization of the card data * [SCA](https://www.artspay.com/docs/developer/javascript-sdk/events-1/sca) - for success or failure of the 3DS2 checks * [Payment](https://www.artspay.com/docs/developer/javascript-sdk/events-1/payment) - for success or failure of the payment ```javascript // Handle validation related errors, e.g. client-side validation fz.on('fz.validation.error', function(event) { // ... }); // Receive a FZ card token fz.on('fz.tokenization.success', function(event) { // If required you can save the card token in your backend }); // Handle errors related to payment processing fz.on('fz.payment.error', function(event) { // Show an error message to the customer }); fz.on('fz.payment.success', function(event) { // checkout ends }); // Handle errors related to SCA fz.on('fz.sca.error', function(event) { // Show an error message to the customer }); ``` #### Step 5 - Load Hosted Payments Page enableSca: **true** See [HppSetupParams](https://www.artspay.com/docs/developer/javascript-sdk/objects/hppsetupparams) for HPP options. **Note**: The customer object is only required when enableSca is set to **true**. ```javascript fz.renderPaymentsPage({ containerId: "fz-paynow", customer: { firstName: 'Captain', lastName: 'America', email: 'hello.world@fatzebra.com.au', address: '123 Australia Blvd.', city: 'Sydney', postcode: '2000', state: 'NSW', country: 'AU' }, paymentIntent: { payment: { amount: 500, currency: "AUD", reference: "ref_123490" }, verification: 'ver_123480' // made up value }, options: { // Hpp display options hideButton: false, hideLogos: true, enableSca: true } }); // Register click event handler to trigger Hosted Payment Page payment flow if // you have a custom checkout button. const handler = function() { fz.checkout(); } document.getElementById('checkoutButton').addEventListener('click', handler); ``` Your payment page is now ready for 3DS2 checks. When your customers enter card details and submit a payment, 3DS2 checks will now occur and either prompt the customer for additional verification details (challenge flow) or submit the payment without a customer prompt (frictionless flow). --- Source: https://www.artspay.com/docs/developer/3ds2-integration/using-custom-payments-form # Using Custom Payments Form ## Overview If you collect card details using your own payments form, you can perform 3DS2 checks using fatzebra.js. > Before completing the steps below, speak to the Fat Zebra support team to have 3DS2 enabled on your account #### Step 1 - Obtain an OAuth access token Follow the steps in [Obtain an OAuth token](https://www.artspay.com/docs/developer/javascript-sdk/obtain-oauth-token) to obtain an access token for your checkout session. #### Step 2 - Include fatzebra.js on your page ```html ``` #### Step 3 - Initialise the FatZebra SDK ```javascript // Initialize the FatZebra object in the footer of your page ``` Note: your merchant username can be obtained from the Fat Zebra Merchant Dashboard. #### Step 4 - Subscribe to fatzebra.js events fatzebra.js will emit various javascript events. Subscribe to the ones relevant to you. Available events: * [Tokenization](https://www.artspay.com/docs/developer/javascript-sdk/events-1/tokenization) - for success or failure of the tokenization of the card data * [SCA](https://www.artspay.com/docs/developer/javascript-sdk/events-1/sca) - for success or failure of the 3DS2 checks ```javascript // Handle validation related errors, e.g. client-side validation fz.on('fz.validation.error', function(event) { // ... }); // Receive the result of the 3DS2 check. fz.on('fz.sca.success', function(event) { // Obtain 3DS2 results which will be used to make a purchase in the backend }) // Handle errors related to SCA fz.on('fz.sca.error', function(event) { // Show an error message to the customer }); ``` #### Step 5 - Perform 3DS2 checks on the card Call the fatzebra.js `verifyCard` method to perform 3DS2 on a card. See [verifyCard](https://www.artspay.com/docs/developer/javascript-sdk/methods/verifycard) and [VerifyCardParams](https://www.artspay.com/docs/developer/javascript-sdk/objects/verifycardparams) for more details. ```javascript // Call this function when the checkout button on your page is clicked fz.verifyCard({ customer: { firstName: 'Captain', lastName: 'America', email: 'hello.world@fatzebra.com.au', address: '123 Australia Blvd.', city: 'Sydney', postcode: '2000', state: 'NSW', country: 'AU' }, paymentIntent: { payment: { amount: 1000, currency: "AUD", reference: "ref_123490", }, verification: "ver_123480" // made up value }, paymentMethod: { type: "card", data: { number: "4111111111111111", holder: "John Doe", expiryMonth: "01", expiryYear: "2022", cvv: "123" } } }); ``` #### Step 6 - Frictionless or challenge flow presented to customer The fatzebra.js `verifyCard` will send the payment and customer details onto the issuing bank of the cardholder. The issuing bank will then determine if: a) The customer should be presented with a 3DS2 challenge to prove they are the cardholder. This normally involves the customer receiving a one-time pin (OTP) on their phone and then be required to enter the OTP into a modal dialog on the payment page. The fatzebra.js `verifyCard` method will automatically display this modal dialog, no additional code is required on your end. b) If the issuing bank determines that the customer is low risk they may allow the customer to go through a "frictionless" flow, whereby the customer does not need to complete any additional steps (such as an OTP). #### Step 7 - Obtain 3DS check result After the customer has completed the frictionless or challenge flow, fatzebra.js will emit one of the following events: a) `fz.sca.success`: when 3DS validation completes successfully\ b) `fz.sca.error`: when 3DS enrolment or validation failed In the event of a successful 3DS check, the `fz.sca.success` event will contain 3DS result data (`cavv`, `sli`, etc.) that can be sent in your backend purchase or refund call. The presence of valid 3DS result data in your Purchase or Refund API will enable a liability shift to the issuer for fraudulent transactions. > A separate check with successful 3DS result data is required for each payment you wish to make. The same 3DS result data cannot be used in multiple purchases. #### Step 8 - Make a purchase using 3DS result data Provide the 3DS result data from the `fz.sca.success` event in the request payload `extra` field when making a [Purchase](https://www.artspay.com/docs/api/gateway/purchases) or [Refund](https://www.artspay.com/docs/api/gateway/refunds) API call. Please note that these API calls require `snake_case` keys, i.e. `directory_server_txn_id`, not `directoryServerTxnId` See [3DS extra payload](https://www.artspay.com/docs/developer/purchases/extra-and-extended-fields/3d-secure) for more information. ```json { "amount": 10, "currency": "AUD", "card_token": "syupxv5b1tqv4bqdsazr", "reference": "GfNStL8XJ1111", "customer_ip": "111.222.111.123", "extra": { "sli": "05", "cavv": "kAMRDwUADQVXiAPovxs+SQNhfGpb", "xid": "", "ver": "Y", "par": "Y", "directory_server_txn_id": "a8a35bcf-21d5-4f55-995a-a4b5e60d356d", "threeds_version": "2" } } ``` --- Source: https://www.artspay.com/docs/developer/3ds2-integration/testing # 3DS Cards for Testing A 3DS check may end up with one of the following outcomes. * 3DS check successful\ `fz.sca.success` event is triggered by fatzebra.js. If you own your own payments form and use the `verifyCard` method of fatzebra.js to perform 3DS checks, 3DS result data will be provided in the `fz.sca.success` event payload. Using this 3DS result data in your Purchase or Refund API call will qualify that transaction for liability shift. * Please note: The edge case is when the enrolled field (ver) comes back as 'N' (3DS success - Not Enrolled), which means "No, Bank is not participating in 3-D Secure protocol". If the Enrolled value is equal to N, then the Consumer is NOT eligible for Authentication (No liability shift). * 3DS check unsuccessful\ `fz.sca.error` event is triggered by fatzebra.js. An [error code](https://www.artspay.com/docs/developer/javascript-sdk/events-1/sca#3dssca-error-code-mapping) will be returned in the event payload indicating the reason for the error. This could be due to the card issuer not support 3DS2 or if the cardholder was unable to verify their card when prompted with a 3DS challenge flow (e.g. they entered the wrong one-time pin that was sent to their mobile device). * Server Error or timeout.\ `fz.sca.error` event is triggered by fatzebra.js. No error code will be returned in the event payload. In this event we recommend that you prompt your users to retry the 3DS check/payment. ## Test cards FatZebra provides a number of test cards to simulate various 3DS scenarios in the Sandbox environment. Each of the following card numbers will simulate a predetermined outcome: ### Successful 3DS2 check | Scenario | Cards | | --- | --- | | **Successful frictionless authentication**
Cardholder being authenticated by their Card Issuer
\--
Liability shift | Visa: 4000000000001000
Mastercard: 5200000000001005
Amex: 340000000001007 | | **Attempts processing frictionless authentication**
Cardholder is enrolled in 3DS however the Issuer is not supporting the program, resulting in a stand-in authentication experience
\--
Liability shift | Visa: 4000000000001026
Mastercard: 5200000000001021
Amex: 340000000001023 | | **Successful step-up authentication**
Successful OTP challenge
\--
Liability shift | Visa: 4000000000001091
Mastercard: 5200000000001096
Amex: 340000000001098 | **fz.sca.success** sample payload ```json { "message": "FatZebra.3DS: 3DS success - Successful Frictionless Authentication", "data": { "cavv": "xxx", "par": "xxx", "sli": "xxx", "xid": "xxx", "ver": "xxx", "directoryServerTxnId": "xxx", "threedsVersion": "xxx" } } ``` ### Unsuccessful 3DS check | Scenario | Card | Error code | | --- | --- | --- | | **Unsuccessful enrolment check**
Enrolment failed by card issuer
\--
No liability shift | Visa:
4000000000002446
Mastercard:
5200000000002037
Amex:
340000000002732 | 002 | | **Unsuccessful frictionless authentication**
Authentication failed by card issuer without challenge
\--
No liability shift | Visa: 4000000000001018
Mastercard: 5200000000001013
Amex: 340000000001015 | 004 | | **Unavailable frictionless authentication**
Authentication is unavailable from the issuer at the current time.
\--
No liability shift | Visa: 4000000000001034
Mastercard: 5200000000001039
Amex: 340000000001031 | 003 | | **Rejected frictionless authentication**
Authentication rejected by the issuer.
\--
No liability shift | Visa: 4000000000001042
Mastercard: 5200000000001047
Amex: 340000000001049 | 005 | | **Authentication not available on lookup**
Unable to verify 3DS enrolment status with the issuer due to system error.
\--
No liability shift | Visa: 4000000000001059
Mastercard: 5200000000001054
Amex: 340000000001056 | 002 | | **Server Error**
\--
No liability shift | Visa: 4000000000001067
Mastercard: 5200000000001062
Amex: 340000000001064 | * | | **Timeout**
\--
No liability shift | Visa: 4000000000001075
Mastercard: 5200000000001070
Amex: 340000000001072 | * | | **Bypassed authentication**
This is related to a feature that is **currently not available**. We will look at providing merchants the ability to configure rules to determine whether authentication is required for a transaction.
\--
No liability shift | Visa: 4000000000001083
Mastercard: 5200000000001088
Amex: 340000000001080 | 001 | | **Unsuccessful step-up authentication**
Unsuccessful authentication due to failed OTP (one time password) challenge.
\--
No liability shift | Visa: 4000000000001109
Mastercard: 5200000000001104
Amex: 340000000001106 | 006 | | **Unavailable step-up authentication**
The card holder is enrolled for 3DS, but authentication is not available with that issuer.
\--
No liability shift | Visa: 4000000000001117
Mastercard: 5200000000001112
Amex: 340000000001114 | 007 | **fz.sca.error** sample payload ```json fz.sca.error { "errors": [ "FatZebra.3DS: 3DS error - Rejected Frictionless Authentication" ], "data": { "errorCode": "005" } } ``` --- Source: https://www.artspay.com/docs/developer/3ds2-integration/branding-requirements # Branding Requirements Each card scheme recommends merchants to display their 3DS2 product logos on their payment pages where possible. These product logos include: * Verified by Visa * Mastercard ID Check * Amex SafeKey If you are integrating 3DS2 using Fat Zebra's [Hosted Payments Page](https://www.artspay.com/docs/developer/3ds2-integration/using-hosted-payments-page), please note that the Hosted Payments Page does not display these logos for you in order to give you control of the placement of these logos. ![2380](https://files.readme.io/e4c82e8-1a86757-multiple_schemes_website.png "1a86757-multiple_schemes_website.png") --- Source: https://www.artspay.com/docs/developer/3ds2-integration/go-live # Go-Live Before going live in production, please contact the Fat Zebra support team to enable production 3DS2 access on your account. --- Source: https://www.artspay.com/docs/developer/3ds2-integration/3ds2-outcomes # 3DS2 Outcomes *3DS2 events can result in a variety of outcomes* | Outcome | Description | | :--------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Frictionless | Customer is not made aware of the successful 3DS2 event. | | Challenged | The customer is challenged to prove legitimate access to the payment method. A pop up window is displayed to the customer, asking them to authenticate their credentials. This is usually completed via SMS. | | Unsuccessful | Rejected by the issuer | | Unavailable | 3DS2 service is unavailable or the merchant has not been registered correctly for 3DS2. | | Abandoned | The customer has abandoned their 3DS authentication by failing to enter in the passcode and navigating away or letting the session timeout. | | Rejected | Authentication rejected by the issuer. | | Invalid Scenario | This can occur when an older version of 3DS is used by the card issuer. | --- Source: https://www.artspay.com/docs/api/gateway/structure-of-response-objects # Structure of response objects All Fat Zebra API responses share the same top level syntax. This lays out the response object, whether the operation was successful or if any errors were received. | Field | Type | Description | | --- | --- | --- | | `successful` | Boolean | Defines whether the request was valid | | `response` | Object/Array | The scalar or vector serialization of records, depending on the context of the request | | `errors` | Array of strings | List of errors encountered when processing the request | | `test` | Boolean | Indicates whether or not the request was made in test mode | Additionally, endpoints that list entities add the following fields to facilitate the paging of results. | Field | Type | Description | | --- | --- | --- | | `records` | Number | The sum of records returned | | `total_records` | Number | Total number of records to iterate through | | `page` | Number | The current page rendered in the result set | | `total_pages` | Number | Total number of pages to iterate through | Each of the sections describing API methods will assume this format and describes the body of the `response` field. --- Source: https://www.artspay.com/docs/api/gateway/purchases # Purchases A purchase represents a capture, authorization or void against a payment method. ### Purchase ### Response format | Field | Type | Description | | --- | --- | --- | | `authorization` | String | Authorization number | | `id` | String | Id of the purchase | | `card_number` | String | The obfuscated card number | | `card_holder` | String | The name of the card holder | | `card_expiry` | String / Date YYYY-MM-DD | The expiry date of the card | | `card_token` | String | A token representing the saved credit card | | `card_type` | String | Scheme of the card | | `card_category` | String | Type of the card: credit or debit | | `card_subcategory` | String | The subcategory of the card | | `amount` | Integer | Amount of the purchase in the smallest unit for the currency e.g. cents | | `decimal_amount` | Float | Amount of the purchase as a decimal | | `successful` | Boolean | If the operation was successful or not | | `message` | String | A message giving context to the outcome of the request | | `reference` | String | A unique reference from the switch | | `currency` | String / ISO 4217 | The currency of the purchase | | `transaction_id` | String | A unique reference for each action against a purchase | | `settlement_date` | String / Date YYYY-MM-DD | The date of settlement | | `transaction_date` | String / Date ISO 8601 | The date the transaction was created | | `response_code` | String | The response code received from the switch | | `captured` | Boolean | Whether the purchase was partly or fully captured | | `captured_amount` | Integer | Amount captured in the smallest unit for the currency e.g. cents | | `rrn` | String | The receipt number of the purchase | | `cvv_match` | String | Whether the CVV match status from the issuer. Possible values are:
• M - Matched
• Y - Matched
• N - Not Matched
• P - Not Processed
• S - Suspicious
• U - Unknown (response from network unclear)
Merchants should use this to determine whether they are comfortable processing risky transactions. | | `avs_result_code` | Integer | Indicates the result of the AVS check if AVS fields were provided.
Refer to the [documentation on AVS](https://www.artspay.com/docs/developer/purchases/avs) for more details. | | `metadata` | Object | Metadata of the purchase | | `addendum_data` | Object | Addendum data of the purchase. Described below. | | `merchant_advice_code` | String | Advice code for how merchants should retry failed transactions. Only present when a transaction is declined. Details on the possible codes are documented [Merchant Advice Codes (Retries)](https://www.artspay.com/docs/developer/purchases/merchant-advice-codes-retries) | ### Metadata Some switching paths and acquirers will return additional data that can be found in the `metadata` field of a purchase response. This includes: | Metadata Field | Type | Description | | --- | --- | --- | | `authorization_tracking_id` | String | An ID returned by the card scheme, best practice is to present this field on subsequent recurring or instalment transactions.
Note that if this is not provided in any wallet transactions, the transaction will be rejected. For example [Apple Pay recurring or installment transactions](https://www.artspay.com/docs/developer/card-on-file/recurring-instalment-payments). | | `card_sequence_number` | String | A number indicating the sequence number of the card presented in the transaction | | `least_cost_routed` | Boolean | Indicates if the transaction was least cost routed via the Debit network.
Only applicable to transactions using a dual branded card and routed via specific switches.
Please note that this field may return one of three values:
• `true`: the transaction was least cost routed
• `false`: the switch used supports least cost routing, but the transaction was not eligible for least cost routing
• Key not present: the switch used does not support least cost routing | ### Addendum Data For some switching paths and acquirers it may be possible to include addendum data which is passed onto the card issuer - this is primarily used for corporate purchasing cards, American Express cards etc. To include this data with your transactions the field `addendum_data` should be added to the request payload with the appropriate data payload for the transaction type included - these different payload types are detailed below. If addendum data was presented with the original transaction (such as for a pre-auth) the data will be merged, with the most recent data overwriting the older data. #### Corporate Purchasing Level 2 Data Level 2 data for corporate purchase cards may be included which can detail the order reference, purchase order numbers, line item details etc. | Field | Type | Description | | :-------------------------------- | :--------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------- | | `cardmember_reference` | String. Max length: 20. Alphanumeric and Spaces only | The card member's reference number, such as a store order number or customer PO Number | | `description_1` - `description_4` | String. Max length: 40. Alphanumeric and Spaces only | The description for up to four line items. These should be descriptive and avoid generic terms such as 'Merchandise' | | `quantity_1` - `quantity_4` | Unsigned integer. Maximum value: 999. | The quantity of items for the line items | | `total_1` - `total_4` | Unsigned integer. Maximum value: 99999. | The total for the line item as a whole number in the smallest unit (e.g. $155.60 will be 15560) | | `shipping_postcode` | String. Max length: 15. Alphanumeric and Spaces only | The post code for the shipping address | ##### Example ```json { "corp_l2": { "cardmember_reference": "ORD 123456 PO 08789", "description_1": "Box of paper", "quantity_1": 5, "total_1": 5000, "description_2": "Pencils", "quantity_2": 10, "total_2": 1000, "description_3": "Pens", "quantity_3": 10, "total_3": 1500, "description_4": "White Out", "quantity_4": 1, "total_4": 500, "shipping_postcode": "EC1A 1AA" } } ``` --- Source: https://www.artspay.com/docs/api/gateway/purchases/create-a-purchase # Create a purchase ## Endpoint `POST /purchases` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `create-a-purchase-with-fraud-screening-1` ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `amount` | integer (int32) | yes | A positive integer representing how much to charge, in the smallest currency unit (eg., 100 to charge $1.00, or 100 to Charge ¥100, a zero decimal currency) | | `reference` | string | yes | Reference of the transaction. Max length 255 characters. | | `customer_ip` | string | yes | RFC791-compliant IP address | | `currency` | string | yes | Three letter [ISO currency code](https://pmnts.readme.io/v1.0/docs/iso-currency-codes-1), in UPPERCASE Default: `AUD` | | `card_number` | string | yes | Card number | | `card_holder` | string | yes | Name of the card holder | | `card_expiry` | string | yes | Format: `MM/YYYY` | | `card_token` | string | no | | | `cvv` | string | no | CVV card number. (3/4 characters) | | `metadata` | object | no | | | `addendum_data` | string | no | | | `fraud` | object | no | | | `fraud.device_id` | string | yes | The fraud screening service device fingerprint ID. See the Device ID section below for further details | | `fraud.device` | object | yes | | | `fraud.device.uid` | string | yes | The device identifier such as IMEI in android or identifier for vendor in iOS. Maximum length is 128 characters. | | `fraud.device.os_type` | string | no | The operating system running on the user's device (relevant for native app only). For example: android, ios, etc | | `fraud.device.app_version` | string | no | The version of the merchant application which is running on the user's device. Maximum length is 50 characters. For example: '2.0.1' | | `fraud.device.brand` | string | no | The user's device brand (relevant for native app only). For example: htc, apple, etc | | `fraud.device.model` | string | no | The model of the user's device (relevant for native app only) Maximum length is 50 characters. For example: 'iPhone X', 'Galaxy 3'. | | `fraud.customer` | object | yes | Details about the customer | | `fraud.customer.first_name` | string | yes | The customer's first name | | `fraud.customer.last_name` | string | yes | The customer's last name | | `fraud.customer.email` | string | yes | The customer's email address | | `fraud.customer.date_of_birth` | string (date) | no | The customer's date of birth, if available | | `fraud.customer.id` | string | no | The customer record ID in the merchant database, if available | | `fraud.customer.address_1` | string | yes | The customer's primary address line | | `fraud.customer.address_2` | string | no | The customer's secondary address line (such as building name) | | `fraud.customer.city` | string | yes | The customer's city | | `fraud.customer.state` | string | yes | The customer's state | | `fraud.customer.post_code` | string | yes | The customer's post code | | `fraud.customer.country` | string | yes | The ISO 8166 alpha-3 country code for the customer | | `fraud.customer.existing_customer` | boolean | no | Indicates if this customer is already in the merchants records or not | | `fraud.customer.created_at` | string (date) | no | The date/time that the customer record was created | | `fraud.customer.home_phone` | string | no | The customer's primary phone number. This can be a mobile number, if a home phone number is not provided. Required field for Forter. | | `fraud.shipping_address` | object | no | | | `fraud.shipping_address.first_name` | string | yes | The shipping address first name | | `fraud.shipping_address.last_name` | string | yes | The shipping address last name | | `fraud.shipping_address.email` | string | yes | The shipping address email | | `fraud.shipping_address.home_phone` | string | yes | The shipping address phone number | | `fraud.shipping_address.address_1` | string | yes | The shipping address primary address line | | `fraud.shipping_address.address_2` | string | no | The shipping address secondary address line (such as building name) | | `fraud.shipping_address.city` | string | yes | The shipping address city or suburb | | `fraud.shipping_address.state` | string | yes | The shipping address state | | `fraud.shipping_address.post_code` | string | yes | The shipping address post code | | `fraud.shipping_address.country` | string | yes | The ISO 3166 alpha-3 country code for the shipping address | | `fraud.shipping_address.shipping_method` | string | yes | 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. | | `fraud.recipients` | array of objects | yes | Recipients are only required if the recipient differs from the shipping address, or if the order is being multi-shipped | | `fraud.recipients[0].title` | string | yes | The recipient title/salutation (e.g. Mr, Mrs, Dr) | | `fraud.recipients[0].first_name` | string | yes | The recipients first name | | `fraud.recipients[0].last_name` | string | yes | The recipients last name | | `fraud.recipients[0].email` | string | yes | The recipients email address | | `fraud.recipients[0].address_1` | string | yes | The recipients primary address line | | `fraud.recipients[0].address_2` | string | no | The recipients secondary address line (such as building name) | | `fraud.recipients[0].city` | string | yes | The recipients city or suburb | | `fraud.recipients[0].state` | string | yes | The recipients state | | `fraud.recipients[0].post_code` | string | yes | The recipients post code | | `fraud.recipients[0].country` | string | yes | The recipients country code - ISO 3166 alpha-3 | | `fraud.recipients[0].phone_number` | string | no | The recipients phone number | | `fraud.items` | array of objects | yes | | | `fraud.items[0].product_code` | string | yes | The product code (base level product code) | | `fraud.items[0].sku` | string | no | The product SKU (the stock keeping unit code, for example size/color variants) | | `fraud.items[0].description` | string | yes | 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 | | `fraud.items[0].qty` | integer (int32) | yes | The quantity of items ordered | | `fraud.items[0].cost` | number (double) | yes | The base-cost for the product | | `fraud.items[0].line_total` | number (double) | yes | The line total for the product (cost times quantity) | | `fraud.items[0].tracking_number` | string | no | The shipping tracking number for this item | | `fraud.items[0].gift_message` | string | no | Addendum product description, or gift message | | `fraud.items[0].part_number` | string | no | The manufacturers part number (if applicable) | | `fraud.items[0].shipping_comments` | string | no | Any comments for shipping of the item | | `fraud.custom` | object | no | | | `fraud.custom.x` | string | no | 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. | | `fraud.website` | string | yes | The URL for the website where the order is being placed. | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d' { "card_holder": "Jim Smith", "card_number": "5123456789012346", "card_expiry": "05/2023", "cvv": "987", "amount": 1000, "reference": "fd792da68ea1b8a1ba791zzzfc6f73b4", "customer_ip": "111.222.111.123", "currency": "USD", "fraud": { "device_id": "04003h...truncated...y16eGlPDmAXrXEYZfU=", "device": { "uid": "625400941054585", "os_type": "android", "app_version": "2.1", "brand": "Samsung", "model": "Galaxy 3" }, "customer": { "address_1": "23 Smith Road", "city": "Canberra", "country": "AUS", "created_at": "2014-05-28T21:38:51+11:00", "date_of_birth": "1994-05-28", "email": "deny@email.com", "existing_customer": true, "first_name": "James", "home_phone": "0421858999", "id": "ABD123", "last_name": "Smith", "post_code": "2600" }, "items": [ { "cost": 23.3, "description": "Widgets", "line_total": 23.3, "product_code": "9999-A", "qty": 1, "sku": "9999" } ], "recipients": [ { "address_1": "1 Fairfield Road", "city": "Austin", "country": "USA", "email": "james@smith.com", "first_name": "James", "last_name": "Smith", "phone_number": "555-555-55555", "post_code": "55555-1234", "state": "TX" } ], "shipping_address": { "first_name": "James", "last_name": "Smith", "email": "deny@email.com", "home_phone": "0421858999", "address_1": "23 Smith Road", "city": "Canberra", "country": "AUS", "state": "NSW", "post_code": "2600", "shipping_method": "express" }, "custom": { "3": "Facebook" }, "website": "http://www.website.com" } }' ``` ### Example responses #### 200 (Fraud Declined) ```json { "successful": true, "response": { "authorization": "0", "id": "071-P-RHN5DC15", "card_number": "512345XXXXXX2346", "card_holder": "Jim Smith", "card_expiry": "2023-05-31", "card_token": "pfjeiyx4fk0uko3ev4kd", "card_type": "MasterCard", "card_category": "Credit", "card_subcategory": "Standard", "amount": 1000, "decimal_amount": 10.0, "successful": false, "message": "Declined.", "reference": "Ud5CfaAlwTKJi2kfsAesdAwvIk2fpJjP", "currency": "USD", "transaction_id": "071-P-RHN5DC15", "settlement_date": null, "transaction_date": "2018-10-09T14:01:06+11:00", "response_code": "01", "captured": false, "captured_amount": null, "rrn": "0", "cvv_match": "U", "metadata": {}, "addendum_data": {}, "fraud_result": "Deny", "fraud_messages": [ "An attribute associated with an Order matched a pre-configured 'Always Deny' rule." ] }, "errors": [], "test": true } ``` --- Source: https://www.artspay.com/docs/api/gateway/purchases/create-a-purchase-using-wallet-passthrough # Create a purchase using a wallet passthrough ### The wallet passthrough object This payload allows a vaulted wallet credential to be decryped and passed to FatZebra to be used for transactions. Currently supported passthrough wallets are ApplePay and GooglePay. The wallet object should be supplied, including the wallet type and cryptogram, to ensure the correct switch settings are applied. The card and transactions details should be applied using the decrypted wallet details. The wallet object for a passthrough transaction **must** contain: * type, currently supported values: * `passthrough_apple_pay` for ApplePay wallets * `passthrough_google_pay` for GooglePay wallets * Cryptogram - decrypted from the wallet The SLI indicator **should** be provided in the extra field. This will be based on the eciIndicator in the decrypted payment data for the initial transaction - usually '05' and for subsequent merchant initiated transactions without the token this should be '07'. Other fields may be applied as per standard purchase field.
> BIN blocking based on county of origin will not be performed when using network token passthrough. > > As the underlying instrument is not provided, and the network token submitted may have been generated with a BIN that corresponds to a foreign institution, BIN blocking can not be applied to transactions using network token passthrough.
> SLI should be provided > > The SLI should be provided in the extra object to ensure the wallet is correctly processed by the switch. > > For ApplePay transactions, this value will be the eciIndicator in the payment data element. For Google pay transactions, this will be the eciIndicator value in the payment method details element. > > In the case of subsequent transactions being provided without the cryptogram and a reference to a previous transaction, this value should be provided as 7 ## Endpoint `POST /purchases/ ​​` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `create-a-purchase-using-wallet-passthrough` ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `amount` | integer (int32) | yes | A positive integer representing how much to charge, in the smallest currency unit (eg., 100 to charge $1.00, or 100 to Charge ¥100, a zero decimal currency) | | `reference` | string | yes | Reference of the transaction. Max length 255 characters. | | `customer_ip` | string | yes | RFC791-compliant IP address | | `currency` | string | yes | Three letter [ISO currency code](https://pmnts.readme.io/v1.0/docs/iso-currency-codes-1), in UPPERCASE Default: `AUD` | | `card_number` | string | yes | Card number decrypted from apple pay wallet | | `card_holder` | string | yes | 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` | string | no | The card expiry decrypted from wallet - format: `MM/YYYY` | | `wallet` | object | no | Wallet details including type and cryptogram (CAVV) | | `wallet.type` | string | yes | The type of wallet being passed through (currently support 'passthrough_apple_pay' or 'passthrough_google_pay') | | `wallet.cryptogram` | string | no | Required for ApplePay wallet transactions, optional for GooglePay. This is the cryptogram for the transaction. | | `test` | boolean | no | Indicates if this is a test transaction Default: `false` | | `metadata` | object | no | | | `addendum_data` | string | no | | | `capture` | boolean | no | | | `extra` | object | no | | | `extra.ecm` | string | no | 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` | | `extra.sli` | string | no | The Security Level Indicator. This should match the eciIndicator value of the payment data in the decrypted payload. | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d' { "card_number": "55555555555555555", "card_holder": "Valued Cardholder", "card_expiry": "02/2027", "customer_ip": "127.0.0.1", "reference": "abcsd1234", "amount": 110, "currency": "AUD", "capture": true, "wallet": { "type": "passthrough_apple_pay", "cryptogram": "aaabbbcccddd111222333444=" }, "extra": { "sli":"05" }, }' ``` ### Example responses #### 200 (cURL - Scheme token or Fatzebra card token) ```json { "successful": true, "response": { "authorization": "295229", "id": "071-P-HEJJINFO", "card_number": "555555XXXXXX5555", "card_holder": "Valued Cardholder", "card_expiry": "2027-02-28", "card_token": "qwer9876", "card_type": "MasterCard", "card_category": "Credit", "card_subcategory": "Standard", "amount": 110, "decimal_amount": 1.1, "successful": true, "message": "Approved", "reference": "fd792da68ea1b8a1ba791a0efc6f73b4", "currency": "USD", "transaction_id": "071-P-HEJJINFO", "settlement_date": "2018-07-06", "transaction_date": "2018-07-06T10:31:05+10:00", "response_code": "00", "captured": true, "captured_amount": 110, "rrn": "071PHEJJINFO", "cvv_match": "M", "metadata": {}, "addendum_data": {} }, "errors": [], "test": true } ``` #### 400 (Result) ```json { "successful": false, "response": { "authorization": null, "id": "071-P-QE2I2PCW", "card_number": "512345XXXXXX2346", "card_holder": "Jim Smith", "card_expiry": "2030-02-28", "card_token": "fke86c5u", "card_type": "MasterCard", "card_category": "Credit", "card_subcategory": "Standard", "amount": 10000, "decimal_amount": 100.0, "successful": false, "message": null, "reference": "da5d16122b831b468090a7adaf68758e", "currency": "XXX", "transaction_id": "071-P-QE2I2PCW", "settlement_date": null, "transaction_date": null, "response_code": "99", "captured": false, "captured_amount": null, "rrn": null, "cvv_match": "U", "metadata": {}, "addendum_data": null }, "errors": ["Currency XXX is not valid for this merchant. Permitted currencies: USD,AUD,NZD,GBP"] } ``` --- Source: https://www.artspay.com/docs/api/gateway/purchases/create-a-purchase-with-wallet/create-a-purchase-using-a-wallet # Create a purchase using a wallet ### The wallet request object The credentials required to make payments with a particular wallet provider vary according to the provider used. The `type` field in the wallet object determines which provider syntax is used. Currently, supported wallets are: * Apple Pay * Google Pay ### Apple Pay | Field | Type | Description | | :-------------------- | :------------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | String. For Apple Pay, the value will be `APPLE`, or `APPLEPAYWEB` if using Apple Pay on the Web. | Wallet provider identifier | | `token` | Object | | | `token.paymentData` | Object | Data format is specified by the latest [Apple Pay documentation](https://developer.apple.com/library/archive/documentation/PassKit/Reference/PaymentTokenJSON/PaymentTokenJSON.html#//apple_ref/doc/uid/TP40014929) | | `token.paymentMethod` | Object | The format is described in the latest [Apple Pay documentation](https://developer.apple.com/library/archive/documentation/PassKit/Reference/PaymentTokenJSON/PaymentTokenJSON.html#//apple_ref/doc/uid/TP40014929), but specifically [the ApplePayPaymentMethod page](https://developer.apple.com/documentation/applepayontheweb/applepaypaymentmethod).

**Required for Apple Pay over EFTPOS.** |
Apple Pay transactions over EFTPOS: * The value for `token.paymentMethod.network` must be `"eftpos"` (case-insensitive) to have the transaction routed over EFTPOS. * When the transaction is successfully routed over EFTPOS, the response returned will include the `least_cost_routed` field (within the `metadata` field) with the value `"true"`.
### Google Pay | Field | Type | Description | | :------ | :------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `type` | String. For Google Pay, the value will be `GOOGLE` | Wallet provider identifier | | `token` | Object | Set this field to the object provided by the Google Pay API. This object will contains fields including `intermediateSigningKey`, `protocolVersion`, `signature`, and `signedMessage` | --- Source: https://www.artspay.com/docs/api/gateway/purchases/create-a-purchase-using-token-passthough # Create a purchase using a network token passthrough ### The cryptogram object Using a scheme token to transact a cryptogram must be provided for the first transaction. Subsequent transactions may provide the cryptogram if required. Fatzebra will save the the scheme token as a standard credit card record with a Fatzebra token, with a wallet type of 'Passthrough token'. Using the returned Fatzebra token, the cryptogram may be passed in. > BIN blocking based on county of origin will not be performed when using network token passthrough. > > As the underlying instrument is not provided, and the network token submitted may have been generated with a BIN that corresponds to a foreign institution, BIN blocking can not be applied to transactions using network token passthrough. ## Endpoint `POST /purchases/ ​` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `create-a-purchase-using-token-passthough` ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `amount` | integer (int32) | yes | A positive integer representing how much to charge, in the smallest currency unit (eg., 100 to charge $1.00, or 100 to Charge ¥100, a zero decimal currency) | | `reference` | string | yes | Reference of the transaction. Max length 255 characters. | | `customer_ip` | string | yes | RFC791-compliant IP address | | `currency` | string | yes | Three letter [ISO currency code](https://pmnts.readme.io/v1.0/docs/iso-currency-codes-1), in UPPERCASE Default: `AUD` | | `card_number` | string | yes | DPAN or network scheme token | | `card_holder` | string | yes | Name of the card holder | | `card_expiry` | string | no | The token expiry - format: `MM/YYYY` | | `cryptogram` | string | no | Cryptogram value - 28 characters | | `network_eci` | string | no | ECI value associated with network cryptogram (required for VTS on MPGS only) Default: `07` | | `test` | boolean | no | Indicates if this is a test transaction Default: `false` | | `metadata` | object | no | | | `addendum_data` | string | no | | | `capture` | boolean | no | Indicates if this purchase should be captured (true), or authorized only (false). Defaults to true Default: `true` | | `extra` | object | no | | | `extra.ecm` | string | no | 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` | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d' { "card_number": "55555555555555555", "card_holder": "Valued Cardholder", "card_expiry": "02/2027", "customer_ip": "127.0.0.1", "reference": "abcsd1234", "amount": 110, "currency": "AUD", "capture": true, "cryptogram": "Aaaaaa111112222223333344444==" }' ``` ### Example responses #### 200 (cURL - Scheme token or Fatzebra card token) ```json { "successful": true, "response": { "authorization": "295229", "id": "071-P-HEJJINFO", "card_number": "555555XXXXXX5555", "card_holder": "Valued Cardholder", "card_expiry": "2027-02-28", "card_token": "qwer9876", "card_type": "MasterCard", "card_category": "Credit", "card_subcategory": "Standard", "amount": 110, "decimal_amount": 1.1, "successful": true, "message": "Approved", "reference": "fd792da68ea1b8a1ba791a0efc6f73b4", "currency": "USD", "transaction_id": "071-P-HEJJINFO", "settlement_date": "2018-07-06", "transaction_date": "2018-07-06T10:31:05+10:00", "response_code": "00", "captured": true, "captured_amount": 110, "rrn": "071PHEJJINFO", "cvv_match": "M", "metadata": {}, "addendum_data": {} }, "errors": [], "test": true } ``` #### 400 (Result) ```json { "successful": false, "response": { "authorization": null, "id": "071-P-QE2I2PCW", "card_number": "512345XXXXXX2346", "card_holder": "Jim Smith", "card_expiry": "2030-02-28", "card_token": "fke86c5u", "card_type": "MasterCard", "card_category": "Credit", "card_subcategory": "Standard", "amount": 10000, "decimal_amount": 100.0, "successful": false, "message": null, "reference": "da5d16122b831b468090a7adaf68758e", "currency": "XXX", "transaction_id": "071-P-QE2I2PCW", "settlement_date": null, "transaction_date": null, "response_code": "99", "captured": false, "captured_amount": null, "rrn": null, "cvv_match": "U", "metadata": {}, "addendum_data": null }, "errors": ["Currency XXX is not valid for this merchant. Permitted currencies: USD,AUD,NZD,GBP"] } ``` --- Source: https://www.artspay.com/docs/api/gateway/purchases/create-a-purchase-with-fraud-screening-1 # Create a purchase with fraud screening ## Data Notes If a value is to be omitted (e.g. has no value, doesn't apply to your systems) you should use null or not include the key/value in the payload.\ There are maximum length constraints on the values for fraud checks. If the value provided is greater then the allowed length the value will be truncated.\ In general strings must only contain the following characters: * a-z * A-Z * 0-9 * \- (hyphen) * \_ (underscore) * ' (single quote) * , (comma) * . (period) * ; (semi-colon) * : (colon) * space Exceptions to the above rule includes email addresses and Device ID ## Fraud Detection Strategy As a purchase can be made from either web browsers or mobile apps, different strategy is employed to defect fraudulent behaviour. If the purchase call is made from within the mobile app, you can specify a device object (see **Device** below) in the fraud payload. The object contains information about the physical device and application that a purchase takes place. On the other hand if the purchase is made from web browsers (desktop or mobile), you can provide the device\_id. See **Device ID**. **Important**\ Please note that you only need to provide either a device object or device id. An error will be returned if both are present in the fraud payload. ## Device Although UID is the only field marked as mandatory, it is highly recommended that you provide all the fields enclosed within the device object in order to the optimise fraudulent behaviours tracking. ## Device ID Fraud Screening uses Device ID, a customer fingerprinting technology to help accurately identify a customer regardless of where they are accessing a merchant website from. The use of Device ID is highly recommended as this assists in tracking fraudulent behaviour across multiple websites (the Device ID is specific to the customer's system, not the merchants website). To implement Device ID the following will need to be added to every page of the website: ```html ``` To test load the page where the script is included and then inspect the value of the field after a few seconds: ```javascript alert(document.getElementById('pmnts_id').value); ``` The field should be populated with a large amount of encoded data. In the checkout page capture the value of the `pmnts_id` field and submit this in the request to the Gateway. > Placement of Fingerprint Scripts > > It is important to ensure that this script is loaded on every page, to allow the fingerprinting scripts to accurately provide the customer interactions with your website. If you only add this script to your checkout page you may be impacted by incomplete data or false positives. ## Customer IP Considerations When a payment request is sent one of the required fields is the customer\_ip which most commonly is retrieved from the REMOTE\_ADDR param of the server request (this is dependent on the framework being used to host the website). In cases where the website is behind a load balancer or proxies the true IP address will be of the last-hop server, and the original IP address will (if standards are being followed) be moved to the X-Forwarded-For header. In situations where there are multiple proxy hops before reaching the webserver this header may hold multiple IP addresses, separated with a comma and a space (e.g. X-Forwarded-For: 1.2.3.4, 99.98.99.1). In this case it is important that the IP address used is the first address from this set. The following example code can be used to extract the correct customer IP address from the request: ```php $customer_ip = $_SERVER['REMOTE_ADDR']; if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $forwarded_ips = explode(', ', $_SERVER['HTTP_X_FORWARDED_FOR']); $customer_ip = $forwarded_ips[0]; } ``` ## Testing General testing procedures for Fat Zebra still apply, however there are additional requirements for testing with Fraud Screening. The fraud screening has 3 different response types: **Accept**, **Challenge** and **Deny**. To simulate any of these responses use one of the following email addresses: | Email | Response | | :------------------------------------------------ | :----------------------------------------------------------- | | [accept@email.com](mailto:accept@email.com) | Fraud Check **Accepted**, transaction processed as normal | | [challenge@email.com](mailto:challenge@email.com) | Fraud Check **Challenge**, transaction processed as normal | | [deny@email.com](mailto:deny@email.com) | Fraud Check **Deny**, transaction declined and not processed | Testing with email addresses other then this may result in mixed results (for example transactions may be accepted at first but start receiving challenge responses and eventually deny responses as a result of velocity rules). Should you need to test email functionality within your integration simply get in touch with Fat Zebra and we can temporarily disable Fraud Screening for this account. An additional response type of Error may be returned if there is a problem processing the fraud request, including but not limited to invalid inputs or problems communicating with the fraud screening services. If this response is received the transaction will not be processed. If the request payload has been confirmed to meet the data type requirements details above and the Error response is still returned please contact support for further assistance. ## Endpoint `POST /purchases` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `create-a-purchase-with-fraud-screening-1` ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `amount` | integer (int32) | yes | A positive integer representing how much to charge, in the smallest currency unit (eg., 100 to charge $1.00, or 100 to Charge ¥100, a zero decimal currency) | | `reference` | string | yes | Reference of the transaction. Max length 255 characters. | | `customer_ip` | string | yes | RFC791-compliant IP address | | `currency` | string | yes | Three letter [ISO currency code](https://pmnts.readme.io/v1.0/docs/iso-currency-codes-1), in UPPERCASE Default: `AUD` | | `card_number` | string | yes | Card number | | `card_holder` | string | yes | Name of the card holder | | `card_expiry` | string | yes | Format: `MM/YYYY` | | `card_token` | string | no | | | `cvv` | string | no | CVV card number. (3/4 characters) | | `metadata` | object | no | | | `addendum_data` | string | no | | | `fraud` | object | no | | | `fraud.device_id` | string | yes | The fraud screening service device fingerprint ID. See the Device ID section below for further details | | `fraud.device` | object | yes | | | `fraud.device.uid` | string | yes | The device identifier such as IMEI in android or identifier for vendor in iOS. Maximum length is 128 characters. | | `fraud.device.os_type` | string | no | The operating system running on the user's device (relevant for native app only). For example: android, ios, etc | | `fraud.device.app_version` | string | no | The version of the merchant application which is running on the user's device. Maximum length is 50 characters. For example: '2.0.1' | | `fraud.device.brand` | string | no | The user's device brand (relevant for native app only). For example: htc, apple, etc | | `fraud.device.model` | string | no | The model of the user's device (relevant for native app only) Maximum length is 50 characters. For example: 'iPhone X', 'Galaxy 3'. | | `fraud.customer` | object | yes | Details about the customer | | `fraud.customer.first_name` | string | yes | The customer's first name | | `fraud.customer.last_name` | string | yes | The customer's last name | | `fraud.customer.email` | string | yes | The customer's email address | | `fraud.customer.date_of_birth` | string (date) | no | The customer's date of birth, if available | | `fraud.customer.id` | string | no | The customer record ID in the merchant database, if available | | `fraud.customer.address_1` | string | yes | The customer's primary address line | | `fraud.customer.address_2` | string | no | The customer's secondary address line (such as building name) | | `fraud.customer.city` | string | yes | The customer's city | | `fraud.customer.state` | string | yes | The customer's state | | `fraud.customer.post_code` | string | yes | The customer's post code | | `fraud.customer.country` | string | yes | The ISO 8166 alpha-3 country code for the customer | | `fraud.customer.existing_customer` | boolean | no | Indicates if this customer is already in the merchants records or not | | `fraud.customer.created_at` | string (date) | no | The date/time that the customer record was created | | `fraud.customer.home_phone` | string | no | The customer's primary phone number. This can be a mobile number, if a home phone number is not provided. Required field for Forter. | | `fraud.shipping_address` | object | no | | | `fraud.shipping_address.first_name` | string | yes | The shipping address first name | | `fraud.shipping_address.last_name` | string | yes | The shipping address last name | | `fraud.shipping_address.email` | string | yes | The shipping address email | | `fraud.shipping_address.home_phone` | string | yes | The shipping address phone number | | `fraud.shipping_address.address_1` | string | yes | The shipping address primary address line | | `fraud.shipping_address.address_2` | string | no | The shipping address secondary address line (such as building name) | | `fraud.shipping_address.city` | string | yes | The shipping address city or suburb | | `fraud.shipping_address.state` | string | yes | The shipping address state | | `fraud.shipping_address.post_code` | string | yes | The shipping address post code | | `fraud.shipping_address.country` | string | yes | The ISO 3166 alpha-3 country code for the shipping address | | `fraud.shipping_address.shipping_method` | string | yes | 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. | | `fraud.recipients` | array of objects | yes | Recipients are only required if the recipient differs from the shipping address, or if the order is being multi-shipped | | `fraud.recipients[0].title` | string | yes | The recipient title/salutation (e.g. Mr, Mrs, Dr) | | `fraud.recipients[0].first_name` | string | yes | The recipients first name | | `fraud.recipients[0].last_name` | string | yes | The recipients last name | | `fraud.recipients[0].email` | string | yes | The recipients email address | | `fraud.recipients[0].address_1` | string | yes | The recipients primary address line | | `fraud.recipients[0].address_2` | string | no | The recipients secondary address line (such as building name) | | `fraud.recipients[0].city` | string | yes | The recipients city or suburb | | `fraud.recipients[0].state` | string | yes | The recipients state | | `fraud.recipients[0].post_code` | string | yes | The recipients post code | | `fraud.recipients[0].country` | string | yes | The recipients country code - ISO 3166 alpha-3 | | `fraud.recipients[0].phone_number` | string | no | The recipients phone number | | `fraud.items` | array of objects | yes | | | `fraud.items[0].product_code` | string | yes | The product code (base level product code) | | `fraud.items[0].sku` | string | no | The product SKU (the stock keeping unit code, for example size/color variants) | | `fraud.items[0].description` | string | yes | 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 | | `fraud.items[0].qty` | integer (int32) | yes | The quantity of items ordered | | `fraud.items[0].cost` | number (double) | yes | The base-cost for the product | | `fraud.items[0].line_total` | number (double) | yes | The line total for the product (cost times quantity) | | `fraud.items[0].tracking_number` | string | no | The shipping tracking number for this item | | `fraud.items[0].gift_message` | string | no | Addendum product description, or gift message | | `fraud.items[0].part_number` | string | no | The manufacturers part number (if applicable) | | `fraud.items[0].shipping_comments` | string | no | Any comments for shipping of the item | | `fraud.custom` | object | no | | | `fraud.custom.x` | string | no | 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. | | `fraud.website` | string | yes | The URL for the website where the order is being placed. | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d' { "card_holder": "Jim Smith", "card_number": "5123456789012346", "card_expiry": "05/2023", "cvv": "987", "amount": 1000, "reference": "fd792da68ea1b8a1ba791zzzfc6f73b4", "customer_ip": "111.222.111.123", "currency": "USD", "fraud": { "device_id": "04003h...truncated...y16eGlPDmAXrXEYZfU=", "device": { "uid": "625400941054585", "os_type": "android", "app_version": "2.1", "brand": "Samsung", "model": "Galaxy 3" }, "customer": { "address_1": "23 Smith Road", "city": "Canberra", "country": "AUS", "created_at": "2014-05-28T21:38:51+11:00", "date_of_birth": "1994-05-28", "email": "deny@email.com", "existing_customer": true, "first_name": "James", "home_phone": "0421858999", "id": "ABD123", "last_name": "Smith", "post_code": "2600" }, "items": [ { "cost": 23.3, "description": "Widgets", "line_total": 23.3, "product_code": "9999-A", "qty": 1, "sku": "9999" } ], "recipients": [ { "address_1": "1 Fairfield Road", "city": "Austin", "country": "USA", "email": "james@smith.com", "first_name": "James", "last_name": "Smith", "phone_number": "555-555-55555", "post_code": "55555-1234", "state": "TX" } ], "shipping_address": { "first_name": "James", "last_name": "Smith", "email": "deny@email.com", "home_phone": "0421858999", "address_1": "23 Smith Road", "city": "Canberra", "country": "AUS", "state": "NSW", "post_code": "2600", "shipping_method": "express" }, "custom": { "3": "Facebook" }, "website": "http://www.website.com" } }' ``` ### Example responses #### 200 (Fraud Declined) ```json { "successful": true, "response": { "authorization": "0", "id": "071-P-RHN5DC15", "card_number": "512345XXXXXX2346", "card_holder": "Jim Smith", "card_expiry": "2023-05-31", "card_token": "pfjeiyx4fk0uko3ev4kd", "card_type": "MasterCard", "card_category": "Credit", "card_subcategory": "Standard", "amount": 1000, "decimal_amount": 10.0, "successful": false, "message": "Declined.", "reference": "Ud5CfaAlwTKJi2kfsAesdAwvIk2fpJjP", "currency": "USD", "transaction_id": "071-P-RHN5DC15", "settlement_date": null, "transaction_date": "2018-10-09T14:01:06+11:00", "response_code": "01", "captured": false, "captured_amount": null, "rrn": "0", "cvv_match": "U", "metadata": {}, "addendum_data": {}, "fraud_result": "Deny", "fraud_messages": [ "An attribute associated with an Order matched a pre-configured 'Always Deny' rule." ] }, "errors": [], "test": true } ``` --- Source: https://www.artspay.com/docs/api/gateway/purchases/create-a-purchase-with-a-token-1 # Create a purchase with a token ## Endpoint `POST /purchases/ ​​​` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `create-a-purchase-with-a-token-1` ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `amount` | integer (int32) | yes | A positive integer representing how much to charge, in the smallest currency unit (eg., 100 to charge $1.00, or 100 to Charge ¥100, a zero decimal currency) | | `reference` | string | yes | Reference of the transaction. Max length 255 characters. | | `customer_ip` | string | yes | RFC791-compliant IP address | | `currency` | string | yes | Three letter [ISO currency code](https://pmnts.readme.io/v1.0/docs/iso-currency-codes-1), in UPPERCASE Default: `AUD` | | `card_token` | string | yes | Card token | | `test` | boolean | no | Indicates if this is a test transaction Default: `false` | | `metadata` | object | no | | | `addendum_data` | string | no | | | `billing_address` | object | no | | | `billing_address.address` | string | no | | | `billing_address.postcode` | string | no | | | `billing_address.email` | string | no | | | `extra` | object | no | | | `extra.ecm` | string | no | 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` | | `extra.sli` | string | no | The Security Level Indicator for 3DS transactions (from the MPI) | | `extra.xid` | string | no | The transaction ID (XID) value of a 3D Secure authenticated transaction (from the MPI) | | `extra.cavv` | string | no | The transaction ID (XID) value of a 3D Secure authenticated transaction (from the MPI) | | `extra.par` | string | no | The Payer Request result for a 3D Secure transaction (from the MPI) | | `extra.ver` | string | no | The Verification Request result for a 3D Secure transaction (from the MPI) | | `extra.threeds_version` | string | no | This presents the 3D Secure version used for this transaction. Examples are: '1.0.0', '2.0.0' etc. (from the MPI) | | `extra.directory_server_txn_id` | string | no | This is the unique identifier for a 3D Secure version 2 transaction. (from the MPI) | | `extra.card_on_file` | boolean | no | 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` | | `extra.auth_reason` | string | no | 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'. | | `extra.stored_credential_indicator` | string | no | 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. | | `extra.authorization_tracking_id` | string | no | 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. | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d' { "amount": 1000, "reference": "oiuwiouwxmnx23", "customer_ip": "111.222.111.123", "currency": "USD", "card_token": "syupxv5b1tqv4bqdsazr" }' ``` ### Example responses #### 200 (Result) ```json { "successful":true, "response":{ "authorization":"468422", "id":"071-P-97AG1LA1", "card_number":"424242XXXXXX4242", "card_holder":"Client Name", "card_expiry":"2022-12-31", "card_token":"syupxv5b1tqv4bqdsazr", "card_type":"VISA", "card_category":"Credit", "card_subcategory":"Credit", "amount":1000, "decimal_amount":10.0, "successful":true, "message":"Approved", "reference":"oiuwiouwxmnx23", "currency":"USD", "transaction_id":"071-P-97AG1LA1", "settlement_date":"2018-11-22", "transaction_date":"2018-11-22T14:10:44+11:00", "response_code":"00", "captured":true, "captured_amount":1000, "rrn":"071P97AG1LA1", "cvv_match":"M", "metadata":{}, "addendum_data":{} }, "errors":[], "test":true } ``` --- Source: https://www.artspay.com/docs/api/gateway/purchases/create-an-authorization # Create an authorization > Limited Acquirer Support > > Functionality such as marking an authorization as Final or Partial are currently only supported by a handful of Australian acquirers, including Westpac and FDMS (First Data Merchant Services (also known as Fiserv)). If these methods are used where support is not yet available the transactions may be declined or return errors. ## Endpoint `POST /purchases/ ​​​​​` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `create-an-authorization` ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `amount` | integer (int32) | yes | Amount of the purchase in cent. Required on create | | `reference` | string | yes | Reference of the transaction, required on create. Max length 255 characters. | | `customer_ip` | string | yes | RFC791-compliant IP address | | `currency` | string | yes | Three letter [ISO currency code](https://pmnts.readme.io/v1.0/docs/iso-currency-codes-1), in UPPERCASE Default: `AUD` | | `card_number` | string | no | Required on create, unless you provide a `card_token` or a `wallet` object | | `card_holder` | string | no | Name of the card holder | | `card_expiry` | string | no | Format: `MM/YYYY` Required on create, unless you provide a `card_token` or a `wallet` object | | `card_token` | string | no | Required on create, unless you provide a `card_number` or a `wallet` object | | `cvv` | string | no | CVV card number. (3/4 characters) | | `test` | boolean | no | Indicates if this is a test transaction Default: `false` | | `wallet` | object | no | | | `wallet.type` | string | yes | Name of the wallet ('ApplePay', 'GooglePay') | | `wallet.encPaymentData` | string | no | required for type: VISA | | `wallet.encKey` | string | no | required for type: VISA | | `wallet.callid` | string | no | required for type: VISA | | `wallet.token` | string | no | required for type: APPLE, GOOGLE | | `wallet.user_id` | string | no | required for type: MASTERPASSEXPRESS | | `wallet.origin_url` | string | no | required for type: MASTERPASSEXPRESS | | `wallet.card_id` | string | no | required for type: MASTERPASSEXPRESS | | `wallet.address_id` | string | no | required for type: MASTERPASSEXPRESS | | `wallet.checkout_resource_url` | string | no | required for type: MASTERPASS | | `wallet.oauth_token` | string | no | required for type: MASTERPASS | | `wallet.oauth_verifier` | string | no | required for type: MASTERPASS | | `wallet.checkout_id` | string | no | required for type: ZIP_MONEY | | `wallet.account_id` | string | no | required for type: ZIP_MONEY | | `metadata` | object | no | | | `addendum_data` | string | no | | | `capture` | boolean | yes | Indicates if this purchase should be captured (true), or authorized only (false) Default: `true` | | `final` | boolean | no | 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` | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST -d' { "card_holder": "Jim Smith", "card_number": "5123456789012346", "card_expiry": "05/2023", "cvv": "987", "amount": 1000, "reference": "ORD98976", "customer_ip": "111.222.111.123", "currency": "USD", "capture": false, "final": false }' ``` ### Example responses #### 200 (Result) ```json { "successful": false, "response": { "authorization": null, "id": "071-P-QE2I2PCW", "card_number": "512345XXXXXX2346", "card_holder": "Jim Smith", "card_expiry": "2030-02-28", "card_token": "fke86c5u", "card_type": "MasterCard", "card_category": "Credit", "card_subcategory": "Standard", "amount": 1000, "decimal_amount": 10.0, "successful": false, "message": null, "reference": "da5d16122b831b468090a7adaf68758e", "currency": "XXX", "transaction_id": "071-P-QE2I2PCW", "settlement_date": null, "transaction_date": null, "response_code": "99", "captured": false, "captured_amount": null, "rrn": null, "cvv_match": "U", "metadata": {}, "addendum_data": null }, "errors": ["Currency XXX is not valid for this merchant. Permitted currencies: USD,AUD,NZD,GBP"] } ``` --- Source: https://www.artspay.com/docs/api/gateway/purchases/update-an-authorization # Update an authorization *Extend, increase authorized amount* > Limited Acquirer Support > > *Note*: Updating authorization, such as extending authorization windows, amending authorization amounts and performing authorization completions is currently only supported by a handful of Australian acquirers, including Westpac and FDMS (First Data Merchant Services). If these methods are used where support is not yet available the transactions may be declined or return errors. ## Endpoint `PUT /purchases/{id}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `update-an-authorization` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | path | string | yes | id of the purchase | ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `amount` | integer (int32) | no | The new amount for the authorisation (where the amount is being increased from the original authorized value) | | `metadata` | string | no | | | `extend` | boolean | no | Indicates if an authorization extension should be processed Default: `false` | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/purchases/{id} -XPUT -u TEST:TEST -d' { "amount": 10100 }' ``` ### Example responses #### 200 (Result) ```json { "successful": false, "response": { "authorization": "573449", "id": "071-P-Y7HDHLT7", "card_number": "512345XXXXXX2346", "card_holder": "Matthew Savage", "card_expiry": "2030-02-28", "card_token": "fke8n73t", "card_type": "MasterCard", "card_category": "Credit", "card_subcategory": "Standard", "amount": 10000, "decimal_amount": 100.0, "successful": true, "message": "Approved", "reference": "2c94f2337efe4e4b384a37a8d1e3515a", "currency": "AUD", "transaction_id": "071-P-Y7HDHLT7", "settlement_date": null, "transaction_date": "2017-11-30T11:18:09+11:00", "response_code": "00", "captured": false, "captured_amount": 0, "rrn": "071PY7HDHLT7", "cvv_match": "M", "metadata": {}, "addendum_data": {} }, "errors": ["Capture amount cannot be greater then the original authorised amount"] } ``` --- Source: https://www.artspay.com/docs/api/gateway/purchases/capture-an-authorization # Capture an authorization *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.* ## Endpoint `POST /purchases/{id}/capture` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `capture-an-authorization` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | path | string | yes | id of the purchase | ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `amount` | integer (int32) | yes | Amount of the purchase in the smallest unit of for the currency. | | `metadata` | object | no | | | `addendum_data` | object | no | | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/purchases/071-P-18DBFFCO/capture -u TEST:TEST -d' { "amount": 1000 }' ``` ### Example responses #### 200 (Result) ```json { "successful": false, "response": { "authorization": "573449", "id": "071-P-Y7HDHLT7", "card_number": "512345XXXXXX2346", "card_holder": "Matthew Savage", "card_expiry": "2030-02-28", "card_token": "fke8n73t", "card_type": "MasterCard", "card_category": "Credit", "card_subcategory": "Standard", "amount": 10000, "decimal_amount": 100.0, "successful": true, "message": "Approved", "reference": "2c94f2337efe4e4b384a37a8d1e3515a", "currency": "AUD", "transaction_id": "071-P-Y7HDHLT7", "settlement_date": null, "transaction_date": "2017-11-30T11:18:09+11:00", "response_code": "00", "captured": false, "captured_amount": 0, "rrn": "071PY7HDHLT7", "cvv_match": "M", "metadata": {}, "addendum_data": {} }, "errors": ["Capture amount cannot be greater then the original authorised amount"] } ``` --- Source: https://www.artspay.com/docs/api/gateway/purchases/release-an-authorization # Release an authorization *Void an authorization partially or completely* > Limited Acquirer Support > > *Note*: Updating authorization, such as extending authorization windows, amending authorization amounts and performing authorization completions is currently only supported by a handful of Australian acquirers, including Westpac and FDMS (First Data Merchant Services). If these methods are used where support is not yet available the transactions may be declined or return errors. ## Endpoint `DELETE /purchases/{id}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `release-an-authorization` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | path | string | yes | id of the purchase | ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `amount` | integer (int32) | no | 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. | | `metadata` | string | no | | | `extend` | boolean | no | Indicates if an authorization extension should be processed Default: `false` | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/purchases/{id} -XDELETE -u TEST:TEST -d' { "amount": 5000 }' ``` ### Example responses #### 200 (Result) ```json { "successful": false, "response": { "authorization": "573449", "id": "071-P-Y7HDHLT7", "card_number": "512345XXXXXX2346", "card_holder": "Matthew Savage", "card_expiry": "2030-02-28", "card_token": "fke8n73t", "card_type": "MasterCard", "card_category": "Credit", "card_subcategory": "Standard", "amount": 10000, "decimal_amount": 100.0, "successful": true, "message": "Approved", "reference": "2c94f2337efe4e4b384a37a8d1e3515a", "currency": "AUD", "transaction_id": "071-P-Y7HDHLT7", "settlement_date": null, "transaction_date": "2017-11-30T11:18:09+11:00", "response_code": "00", "captured": false, "captured_amount": 0, "rrn": "071PY7HDHLT7", "cvv_match": "M", "metadata": {}, "addendum_data": {} }, "errors": ["Capture amount cannot be greater then the original authorised amount"] } ``` --- Source: https://www.artspay.com/docs/api/gateway/purchases/void-a-purchase # Void a purchase ## Endpoint `POST /purchases/void?id={id}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `void-a-purchase` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | query | string | no | ID of the purchase to be voided | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/purchases/void\?id\=071-P-AK1MSTA2 -u TEST:TEST -X POST ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "authorization": "283293", "id": "071-P-AK1MSTA2", "card_number": "512345XXXXXX2346", "card_holder": "Jim Smith", "card_expiry": "2023-05-01", "card_token": "fke86c5u", "card_type": "MasterCard", "card_category": "Credit", "card_subcategory": "Standard", "amount": 10000, "decimal_amount": 100.0, "successful": true, "message": "Voided", "reference": "c10de1d9590fca1d893380c6e039ae71", "currency": "AUD", "transaction_id": "071-P-AK1MSTA2", "settlement_date": "2017-06-21", "transaction_date": "2017-06-21T15:02:46+10:00", "response_code": "00", "captured": true, "captured_amount": 10000, "rrn": "071PAK1MSTA2", "cvv_match": "M", "metadata": {}, "addendum_data": {} }, "errors": [] } ``` #### 422 (Result) ```json { "successful": true, "response": { "authorization": "283293", "id": "071-P-18DBFFCO", "card_number": "512345XXXXXX2346", "card_holder": "Jim Smith", "card_expiry": "2023-05-01", "card_token": "fke86c5u", "card_type": "MasterCard", "card_category": "Credit", "card_subcategory": "Standard", "amount": 10000, "decimal_amount": 100.0, "successful": false, "message": "Not Voided", "reference": "c10de1d9590fca1d893380c6e039ae71", "currency": "AUD", "transaction_id": "071-P-18DBFFCO", "settlement_date": "2017-06-21", "transaction_date": "2017-06-21T15:02:46+10:00", "response_code": "00", "captured": true, "captured_amount": 10000, "rrn": "071P18DBFFCO", "cvv_match": "M", "metadata": {}, "addendum_data": {} }, "errors": [] } ``` --- Source: https://www.artspay.com/docs/api/gateway/purchases/list-purchases # List purchases ## Endpoint `GET /purchases` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `list-purchases` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `offset` | query | integer (int32) | no | Offset to start Default: `1` | | `limit` | query | integer (int32) | no | Number of purchases in the response Default: `10` | | `from` | query | string (date) | no | Lower bound for the time at which the purchase was created | | `to` | query | string (date) | no | Upper bound for the time at which the purchase was created | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/purchases -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": [ { "authorization": "512407", "id": "071-P-P7OX5AF6", "card_number": "512345XXXXXX2346", "card_holder": "Matthew Savage", "card_expiry": "2030-02-28", "card_token": "fke86c5u", "card_type": "MasterCard", "card_category": "Credit", "card_subcategory": "Standard", "amount": 10000, "decimal_amount": 100.0, "successful": true, "message": "Approved", "reference": "73a34343849d71bca9ab1a11225a3139-1", "currency": "AUD", "transaction_id": "071-P-P7OX5AF6", "settlement_date": "2017-07-03", "transaction_date": "2017-07-03T12:39:02+10:00", "response_code": "00", "captured": true, "captured_amount": 10000, "rrn": "071PP7OX5AF6", "cvv_match": "M", "metadata": {}, "addendum_data": {} }, { "authorization": "138504", "id": "071-P-4AXUY9Q4", "card_number": "512345XXXXXX2346", "card_holder": "Matthew Savage", "card_expiry": "2030-02-28", "card_token": "fke86c5u", "card_type": "MasterCard", "card_category": "Credit", "card_subcategory": "Standard", "amount": 10000, "decimal_amount": 100.0, "successful": true, "message": "Approved", "reference": "bfe2f0f43e2f6811161ae7a009b3c840-0", "currency": "AUD", "transaction_id": "071-P-4AXUY9Q4", "settlement_date": "2017-07-03", "transaction_date": "2017-07-03T12:39:01+10:00", "response_code": "00", "captured": true, "captured_amount": 10000, "rrn": "071P4AXUY9Q4", "cvv_match": "M", "metadata": {}, "addendum_data": {} } ], "errors": [], "records": 2, "total_records": 2, "page": 1, "total_pages": 1 } ``` --- Source: https://www.artspay.com/docs/api/gateway/purchases/list-purchases-by-settlement # List purchases by settlement ## Endpoint `GET /purchases/settlement` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `list-purchases-by-settlement` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `from` | query | string (date) | yes | | | `to` | query | string (date) | yes | | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/purchases/settlement?from=2017/06/22&to=2017/06/27 -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { successful: true, response: [ { authorization: "512407", id: "071-P-P7OX5AF6", card_number: "512345XXXXXX2346", card_holder: "Matthew Savage", card_expiry: "2030-02-28", card_token: "fke86c5u", card_type: "MasterCard", card_category: "Credit", card_subcategory: "Standard", amount: 10000, decimal_amount: 100.0, successful: true, message: "Approved", reference: "73a34343849d71bca9ab1a11225a3139-1", currency: "AUD", transaction_id: "071-P-P7OX5AF6", settlement_date: "2017-07-03", transaction_date: "2017-07-03T12:39:02+10:00", response_code: "00", captured: true, captured_amount: 10000, rrn: "071PP7OX5AF6", cvv_match: "M", metadata: {}, addendum_data: {} }, { authorization: "138504", id: "071-P-4AXUY9Q4", card_number: "512345XXXXXX2346", card_holder: "Matthew Savage", card_expiry: "2030-02-28", card_token: "fke86c5u", card_type: "MasterCard", card_category: "Credit", card_subcategory: "Standard", amount: 10000, decimal_amount: 100.0, successful: true, message: "Approved", reference: "bfe2f0f43e2f6811161ae7a009b3c840-0", currency: "AUD", transaction_id: "071-P-4AXUY9Q4", settlement_date: "2017-07-03", transaction_date: "2017-07-03T12:39:01+10:00", response_code: "00", captured: true, captured_amount: 10000, rrn: "071P4AXUY9Q4", cvv_match: "M", metadata: {}, addendum_data: {} } ], errors: [], records: 2, total_records: 2, page: 1, total_pages: 1 } ``` #### 400 (Result) ```json { successful: false, response: [], errors: ['Params to and from are required'] } ``` --- Source: https://www.artspay.com/docs/api/gateway/purchases/fetch-a-purchase # Fetch a purchase ## Endpoint `GET /purchases/{id}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `fetch-a-purchase` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | path | string | yes | The ID or reference of the purchase. | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/purchases/071-P-P7OX5AF6 -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "authorization": "283293", "id": "071-P-P7OX5AF6", "card_number": "512345XXXXXX2346", "card_holder": "Jim Smith", "card_expiry": "2023-05-01", "card_token": "fke86c5u", "card_type": "MasterCard", "card_category": "Credit", "card_subcategory": "Standard", "amount": 10000, "decimal_amount": 100.0, "successful": true, "message": "Approved", "reference": "c10de1d9590fca1d893380c6e039ae71", "currency": "AUD", "transaction_id": "071-P-18DBFFCO", "settlement_date": "2017-06-21", "transaction_date": "2017-06-21T15:02:46+10:00", "response_code": "00", "captured": true, "captured_amount": 10000, "rrn": "071P18DBFFCO", "cvv_match": "M", "metadata": {}, "addendum_data": {} }, "errors": [] } ``` #### 404 (Result) ```json { "successful": false, "response": {}, "errors": ["Could not find Purchase"] } ``` --- Source: https://www.artspay.com/docs/api/gateway/tokenized-cards # Tokenized Cards Fat Zebra is able to accept card details and process payments on behalf of merchants by interfacing with relevant switches. Tokenized cards can be used to create purchases. ### Tokenized Card ### Response format | Field | Type | Description | | --- | --- | --- | | `token` | String | Generated token for card | | `card_holder` | String | Card holder name | | `card_number` | String | Obfuscated card number | | `card_expiry` | String / Date YYYY-MM-DD | Card expiry date | | `card_type` | String | Card schema | | `card_category` | String | Card type - Credit/Debit | | `card_ subcategory` | String | Card category | | `card_issuer` | String | Card issuer | | `card_country` | String | Card country | | `authorized` | Boolean | | | `transaction_count` | Integer | Number of transactions made with this card | | `alias` | String | Card alias | --- Source: https://www.artspay.com/docs/api/gateway/tokenized-cards/tokenize-a-card # Tokenize a card *For merchants who integrate with Mastercard's issuer push provisioning* It is possible to define an alias for a tokenized credit card to allow for a merchant defined value to be used in place of the system generated token. Aliases can also be assigned to new cards allowing for a card to be updated while maintaining the merchant system reference. ## Endpoint `POST /credit_cards` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `tokenize-a-card-with-mdes-token-connect` ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `card_number` | string | yes | Number on the card | | `card_holder` | string | yes | Name on the card | | `card_expiry` | string | yes | Card expiry date; format: MM/YYYY | | `cvv` | string | yes | CVV of the card | | `alias` | string | no | Alias to associate with the card | | `is_billing` | boolean | no | For Recurring transactions this field can be included set to true, which will make the cvv field optional Default: `false` | ### Example request ```shell curl https://gateway.pmnts-sandbox.io/v1.0/credit_cards -u TEST:TEST -d' { "card_number": "5123456789012346", "card_holder": "Bob Smith", "card_expiry": "05/2030", "cvv": "987" }' ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "token": "abcdef", "card_holder": "Bob Smitch", "card_number": "512345XXXXXX2346", "card_expiry": "2030-05-31", "card_type": "MasterCard", "card_category": "Credit", "card_subcategory": "Credit", "card_issuer": "Westpac", "card_country": "Australia", "authorized": true, "transaction_count": 0, "alias": null }, "errors": [], "test": true } ``` #### 422 (Result) ```json { "successful": false, "response": { "token": null, "card_holder": "", "scheme_token_status": "Failed", "scheme_token_ready": false, "scheme_response_id": "16660930105abc", "request_timestamp": "2022-10-18T11:36:51+00:00", "issuer_decision": null }, "errors": [ "Invalid Push Account Receipt" ], "test": false } ``` --- Source: https://www.artspay.com/docs/api/gateway/tokenized-cards/update-a-tokenized-card # Update a tokenized card *Update an existing card* ## Endpoint `PUT /credit_cards/{token_or_alias}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `update-a-tokenized-card` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `token_or_alias` | path | string | yes | Token or alias of the card to update | ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `card_expiry` | string | no | Expiry on the card | | `alias` | string | no | 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. | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/credit_cards/fke8jmra -X PUT -u TEST:TEST -d' { "card_expiry": "11/2023", "alias": "NewAlias123" }' ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "token": "fke8jmra", "card_holder": "Bob Smith", "card_number": "512345XXXXXX2346", "card_expiry": "2023-11-30", "card_type": "MasterCard", "card_category": "Credit", "card_subcategory": "Standard", "card_issuer": "Banco Del Pichincha, C.A.", "card_country": "Ecuador", "authorized": true, "transaction_count": 0, "alias": "NewAlias123" }, "errors": [], "test": true } ``` #### 400 (Result) ```json {} ``` --- Source: https://www.artspay.com/docs/api/gateway/tokenized-cards/list-tokenized-cards # List tokenized cards *List tokenized cards* ## Endpoint `GET /credit_cards` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `list-tokenized-cards` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `offset` | query | integer (int32) | no | Page number to return Default: `1` | | `limit` | query | integer (int32) | no | Max number of results to return Default: `10` | | `from` | query | string (date-time) | no | Lower bound for the time at which the card was tokenized | | `to` | query | string (date-time) | no | Upper bound for the time at which the card was tokenized | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/credit_cards?limit=2 -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful":true, "response":[ { "token":"fke8uf71", "card_holder":"Joe Bloggs", "card_number":"400555XXXXXX0001", "card_expiry":"2023-11-30", "card_type":"VISA", "card_category":"Credit", "card_subcategory":"Standard", "card_issuer":"Jpmorgan Chase Bank, N.A.", "card_country":"United States", "authorized":true, "transaction_count":1, "alias":"NewAlias123" }, { "token":"fke8n04t", "card_holder":"Bob Smith", "card_number":"512345XXXXXX2346", "card_expiry":"2030-05-31", "card_type":"MasterCard", "card_category":"Credit", "card_subcategory":"Standard", "card_issuer":"Banco Del Pichincha, C.A.", "card_country":"Ecuador", "authorized":true, "transaction_count":0, "alias":null } ], "errors":[], "test":true, "records":2, "total_records":1529543, "page":1, "total_pages":764772 } ``` #### 400 (Result) ```json {} ``` --- Source: https://www.artspay.com/docs/api/gateway/tokenized-cards/fetch-a-tokenized-card # Fetch a tokenized card ## Endpoint `GET /credit_cards/{token_or_alias}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `fetch-a-tokenized-card` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `token_or_alias` | path | string | yes | Token or alias of the card | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/credit_cards/fke81qwe -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "token": "fke81qwe", "card_holder": "Card Holder", "card_number": "411111XXXXXX1111", "card_expiry": "2022-12-31", "card_type": "VISA", "card_category": "Credit", "card_subcategory": "Credit", "card_issuer": "Jpmorgan Chase Bank, N.A.", "card_country": "United States", "authorized": true, "transaction_count": 1, "alias": null }, "errors": [], "test": true } ``` #### 404 (Result) ```json { "successful": false, "response": null, "errors": [ "Record not found" ], "test": true } ``` --- Source: https://www.artspay.com/docs/api/gateway/refunds # Refunds Fat Zebra provides a facility to issue refunds. ### Refund ### Response format | Field | Type | Description | | --- | --- | --- | | `authorization` | String | Authorization number | | `id` | String | ID of the refund | | `amount` | Integer | Amount of the refund in the smallest currency unit (e.g., 100 to refund $1.00, or 100 to refund ¥100, a zero decimal currency) | | `refunded` | String | Status of the refund | | `message` | String | Message giving context to the outcome of the request | | `card_holder` | String | Card holder name | | `card_number` | String | Obfuscated card number | | `card_expiry` | String / Date YYYY-MM-DD | Card expiry date | | `card_type` | String | Branding of the card | | `transaction_id` | String | Identifier for the transaction used to perform the refund | | `reference` | String | Identifier for the refund | | `currency` | String / ISO 3 | Currency of the purchase | | `successful` | Boolean | Whether the operation was successful or not | | `transaction_date` | String | Date the transaction was created | | `response_code` | String | Response code received from the switch | | `settlement_date` | String / Date YYYY-MM-DD | Settlement date | | `metadata` | Object | Metadata for the refund | | `standalone` | Boolean | Whether the refund was issued without reference to a previous purchase | | `rrn` | String | Receipt number of the purchase | | `merchant_advice_code` | String | Advice code for how merchants should retry failed transactions. Only present when a transaction is declined. Details on the possible codes are documented [Merchant Advice Codes (Retries)](https://www.artspay.com/docs/developer/purchases/merchant-advice-codes-retries) | --- Source: https://www.artspay.com/docs/api/gateway/refunds/issue-a-refund # Issue a refund *Issue a refund against a purchase or standalone* ## Standalone Refunds It is possible to issue a Standalone Refund (i.e. a refund that is not against an existing purchase), such as when refunding from a central account or some other kind of out-of-band refund scenario. To issue a Standalone Refund, simply provide the `card_token` or provide `card_number`, `card_holder` and `card_expiry` in lieu of the `transaction_id`. Support for Standalone Refunds may vary among banks, so please contact Fat Zebra support if you are unable to successfully issue a Standalone Refund. ## Endpoint `POST /refunds` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `issue-a-refund` ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `amount` | integer (int32) | yes | 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). | | `reference` | string | yes | Merchant's reference for the refund. Must be unique per refund. Max length 255 characters. | | `transaction_id` | string | no | ID of the original transaction to be refunded (XXX-P-YYYYYY). Required for an associated refund. | | `card_token` | string | no | Token of the card being refunded. Required unless transaction_id or card details are provided. | | `card_number` | string | no | Number of the card being refunded. Required unless transaction_id or card_token are provided. | | `card_expiry` | string | no | Expiry of the card being refunded. Required unless transaction_id or card_token are provided. | | `card_holder` | string | no | Name on the card being refunded. Required unless transaction_id or card_token are provided. | | `description` | string | no | Description for the refund. | | `currency` | string | no | Currency being refunded. Ignored if transaction_id is present. Default: `AUD` | | `descriptor` | string | no | Description that appears on the customer's statement. | | `extra` | object | no | Extra data for the refund. | | `metadata` | object | no | Metadata for the refund. | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/refunds -u TEST:TEST -d' { "transaction_id": "071-P-HEJJINFO", "amount": 50, "reference": "ed67e06731a2f98e8f5b3f5bc8540b80" }' ``` ```curl curl https://gateway.pmnts-sandbox.io/v1.0/refunds -u TEST:TEST -d' { "card_token": "fke81qwe", "amount": 349, "reference": "18jfjh280" }' ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "authorization": "1536806650", "id": "071-R-6RQJEWXV", "amount": 50, "refunded": "Approved", "message": "Approved", "card_holder": "Jim Smith", "card_number": "512345XXXXXX2346", "card_expiry": "2023-05-31", "card_type": "MasterCard", "transaction_id": "071-R-6RQJEWXV", "reference": "ed67e06731a2f98e8f5b3f5bc8540b80", "currency": "USD", "successful": true, "transaction_date": "2018-09-13T12:44:10+10:00", "response_code": "00", "settlement_date": "2018-09-14", "metadata": {}, "standalone": false, "rrn": "071R6RQJEWXV" }, "errors": [], "test": true } ``` #### 200 (With missing parameter error) ```json { "successful":false, "response":{ "authorization":null, "id":null, "amount":null, "refunded":"Error", "message":null, "card_holder":"Jim Smith", "card_number":"512345XXXXXX2346", "card_expiry":"2023-05-31", "card_type":"MasterCard", "transaction_id":null, "reference":"", "currency":"USD", "successful":false, "transaction_date":null, "response_code":"99", "settlement_date":null, "metadata":{}, "standalone":false, "rrn":null }, "errors":[ "Reference can't be blank" ], "test":true } ``` #### 200 (With invalid transaction ID) ```json { "successful":false, "response":{}, "errors":[ "Original transaction could not be found" ], "test":true } ``` --- Source: https://www.artspay.com/docs/api/gateway/refunds/void-a-refund # Void a refund ## Endpoint `POST /refunds/void` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `void-a-refund` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | query | string | no | ID of the refund | | `reference` | query | string | no | Reference of the refund | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/refunds/void?id=071-R-PKC3V565 -X POST -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful":true, "response":{ "authorization":"1531280232", "id":"071-R-PKC3V565", "amount":1, "refunded":"Voided", "message":"Voided", "card_holder":"Card holder name", "card_number":"512345XXXXXX2346", "card_expiry":"2023-05-31", "card_type":"MasterCard", "transaction_id":"071-R-PKC3V565", "reference":"xxxxx", "currency":"AUD", "successful":false, "transaction_date":"2018-07-11T13:37:12+10:00", "response_code":"00", "settlement_date":"2018-07-12", "metadata":{}, "standalone":false, "rrn":"071RPKC3V565" }, "errors":[], "test":true } ``` #### 404 (Result) ```json { "successful":false, "response":{}, "errors":[ "Could not find Refund" ], "test":true } ``` --- Source: https://www.artspay.com/docs/api/gateway/refunds/list-refunds # List refunds ## Endpoint `GET /refunds` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `list-refunds` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `offset` | query | integer (int32) | no | Page number to return | | `limit` | query | integer (int32) | no | Max number of results to return | | `from` | query | string (date-time) | no | Lower bound for the time at which the refund was created | | `to` | query | string (date-time) | no | Upper bound for the time at which the refund was created | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/refunds?limit=2 -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful":true, "response":[ { "authorization":"1531284422", "id":"071-R-ZXZV2IQA", "amount":349, "refunded":"Approved", "message":"Approved", "card_holder":"Card Holder", "card_number":"411111XXXXXX1111", "card_expiry":"2022-12-31", "card_type":"VISA", "transaction_id":"071-R-ZXZV2IQA", "reference":"18jfjh280", "currency":"AUD", "successful":true, "transaction_date":"2018-07-11T14:47:02+10:00", "response_code":"00", "settlement_date":"2018-07-12", "metadata":{}, "standalone":true, "rrn":"071RZXZV2IQA" }, { "authorization":"1531280232", "id":"071-R-PKC3V565", "amount":1, "refunded":"Approved", "message":"Approved", "card_holder":"Card holder name", "card_number":"512345XXXXXX2346", "card_expiry":"2023-05-31", "card_type":"MasterCard", "transaction_id":"071-R-PKC3V565", "reference":"xxxxx", "currency":"AUD", "successful":true, "transaction_date":"2018-07-11T13:37:12+10:00", "response_code":"00", "settlement_date":"2018-07-12", "metadata":{}, "standalone":false, "rrn":"071RPKC3V565" } ], "errors":[], "test":true, "records":2, "total_records":23466, "page":1, "total_pages":11733 } ``` #### 400 (Result) ```json {} ``` --- Source: https://www.artspay.com/docs/api/gateway/refunds/fetch-a-refund # Fetch a refund ## Endpoint `GET /refunds/{id}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `fetch-a-refund` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | path | string | yes | The ID or reference of the refund. | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/refunds/071-R-KATMZP3 -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "authorization": "1441241970", "id": "071-R-KATMZP3", "amount": 349, "refunded": "Approved", "message": "Approved", "card_holder": "Jim Smith", "card_number": "512345XXXXXX2346", "card_expiry": "2023-05-31", "card_type": "MasterCard", "transaction_id": "071-R-KATMZP3", "reference": "18280", "currency": "USD", "successful": true, "transaction_date": "2015-09-03T10:59:30+10:00", "response_code": "00", "settlement_date": "2015-09-04", "metadata": { }, "standalone": false, "rrn": "071RKATMZP3" }, "errors": [ ], "test": true } ``` #### 404 (Result) ```json { "successful":false, "response":{}, "errors":[ "Refund could not be found" ], "test":true } ``` --- Source: https://www.artspay.com/docs/api/gateway/direct-debits # Direct Debits Direct Debits are used to take funds from a customer's account (the source account) and deposit them into your account (the destination account). ### Direct Debit ### Response object | Field | Type | Description | | --- | --- | --- | | `id` | String | ID of the direct debit | | `amount` | Float | Amount of the direct debit in dollars. Minimum 0.01, positive only. | | `bsb` | String | The source account BSB number | | `account_number` | String | The source account number | | `account_name` | String | The source account name | | `description` | String | Description of the direct debit | | `reference` | String | Unique reference for the direct debit | | `date` | String / Date YYYY-MM-DD | The direct debit creation date | | `process_date` | String / Date YYYY-MM-DD | The direct debit processing date | | `status` | String | Status of the direct debit | | `result` | String | Result of the direct debit | | `metadata` | Object | Metadata for the direct debit | --- Source: https://www.artspay.com/docs/api/gateway/direct-debits/create-a-direct-debit # Create a direct debit ## Endpoint `POST /direct_debits` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `create-a-direct-debit` ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | yes | 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` | number (float) | yes | Amount. Minimum 0.01, positive only. | | `bsb` | string | yes | The source account's BSB number. Format: `###-###` | | `account_name` | string | yes | The source account name. Max 32 characters. | | `account_number` | string | yes | The source account number. Max 9 digits. | | `date` | string (date) | no | 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. | | `reference` | string | no | Unique reference | | `metadata` | object | no | Metadata of the direct debit | | `bank_account` | string | no | 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. | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/direct_debits -u TEST:TEST -d' { "description":"Confirmation", "amount":42, "bsb":"123-123", "account_name":"Test", "account_number":"012345678" }' ``` ### Example responses #### 201 (Result) ```json { "successful": true, "response": { "id": "071-DD-L4M3SN0E", "amount": 42.0, "bsb": "123-123", "account_number": "012345678", "account_name": "Test", "description": "Confirmation", "reference": "071-DD-L4M3SN0E", "date": "2018-09-14", "process_date": null, "status": "New", "result": null, "metadata": null }, "errors": [], "test": true } ``` #### 422 (Result) ```json { "successful": false, "response": {}, "errors": [ "Could not find bank account 071-B-ABC123" ], "test": true } ``` --- Source: https://www.artspay.com/docs/api/gateway/direct-debits/update-a-direct-debit # Update a direct debit *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.* ## Endpoint `PUT /direct_debits/{id}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `update-a-direct-debit` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | path | string | yes | ID of the direct debit | ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | no | Max 18 characters, allowed chars are A-Z, 0-9, period, hyphen, ampersand, and underscore. | | `amount` | number (float) | no | Amount. Minimum 0.01, positive only. | | `bsb` | string | no | The source account's BSB number. Format: `###-###` | | `account_name` | string | no | The source account name. Max 32 characters. | | `account_number` | string | no | The source account number. Max 9 digits. | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/direct_debits/071-DD-L4M3SN0E -X PUT -u TEST:TEST -d' { "account_name":"Test" }' ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "id": "071-DD-L4M3SN0E", "amount": 42.0, "bsb": "123-123", "account_number": "012345678", "account_name": "Test 2", "description": "Confirmation", "reference": "071-DD-L4M3SN0E", "date": "2018-09-14", "process_date": null, "status": "New", "result": null, "metadata": null }, "errors": [], "test": true } ``` #### 422 (Result) ```json { "successful": false, "response": {}, "errors": [ "Could not find bank account unknown" ] } ``` --- Source: https://www.artspay.com/docs/api/gateway/direct-debits/delete-a-direct-debit # Delete a direct debit *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.* ## Endpoint `DELETE /direct_debits/{id}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `delete-a-direct-debit` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | path | string | yes | ID of the direct debit | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/direct_debits/071-DD-5DYN6M21 -X DELETE -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "id": "071-DD-OPKL11XK", "amount": 42, "bsb": "123-123", "account_number": "012345678", "account_name": "Test", "description": "Confirmation", "reference": "071-DD-OPKL11XK", "date": "2018-09-14", "process_date": null, "status": "Deleted", "result": null, "metadata": null }, "errors": [], "test": true } ``` #### 404 (Result) ```json { "successful": false, "response": null, "errors": [ "Direct Debit 071-DC-ABC123 could not be found." ], "test": true } ``` --- Source: https://www.artspay.com/docs/api/gateway/direct-debits/list-direct-debits # List direct debits ## Endpoint `GET /direct_debits` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `list-direct-debits` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `offset` | query | integer (int32) | no | Page number to return Default: `1` | | `limit` | query | integer (int32) | no | Max number of results to return Default: `10` | | `from` | query | string (date) | no | Lower bound for the time at which the direct debit was created | | `to` | query | string (date) | no | Upper bound for the time at which the direct debit was created | ### Example request ```curl curl 'https://gateway.pmnts-sandbox.io/v1.0/direct_debits?limit=2&offset=1' -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": [ { "id": "071-DD-RDOR6I3K", "amount": 10, "bsb": "083-832", "account_number": "181843123", "account_name": "James Smith", "description": "test", "reference": "RMT1636366033", "date": "2018-09-21", "process_date": null, "status": "New", "result": null, "metadata": null }, { "id": "071-DD-ULX5DGSW", "amount": 10, "bsb": "083-832", "account_number": "181843123", "account_name": "James Smith", "description": "test", "reference": "RMT1636366032", "date": "2018-09-14", "process_date": null, "status": "New", "result": null, "metadata": null } ], "errors": [], "test": true, "records": 2, "total_records": 16582, "page": 1, "total_pages": 8291 } ``` --- Source: https://www.artspay.com/docs/api/gateway/direct-debits/fetch-a-direct-debit # Fetch a direct debit ## Endpoint `GET /direct_debits/{id_or_reference}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `fetch-a-direct-debit` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id_or_reference` | path | string | yes | ID or reference of the direct debit | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/direct_debits/071-DD-ULX5DGSW -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "id": "071-DD-ULX5DGSW", "amount": 10, "bsb": "083-832", "account_number": "181843123", "account_name": "James Smith", "description": "test", "reference": "RMT1636366032", "date": "2018-09-14", "process_date": null, "status": "New", "result": null, "metadata": null }, "errors": [], "test": true } ``` #### 404 (Result) ```json { "successful": false, "response": {}, "errors": [ "Could not find Direct Entry" ], "test": true } ``` --- Source: https://www.artspay.com/docs/api/gateway/direct-credits # Direct Credits Direct Credits are used to send funds from your account (the source account) to a third party (the destination account). ### Direct Credit ### Response format | Field | Type | Description | | --- | --- | --- | | `id` | String | ID of the direct credit | | `amount` | Float | Amount of the direct credit in dollars. Minimum 0.01, positive only. | | `bsb` | String | The destination account BSB number | | `account_number` | String | The destination account number | | `account_name` | String | The destination account name | | `description` | String | Description of the direct credit | | `reference` | String | Unique reference for the direct credit | | `date` | String / Date YYYY-MM-DD | The direct credit creation date | | `process_date` | String / Date YYYY-MM-DD | The direct credit processing date | | `status` | String | Status of the direct credit | | `result` | String | Result of the direct credit | | `metadata` | String | Metadata for the direct credit | --- Source: https://www.artspay.com/docs/api/gateway/direct-credits/create-a-direct-credit # Create a direct credit ## Endpoint `POST /direct_credits` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `create-a-direct-credit` ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | yes | 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` | number (float) | yes | Amount. Minimum 0.01, positive only. | | `bsb` | string | yes | The destination account's BSB number. Format: `###-###` | | `account_name` | string | yes | The destination account name. Max 32 characters. | | `account_number` | string | yes | The destination account number. Max 9 digits. | | `date` | string (date) | no | 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. | | `reference` | string | no | Unique reference | | `metadata` | object | no | Metadata for the direct credit | | `bank_account` | string | no | 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. | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/direct_credits -u TEST:TEST -d' { "description": "Confirmation", "amount": 42, "bsb": "123-123", "account_name": "Test", "account_number": "012345678" }' ``` ### Example responses #### 201 (Result) ```json { "successful": true, "response": { "id": "071-DC-IQ2X25I5", "amount": 42.0, "bsb": "123-123", "account_number": "012345678", "account_name": "Test", "description": "Confirmation", "reference": "071-DC-IQ2X25I5", "date": "2018-09-14", "process_date": null, "status": "New", "result": null, "metadata": null }, "errors": [], "test": true } ``` #### 422 (Result) ```json { "successful": false, "response": { "id": null, "amount": 42, "bsb": "123-123", "account_number": "012345678", "account_name": "Test", "description": "Confirmation", "reference": "071-DC-FYC4V7W4", "date": "2018-09-14", "process_date": null, "status": "New", "result": null, "metadata": null }, "errors": [ "Reference has already been taken" ], "test": true } ``` --- Source: https://www.artspay.com/docs/api/gateway/direct-credits/update-a-direct-credit # Update a direct credit *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.* ## Endpoint `PUT /direct_credits/{id}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `update-a-direct-credit` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | path | string | yes | ID of the direct credit | ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | no | Max 18 characters, allowed chars are A-Z, 0-9, period, hyphen, ampersand, and underscore. | | `amount` | number (float) | no | Amount. Minimum 0.01, positive only. | | `bsb` | string | no | The destination account's BSB number. Format: `###-###` | | `account_name` | string | no | The destination account name. Max 32 characters. | | `account_number` | string | no | The destination account number. Max 9 digits. | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/direct_credits/071-DC-IQ2X25I5 -X PUT -u TEST:TEST -d' { "account_name": "Test 2" }' ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "id": "071-DC-IQ2X25I5", "amount": 42.0, "bsb": "123-123", "account_number": "012345678", "account_name": "Test 2", "description": "Confirmation", "reference": "071-DC-IQ2X25I5", "date": "2018-09-14", "process_date": null, "status": "New", "result": null, "metadata": null }, "errors": [], "test": true } ``` #### 422 (Result) ```json { "successful": false, "response": {}, "errors": [ "Could not find bank account unknown" ] } ``` --- Source: https://www.artspay.com/docs/api/gateway/direct-credits/delete-a-direct-credit # Delete a direct credit *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.* ## Endpoint `DELETE /direct_credits/{id}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `delete-a-direct-credit` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | path | string | yes | ID of the direct credit | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/direct_credits/071-DC-RT8G3YV -X DELETE -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "id": "071-DC-RT8G3YV", "amount": 42, "bsb": "123-123", "account_number": "000000000", "account_name": "Test 2", "description": "Confirmation", "reference": "071-DC-RT8G3YV", "date": "2018-09-14", "process_date": null, "status": "Deleted", "result": null, "metadata": null }, "errors": [], "test": true } ``` #### 404 (Result) ```json { "successful": false, "response": null, "errors": [ "Direct Credit 071-DC-ABC123 could not be found." ], "test": true } ``` --- Source: https://www.artspay.com/docs/api/gateway/direct-credits/list-direct-credits # List direct credits ## Endpoint `GET /direct_credits` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `list-direct-credits` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `offset` | query | integer (int32) | no | Page number to return Default: `1` | | `limit` | query | integer (int32) | no | Max number of results to return Default: `10` | | `from` | query | string (date) | no | Lower bound for the date at which the direct credit was created | | `to` | query | string (date) | no | Upper bound for the date at which the direct credit was created | ### Example request ```curl curl 'https://gateway.pmnts-sandbox.io/v1.0/direct_credits?limit=2&offset=1' -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": [ { "id": "071-DC-RT8G3YV", "amount": 42, "bsb": "123-123", "account_number": "000000000", "account_name": "Test 2", "description": "Confirmation", "reference": "071-DC-RT8G3YV", "date": "2018-09-14", "process_date": null, "status": "New", "result": null, "metadata": null }, { "id": "071-DC-7ASQS6M4", "amount": 10.06, "bsb": "123-123", "account_number": "012345678", "account_name": "Test", "description": "Confirmation", "reference": "071-DC-7ASQS6M4", "date": "2018-09-13", "process_date": "2018-09-13", "status": "Pending", "result": "Submitted to institution", "metadata": { "batch_id": "ced360" } } ], "errors": [], "records": 2, "total_records": 685, "page": 1, "total_pages": 343, "test": true, } ``` --- Source: https://www.artspay.com/docs/api/gateway/direct-credits/fetch-a-direct-credit # Fetch a direct credit ## Endpoint `GET /direct_credits/{id_or_reference}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `fetch-a-direct-credit` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id_or_reference` | path | string | yes | ID or reference of the direct credit | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/direct_credits/071-DC-5DYN6M21 -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "id": "071-DC-5DYN6M21", "amount": 42, "bsb": "123-123", "account_number": "012345678", "account_name": "Test", "description": "Confirmation", "reference": "071-DC-5DYN6M21", "date": "2017-06-27", "process_date": "2017-06-27", "status": "Completed", "result": "Submitted to institution", "metadata": {} }, "errors": [], "test": true } ``` #### 404 (Result) ```json { "successful": false, "response": {}, "errors": [ "Could not find Direct Entry" ], "test": true } ``` --- Source: https://www.artspay.com/docs/api/gateway/batches # Batches ## Fields | Field | Type | Description | | --- | --- | --- | | `id` | string | Unique identifier for this batch. | | `filename` | string | The name of the uploaded batch file | | `type` | string | The batch type - PURCHASE, REFUND or DIRECTDEBIT | | `reference` | string | The batch file reference | | `status` | string | The batch file status - possible values are Completed, Pending, Deleted, Error | | `process_date` | date (yyyy-mm-dd) | The date the batch is scheduled for or was processed | | `start_date` | date (yyyy-mm-dd) | The date the batch was started | | `completed_date` | date (yyyy-mm-dd) | The date the batch was completed | | `created_at` | date (yyyy-mm-dd) | The date the batch file record was created | --- Source: https://www.artspay.com/docs/api/gateway/batches/create-a-batch # Create a batch > Batch File Format > > The [Batch File Format](https://www.artspay.com/docs/developer/batches/overview) is detailed in the Overview section of the Batches Reference. There are three formats - Purchases, Refunds, Direct Debits. > Filename Convention > > The Batch filename must fit a specific convention in order to be accepted. When uploading your batch please ensure that the filename uses the following pattern: > > `BATCH-[version]-[type]-[username]-[date]-[reference].csv` > > Where: > > * `version` is the file format version (currently v1) > * `type` is the batch file type (PURCHASE, REFUND or DIRECTDEBIT) > * `username` is your merchant username > * `date` is the date in YYYYMMDD format when the batch should be processed > * `reference` is your reference for the batch file ## Endpoint `POST /batches/{filename}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `create-a-batch` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `filename` | path | string | yes | Your CSV batch payments file name | ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `RAW_BODY` | string (binary) | no | The batch CSV file format | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/batches/BATCH-v1-PURCHASE-TEST-20180131-1516337064.csv \ -u TEST:TEST \ --data-binary @tmp/batches/BATCH-v1-PURCHASE-TEST-20180131-1516337064.csv \ -H "Content-Type: text/csv" \ ``` ### Example responses #### 201 (cURL) ```json { "successful": true, "response": { "id": "071-BF-2H8VWBRN", "filename": "BATCH-v1-PURCHASE-TEST-20180131-1516337064.csv", "created_at": "2018-02-19T12:29:55+11:00", "process_date": "2018-01-31", "start_date": null, "completed_date": null, "status": "New", "type": "PURCHASE", "reference": "1516337064" }, "errors": [], "test": false } ``` #### 201 (Ruby) ```json { "id": "071-BF-NFIIDN7F", "filename": "BATCH-v1-PURCHASE-TEST-20180131-1516337065.csv", "created_at": "2018-02-19T12:36:20+11:00", "process_date": "2018-01-31", "start_date": null, "completed_date": null, "status": "New", "type": "PURCHASE", "reference": "1516337065" } ``` --- Source: https://www.artspay.com/docs/api/gateway/batches/delete-a-batch # Delete a batch ## Endpoint `DELETE /batches/{id}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `delete-a-batch` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | path | string | yes | ID or Reference of the Batch | ### Example request ```curl curl -u TEST:TEST -XDELETE https://gateway.pmnts-sandbox.io/v1.0/batches/071-BF-Q0TVWI7K ``` ### Example responses #### 200 (cURL) ```json { "successful" : true, "test" : true, "response" : { "status" : "Cancelled", "completed_date" : null, "id" : "071-BF-HBOLDSDA", "start_date" : null, "type" : "DIRECTDEBIT", "filename" : "BATCH-v1-DIRECTDEBIT-TEST-20180908-7607.csv", "process_date" : "2018-09-08", "created_at" : "2018-09-07T15:34:59+10:00", "reference" : "7607" } } ``` --- Source: https://www.artspay.com/docs/api/gateway/batches/retrieve-batch-result-file # Retrieve batch result file ## Endpoint `GET /batches/{id}/result.csv` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `retrieve-batch-result-file` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | path | string | yes | ID or Reference of the Batch | ### Example request ```curl curl -u TEST:TEST https://gateway.pmnts-sandbox.io/v1.0/batches/071-BF-Q0TVWI7K/result.csv ``` --- Source: https://www.artspay.com/docs/api/gateway/batches/list-all-batches # List all batches > Pagination > > By default a request will return 10 records at a time, however this can be updated to 50 per request by specifying the `limit` query parameter. ## Endpoint `GET /batches` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `list-all-batches` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `limit` | query | integer (int32) | no | The number of records to return per request (page) - the maximum per request is 50. Default: `10` | | `offset` | query | integer (int32) | no | The pagination offset. For example, offset=10, limit=10 will return records 100 to 110 Default: `1` | ### Example request ```curl curl -u TEST:TEST https://gateway.pmnts-sandbox.io/v1.0/batches?limit=2 ``` ### Example responses #### 200 (cURL) ```json { "total_records" : 2128, "page" : 1, "errors" : [], "successful" : true, "test" : true, "records" : 2, "response" : [ { "completed_date" : null, "created_at" : "2018-01-30T01:58:52+11:00", "id" : "071-BF-PGGSPBF1", "start_date" : null, "type" : "PURCHASE", "status" : "Error", "filename" : "BATCH-v1-PURCHASE-TEST-20180101-test4.csv", "process_date" : "2018-01-01", "reference" : "test4" }, { "start_date" : "2017-07-12", "id" : "071-BF-68TU3VJM", "completed_date" : "2017-07-12", "created_at" : "2017-07-12T15:49:49+10:00", "reference" : "123456789012348", "process_date" : "2017-07-12", "filename" : "BATCH-v1-PURCHASE-20170712-123456789012348.csv", "status" : "Completed", "type" : "PURCHASE" } ], "total_pages" : 1024 } ``` #### 200 (Ruby) ```json { "id": "071-BF-68TU3VJM", "filename": "BATCH-v1-PURCHASE-20170712-123456789012348.csv", "created_at": "2017-07-12T15:49:49+10:00", "process_date": "2017-07-12", "start_date": "2017-07-12", "completed_date": "2017-07-12", "status": "Completed", "type": "PURCHASE", "reference": "123456789012348" } ``` --- Source: https://www.artspay.com/docs/api/gateway/batches/fetch-a-batch # Fetch a batch ## Endpoint `GET /batches/{id}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `fetch-a-batch` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | path | string | yes | ID or Reference of the Batch | ### Example request ```curl curl -u TEST:TEST https://gateway.pmnts-sandbox.io/v1.0/batches/071-BF-Q0TVWI7K ``` ### Example responses #### 200 (cURL) ```json { "response" : { "status" : "Completed", "type" : "PURCHASE", "process_date" : "2017-07-14", "id" : "071-BF-Q0TVWI7K", "created_at" : "2017-07-14T10:42:55+10:00", "filename" : "BATCH-v1-PURCHASE-20170714-123456789012347.csv", "completed_date" : "2017-07-14", "reference" : "123456789012347", "start_date" : "2017-07-14" }, "successful" : true, "errors" : [], "test" : true } ``` #### 200 (Ruby) ```json { "id": "071-BF-68TU3VJM", "filename": "BATCH-v1-PURCHASE-20170712-123456789012348.csv", "created_at": "2017-07-12T15:49:49+10:00", "process_date": "2017-07-12", "start_date": "2017-07-12", "completed_date": "2017-07-12", "status": "Completed", "type": "PURCHASE", "reference": "123456789012348" } ``` --- Source: https://www.artspay.com/docs/api/gateway/customers # Customers A customer represents an entity (business or individual) and the associated payment methods (Credit Card or Bank Account), which can then be used for payment methods such as direct debits and payment plans. ### Response object | Field | Type | Description | | --- | --- | --- | | `id` | String | Unique ID for the customer | | `email` | String | The customer’s email address (used to deliver email receipts if requested). | | `reference` | String | A reference for the customer record (e.g. your database ID). | | `first_name` | String | The customer’s first name. | | `last_name` | String | The customer’s last name. | | `created_at` | Date as String (ISO 8601) | The date that the customer was created. | | `address` | hash | \| Hash \| \| \|
\| ---------- \| ------ \| ------------------------ \|
\| `address` \| string \| The customer’s address. \|
\| `city` \| string \| The customer’s city. \|
\| `state` \| string \| The customer’s state. \|
\| `postcode` \| string \| The customer’s postcode. \|
\| `country` \| string \| The customer’s country. \| | | `card_token` | string | The customer’s card token. | | `card_number` | string | The customer’s card number. | | `bank_account` | string | The customer's bank account BSB and account number. e.g. "012-345 012345678" | | `metadata` | hash | Hash of key/value pairs attached to the customer during creation only. | --- Source: https://www.artspay.com/docs/api/gateway/customers/create-a-customer # Create a customer *Please note, one payment method field is required, either card, card_token or bank_account.* ## Endpoint `POST /customers` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `create-a-customer` ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `first_name` | string | yes | | | `last_name` | string | yes | | | `reference` | string | yes | | | `email_address` | string | no | | | `ip_address` | string | no | | | `address` | object | no | | | `address.address` | string | yes | Street number and name | | `address.city` | string | yes | | | `address.state` | string | yes | | | `address.postcode` | string | yes | | | `address.country` | string | yes | | | `card` | object | no | | | `card.card_holder` | string | yes | | | `card.card_number` | string | no | | | `card.expiry_date` | string | no | | | `card.cvv` | string | no | | | `card_token` | string | no | A card token can be sent through in lieu of the card data in the card array | | `bank_account` | object | no | The customer's bank account. | | `bank_account.account_name` | string | no | Account name to be used for direct entry. | | `bank_account.account_number` | string | no | Bank account number. 6-9 digits for an Australian bank account, or 8-10 digits for a New Zealand bank account | | `bank_account.bsb` | string | no | BSB number - this will be in the format of ###-### for an Australian bank account, or ###### for a New Zealand bank account | | `bank_account.account_type` | string | no | "AU" or "NZ" for Australian or New Zealand bank account. Defaults to "AU" if not provided. | ### Example request ```curl curl -u TEST:TEST https://gateway.pmnts-sandbox.io/v1.0/customers -d' { "first_name": "Harrold", "last_name": "Humphries", "reference": "jsoie33789", "email_address": "hhump@gmail.com", "ip_address": "180.200.33.181", "card": { "card_holder": "Harrold Humphries Senior", "card_number": "5123456789012346", "expiry_date": "05/2023", "cvv": "123" }, "address": { "address": "1 Harriet Road", "city": "Kooliablin", "state": "NSW", "postcode": "2222", "country": "Australia" } }' ``` ### Example responses #### 201 (Result) ```json { "successful":true, "response":{ "id":"071-C-D1LXAHM7", "email":"hhump@gmail.com", "reference":"jsoie33789", "first_name":"Harrold", "last_name":"Humphries", "created_at":"2018-06-07T15:07:52+10:00", "address":{ "address":"1 Harriet Road", "city":"Kooliablin", "state":"NSW", "postcode":"2222", "country":"Australia" }, "card_token":"fke87c9q", "card_number":"512345XXXXXX2346", "bank_account":null, "metadata":null }, "errors":[], "test":true } ``` --- Source: https://www.artspay.com/docs/api/gateway/customers/update-a-customer # Update a customer ## Endpoint `PUT /customers/{id}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `update-a-customer` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | path | string | yes | ID or Reference | ### Example request ```curl curl -u TEST:TEST -X PUT https://gateway.pmnts-sandbox.io/v1.0/customers/071-C-K7IY0XBJ -d' { "last_name": "Holt" }' ``` ### Example responses #### 200 (cURL) ```json { "successful": true, "response": { "id": "071-C-K7IY0XBJ", "email": null, "reference": "abcd123456", "first_name": "Harrold", "last_name": "Holt", "created_at": "2018-01-18T17:04:23+11:00", "address": { "address": "1 Harriet Road", "city": "Kooliablin", "state": "NSW", "postcode": "2222", "country": "Australia" }, "card_token": "fke8kly5", "card_number": "512345XXXXXX2346", "bank_account": null, "metadata": {} }, "errors": [], "test": true } ``` --- Source: https://www.artspay.com/docs/api/gateway/customers/delete-a-customer # Delete a customer ## Endpoint `DELETE /customers/{id}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `delete-a-customer` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | path | string | yes | ID or Reference | ### Example request ```curl curl -u TEST:TEST -X DELETE https://gateway.pmnts-sandbox.io/v1.0/customers/071-C-CMXJWC7L ``` ### Example responses #### 200 (cURL) ```json { "successful": true, "response": { "id": "071-C-CMXJWC7L", "email": null, "reference": "abcd12345", "first_name": "Harrold", "last_name": "Humphries", "created_at": "2018-01-18T16:47:53+11:00", "address": { "address": "1 Harriet Road", "city": "Kooliablin", "state": "NSW", "postcode": "2222", "country": "Australia" }, "card_token": "fke8b0fc", "card_number": "512345XXXXXX2346", "bank_account": null, "metadata": {} }, "errors": [], "test": true } ``` --- Source: https://www.artspay.com/docs/api/gateway/customers/list-customers # List customers ## Endpoint `GET /customers` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `list-customers` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `offset` | query | string | no | The page number of customers to be returned. | | `limit` | query | string | no | The number of customers per page to be returned. | ### Example request ```curl curl -u <>:<> https://gateway.pmnts-sandbox.io/v1.0/customers ``` ### Example responses #### 200 (cURL) ```json { "successful": true, "response": [ { "id": "071-C-JE34F66V", "email": "jim@citizen.com", "reference": "CUST-98198", "first_name": "Jim", "last_name": "Smith", "created_at": "2017-12-04T21:51:11+11:00", "address": { "address": "", "city": "", "state": "", "postcode": "", "country": "" }, "card_token": "fke89s3v", "card_number": "400555XXXXXX0001", "bank_account": null, "metadata": {} }, # ... ], "errors": [], "test": true, "records": 10, "total_records": 945, "page": 1, "total_pages": 95 } ``` --- Source: https://www.artspay.com/docs/api/gateway/customers/fetch-a-customer # Fetch a customer Find the details of an existing customer by its unique ID. ## Endpoint `GET /customers/{id}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `fetch-a-customer` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | path | string | yes | ID or Reference | ### Example request ```curl curl -u TEST:TEST https://gateway.pmnts-sandbox.io/v1.0/customers/071-C-JE34F66V ``` ### Example responses #### 200 (cURL) ```json { "successful": true, "response": { "id": "071-C-JE34F66V", "email": "jim@citizen.com", "reference": "CUST-98198", "first_name": "Jim", "last_name": "Smith", "created_at": "2017-12-04T21:51:11+11:00", "address": { "address": "1 Citizen Road", "city": "Sydney", "state": "NSW", "postcode": "2000", "country": "Australia" }, "card_token": "fke89s3v", "card_number": "400555XXXXXX0001", "bank_account": null, "metadata": {} }, "errors": [], "test": true } ``` --- Source: https://www.artspay.com/docs/api/gateway/bank-accounts # Bank Accounts Bank accounts can be stored in the gateway for use with customers and direct entries. Australian and NZ bank accounts can be stored. Please note, bank accounts can not be edited once created. | Field | Type | Description | | --- | --- | --- | | `account_name` | string | Account name to be used for direct entry. | | `account_number` | numeric | Bank account number. 6-9 digits for an Australian bank account, or 8-10 digits for a New Zealand bank account | | `bsb` | numeric | BSB number - this will be in the format of ###-### for an Australian bank account, or ###### for a New Zealand bank account | | `account_type` | string | "AU" or "NZ" for Australian or New Zealand bank account. Defaults to "AU" if not provided. | --- Source: https://www.artspay.com/docs/api/gateway/bank-accounts/create-a-bank-account # Create a bank account ## Endpoint `POST /bank_accounts` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `create-a-bank-account` ### Example request ```curl curl -u TEST:TEST https://gateway.pmnts-sandbox.io/v1.0/bank_accounts -d' { "account_name": "Max Webber", "account_number": "123456789", "bsb": "083-832", "account_type": "AU" }' ``` ### Example responses #### 201 (cURL) ```json { "successful": true, "response": { "id": "071-B-2FOU6UFB", "account_name": "Max Webber", "account_number": "123456789", "bsb": "083-832", "created_at": "2018-01-18T17:45:45+11:00" }, "errors": [], "test": true } ``` #### 422 (Result) ```json { "successful":false, "response":{ "id":"071-B-FGCEWI9L", "account_name":"Max Webber", "account_number":"123456789", "bsb":"INVALID-FORMAT", "created_at":null }, "errors":[ "Bsb is the incorrect format - please use 123-456","BSB does not appear to be valid - Bank/State code does not exist" ], "test":true } ``` --- Source: https://www.artspay.com/docs/api/gateway/bank-accounts/list-bank-accounts # List bank accounts ## Endpoint `GET /bank_accounts` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `list-bank-accounts` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `offset` | query | integer (int32) | no | Page number to return Default: `1` | | `limit` | query | integer (int32) | no | Number of results to return Default: `10` | | `from` | query | string (date-time) | no | Lower bound for the time at which the bank account was registered | | `to` | query | string (date-time) | no | Upper bound for the time at which the bank account was registered | ### Example request ```curl curl -u TEST:TEST https://gateway.pmnts-sandbox.io/v1.0/bank_accounts?limit=1 ``` ### Example responses #### 200 (cURL) ```json { "successful": true, "response": [ { "id": "071-B-C2FJI049", "account_name": "Test", "account_number": "12312312", "bsb": "123-123", "created_at": "2018-01-18T10:31:09+11:00" }, ], "errors": [], "test": true, "records": 10, "total_records": 570, "page": 1, "total_pages": 57 } ``` --- Source: https://www.artspay.com/docs/api/gateway/bank-accounts/fetch-a-bank-account # Fetch a bank account ## Endpoint `GET /bank_accounts/{id}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `fetch-a-bank-account` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | query | string | yes | The bank account record ID | ### Example request ```curl curl -u TEST:TEST https://gateway.pmnts-sandbox.io/v1.0/bank_accounts/071-B-C2FJI049 ``` ### Example responses #### 200 (cURL) ```json { "response" : { "bsb" : "123-123", "account_number" : "12312312", "created_at" : "2018-01-18T10:31:09+11:00", "id" : "071-B-C2FJI049", "account_name" : "Test" }, "errors" : [], "test" : true, "successful" : true } ``` --- Source: https://www.artspay.com/docs/api/gateway/applicable-surcharges # Applicable Surcharges ### Response object | Field | Type | Description | | --- | --- | --- | | `card_description` | string | Description of the card details provided. | | `surcharge_amount` | integer | Amount of the applicable surcharge in the smallest currency unit. | | `surcharge_amount_description` | string | Description of the surcharge amount. | | `total_amount` | integer | Total amount to be charged including surcharging. | --- Source: https://www.artspay.com/docs/api/gateway/applicable-surcharges/get-applicable-surcharge # Get applicable surcharge *Get the applicable surcharge for a given amount, currency and card number.* ## Endpoint `GET /applicable_surcharge` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `get-applicable-surcharge` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `pan` | query | string | yes | The card number of the debit or credit card | | `amount` | query | integer (int32) | yes | Amount to be surcharged in the smallest currency unit | | `currency` | query | string | yes | Currency of the amount to be surcharged | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/applicable_surcharge?pan=4242424242424242&amount=100¤cy=AUD -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "card_description": "credit", "surcharge_amount": 1, "surcharge_amount_description": "0.9%", "total_amount": 101 }, "errors": [], "test": true } ``` #### 400 (Result) ```json { "successful": false, "response": null, "errors": [ "invalid pan" ], "test": true } ``` --- Source: https://www.artspay.com/docs/api/gateway/webhooks # Webhooks ## Introduction Webhooks provide a method for the gateway to send notifications of events to an external service. It is a preferred alternative to polling the system for changes as the notification is usually sent as soon as something happens and it requires less resources on both the source and destination side to maintain. While webhooks can be created from within the Merchant Dashboard it is also possible to create them programmatically for automating systems. ## Fields | Field | Type | Description | | --- | --- | --- | | `address` | String | URL that the web hook payload will be sent to. | | `name` | String | A name for the webhook (e.g. to identify if webhooks are being sent to multiple systems) | | `mode` | String | The webhook mode - Live or Test | | `events` | String | The events a webhook target should receive. Events are formatted in a `type:event` format, and wildcards can be used (for example, `purchase:successful`, `purchase:*` and `*` are valid webhook event types). | ## Events The available Webhook Events are documented [Here](https://www.artspay.com/docs/developer/webhooks/events) > Events and Idempotency > > It is important that the system that receives the webhook requests is setup to handle unexpected messages - if you have defined a webhook with wildcards it is possible that newly created and/or unpublished event types may be sent this this endpoint. > > We recommend that when handling the request you check the webhook payload for the event type and discard any messages you do not expect to process to avoid any issues. > > It is also important that the system handling these requests handles idempotency, as the webhook request may be sent multiple times until the request is deemed successful by the Gateway (for example, if there are network issues causing timeouts in the response to the webhook etc) --- Source: https://www.artspay.com/docs/api/gateway/webhooks/create-a-webhook # Create a webhook *Create webhooks* ### Events There are numerous events which can be received as a webhook. All events are documented under the [Events](https://www.artspay.com/docs/developer/webhooks/events) reference documentation for Webhooks. ## Endpoint `POST /web_hooks` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `create-a-webhook` ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `name` | string | no | A name for the web hook | | `mode` | string | no | The mode for the web hook. Possible values are: Test or Production | | `address` | string | no | The URL for the web hook to target. This must start with http:// or https:// | | `authentication_username` | string | no | The username for HTTP Basic authentication Default: `Optional` | | `authentication_password` | string | no | The password for HTTP Basic authentication (optional) Default: `Optional` | | `is_active` | boolean | no | Activation flag for the webhook Default: `false` | | `events` | string | no | 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`) | ### Example request ```curl curl -X POST https://gateway.pmnts-sandbox.io/v1.0/web_hooks -u TEST:TEST -d' { "name": "Test Hook", "mode": "Test", "address": "https://www.your-server.com/payment/hook", "authentication_username": null, "authentication_password": null, "is_active": true, "events": "*" }' ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "address": "https://www.your-server.com/payment/hook", "events": "*", "mode": "Test", "authentication_username": null, "authentication_password": "", "is_active": true, "name": "Test Hook", "id": "071-WH-ABCD1234" }, "errors": [], "test": true } ``` #### 422 (Result) ```json { "successful":false, "response":{ "address":null, "events":null, "mode":null, "authentication_username":null, "authentication_password":"", "is_active":null, "name":null, "id":null }, "errors":[ "Address can't be blank", "Events is not included in the list", "Mode is not included in the list" ], "test":true } ``` --- Source: https://www.artspay.com/docs/api/gateway/webhooks/update-a-webhook # Update a webhook *Update a webhook* ## Endpoint `PUT /web_hooks/{id}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `update-a-webhook` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | path | string | yes | Id of the webhook | ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `name` | string | no | The mode for the web hook. Possible values are: Test or Production | | `mode` | string | no | The mode for the web hook. Possible values are: Test or Production | | `address` | string | no | The URL for the web hook to target. This must start with http:// or https:// | | `authentication_username` | string | no | The username for HTTP Basic authentication Default: `Optional` | | `authentication_password` | string | no | The password for HTTP Basic authentication (optional) Default: `Optional` | | `events` | string | no | 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`) | ### Example request ```curl curl -X PUT https://gateway.pmnts-sandbox.io/v1.0/web_hooks/071-WH-ABCD1234 -u TEST:TEST -d ' { "name": "Test Hook Updated" }' ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "address": "https://www.your-server.com/payment/hook", "events": "*", "mode": "Test", "authentication_username": null, "authentication_password": "", "is_active": null, "name": "Test Hook Updated", "id": "071-WH-ABCD1234" }, "errors": [], "test": true } ``` #### 400 (Result) ```json {} ``` --- Source: https://www.artspay.com/docs/api/gateway/webhooks/delete-a-webhook # Delete a webhook *Delete a webhook* ## Endpoint `DELETE /web_hooks/{id}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `delete-a-webhook` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id` | path | string | yes | | ### Example request ```curl curl -X DELETE https://gateway.pmnts-sandbox.io/v1.0/web_hooks/071-WH-ABCD1234 -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "address": "https://www.your-server.com/payment/hook", "events": "*", "mode": "Test", "authentication_username": null, "authentication_password": "", "is_active": null, "name": "Test Hook", "id": "071-WH-ABCD1234" }, "errors": [], "test": true } ``` #### 404 (Result) ```json { "successful":false, "response":null, "errors":["Not Found"], "test":true } ``` --- Source: https://www.artspay.com/docs/api/gateway/webhooks/list-webhooks # List webhooks *List your installed webhooks* ## Endpoint `GET /web_hooks` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `list-webhooks` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `limit` | query | integer (int32) | no | The number of records to return per request. The maximum records per request is 50 Default: `10` | | `offset` | query | integer (int32) | no | The pagination offset for the request. Default: `1` | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/web_hooks -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "response" : [ { "id" : "071-WH-LPN9BZVS", "authentication_username" : null, "mode" : "Test", "events" : "*", "is_active" : null, "address" : "http://stage.example.com.au/v1/api/hook_listener", "authentication_password" : "", "name" : "New Test hook" } ], "errors" : [], "successful" : true, "test" : true } ``` --- Source: https://www.artspay.com/docs/api/gateway/direct-post # Direct Post *Direct Post allows a merchant to create payments or tokenize credit card without having the customers credit card details transmitted through their infrastructure, greatly reducing the scope for PCI-DSS. When using Direct Post the communication of credit card details is between the customers browser and the Gateway, with the result being returned to the merchant via a GET request.* ### Benefits Direct Post offers the following benefits over server integration or a hosted payment page: * Reduced PCI-DSS Scope (the full card number is not transmitted through your systems) * Control over branding and user experience * Easy and straight-forward to implement * Recurring payments are still possible with the returned card token > It is important to note that while credit card data is not being transmitted through the merchants systems using Direct Post there is still a risk of data loss if the appropriate measures are not taken to protect the security of the integration (for example ensuring the integration has not been tampered with to divert traffic). All merchants using Direct Post must complete the PCI DSS Self Assessment Questionnaire [SAQ A-EP](https://www.pcisecuritystandards.org/documents/SAQ_A-EP_v3.pdf) and complete regular security checks including external scans performed by an Authorised Scanning Vendor. Direct Post is supported for [Purchases](https://www.artspay.com/docs/api/gateway/purchases) and [Credit Cards](https://www.artspay.com/docs/developer/card-on-file/tokenized-credit-cards). ### Data Integrity As the request to the Gateway and the response back to the merchant website is transmitted by the Customers browser data integrity measures have been put in place to ensure the critical data (amount, reference etc) are not modified. This verification is done using a signed hash with a shared secret. Before a request is accepted by the Gateway the data is verified against the hash provided and if this does not match the transaction is rejected. Specific details for the hash calculation are provided in each Direct Post operation's documentation, however an overview is provided below. The verification value (the hash) is calculated using the following: * a string of key values joined with a colon (e.g. ABC123:1000:AUD) * the shared secret, known to both the Merchant and the Gateway - it is important that the shared secret be protected - should the hash need to be calculated dynamically this should be done server-side The following example pseudo code demonstrates this process: ``` var amount = 100 var reference = "ABC123" var currency = "AUD" var shared_secret = "abcd1234"   # This will result in the following string: "100:ABC123:AUD" var verification_string = [amount, reference, currency].join(':') # The result of this calculation will be: 5ee475f3047392ea54a1ba0cd5d84921 var hmac = hmac_md5(shared_secret, verification_string) ``` In some cases the result of the HMAC may result in binary data - it is important that the Hex Digest be used for the verification value. ### JSONP support In order to support submitting payments using AJAX the request needs to be sent using JSONP, as it is not possible to perform a Cross-domain request to the Gateway. To use JSONP: * Append .json to the request URL (e.g. [https://gateway.pmnts.io/v2/purchases/direct/TEST.json](https://gateway.pmnts.io/v2/purchases/direct/TEST.json)) * Include a JSONP callback * In the handler for the JSONP callback handle the data - the fields available match those normally returned in a standard Direct Post method Example script for performing a JSONP Direct Post request is below. Note: this script depends on jQuery. ```javascript var pmntscb = function(data) { if (data.r == 1) { // Successfully tokenized alert("Token: " + data.token); } else if (data.r == 97) { // Failed, validation error var error_message = "Validation error:\r\n"; jQuery(data["errors[]"]).each(function() { error_message += " " + this + "\r\n"; }); alert(error_message); } else { // Remaining errors could be: // - 95 (merchant not found - check your username) // - 99 (validation error - e.g. form has been tampered with) // - 999 (gateway error - merchant should contact the Gateway if this error persists.) alert("Unknown Error. Please Try Again."); } } jQuery("form").submit(function(e) { e.preventDefault(); var form = jQuery(this); $.ajax({ type: "GET", url: form.attr("action"), data: form.serialize(), jsonpCallback: "pmntscb", contentType: "text/javascript", dataType: "jsonp", error: function(e) { // Handle errors here - all non HTTP 2xx errors, such as HTTP 500, 403, 401 etc // (very unlikely, but HTTP 500 or HTTP 502 is the most likely to happen) alert(e.message); } }); }); ``` --- Source: https://www.artspay.com/docs/api/gateway/direct-post/purchases-via-direct-post # Purchases via Direct Post ### Request When performing a Direct Post purchase the following parameters are required: | Name | Type | Description | | --- | --- | --- | | card\_holder | String | The credit card holders name | | card\_number | String | The credit card number | | expiry\_month | Number | The card expiry month, 1 or 2 digits (e.g. 5, 12, 06) | | expiry\_year | Number | The card expiry year, 4 digits (eg. 2023) | | cvv | String | The CVV or Security Code on the back of the card - 3 digits
AMEX Note: this number is printed on the front of an AMEX and is 4 digits in length | In addition to these fields the following hidden fields should also be included: | Name | Type | Description | | --- | --- | --- | | amount | Number | The purchase amount, as an integer (e.g. AU$100.50 will be 10050) | | currency | String | The purchase currency (3-letter [ISO-4217 Code](http://en.wikipedia.org/wiki/ISO_4217)) | | return\_path | String | The URL to redirect the customer to with the response.
This will normally be a URL on the merchants website but it can also be a custom-scheme registered for mobile applications. | | reference | String | The purchase reference (e.g. invoice or order number) | | verification | String | The verification value. Details on how to calculate this are below. | The URL for the Direct Post form should be: * **Sandbox**: `https://gateway.pmnts-sandbox.io/v2/purchases/direct/[MERCHANT USERNAME].json` * **Live**: `https://gateway.pmnts.io/v2/purchases/direct/[MERCHANT USERNAME].json` ### Calculating the Verification Value There are several hidden fields in this form which are submitted to the Gateway from the customers browser. These are: * **reference** - the purchase reference (e.g. invoice or order number) * **amount** - the purchase amount * **currency** - the currency for the transaction * **return\_path** - the URL to return the customer to on completion In order to ensure these values are not changed a verification value is also included, which is determined by the following: ```text verification = hmac_md5(shared_secret, "INV-21479:100000:AUD:https://merchantswebsite.com/payment/callback"); ``` ### Response Upon completion of the request the customer will be redirected back to the merchants website with a number of key/value pairs in the query string. These will be: ```text r=1&successful=true&amount=100000¤cy=AUD&id=071-P-W2MZP0IJ&v=c41844a09c1a14f484e94d3458a13930&token=w5o87fzy&message=Approved&card_holder=Jim+Citizen&card_number=512345XXXXXX2346&card_expiry=03%2F2018&reference=INV-21479&s=-1 ``` | Name | Type | Description | | --- | --- | --- | | r | Number | Response code indicating the outcome of the request - see the list below for details | | successful | Boolean | Indication of success of the request, including the purchase being approved | | message | String | The response message for the transaction | | amount | Number | The amount processed, as an integer | | id | String | The Fat Zebra transaction ID | | token | String | The credit card token, for reuse later if required | | card\_holder | String | The card holders name | | card\_number | String | The masked card number - this can be stored if required | | card\_expiry | String | The card expiry date - this can be stored if required | | reference | String | The Merchant's reference for the transaction | | v | String | The verification value used to verify the response integrity - see below for details on verification | | errors\[] | Array\ | Any errors related to the request - this will be populated if the response code is 90-999 (e.g. errors\[]=Invalid+Card+Number) | ### Response Codes The following response codes are used for Direct Post transactions: | Code | Description | | --- | --- | | 1 | Successful Transaction | | 2 | Declined Transaction | | 95 | Merchant Username not found | | 96 | Reference not unique - e.g. this transaction has already been processed | | 97 | Validation error - there was an error validating the customers input (e.g. bad card number) | | 99 | Invalid Verification - the verification was not successful indicating the data may have been tampered with | | 999 | Gateway Error - contact support if this error persists | ### Response Verification To verify the response hasn't been tampered with the merchants integration should perform the following verification calculation, and compare the result against the value of **v**: ``` hmac_md5(shared_secret, "[r]:[successful]:[amount]:[currency]:[id]:[token]") ``` If these values do not match the response should be considered invalid. It is also important that a merchant's system be idempotent with handling responses, so that if a customer reloads the page they are redirected to the system will not treat each request as a new order. ### Echo Parameters In addition to the parameters mentioned above we now support echo parameters, which are values returned in the transaction. To use these simply include them in your form using the following format for the field name echo\[your\_param\_name] and they will be included in the response URI. As with the extra parameters above, the echo parameters are **not** included in the verification calculation. ### Original Transaction Details for Response Code 96 When a **Reference not unique (96)** error is returned we are now including the original transaction details which caused this error to be returned. This is helpful for handling double-post situations and removes the need to query the Fat Zebra API for the transaction details. The transaction details returned include all the values listed above, however they are nested within the existing parameter. (For example: `existing[id]=187-P-AJ8HY87K` ) This response also includes verification of the response in `existing[v]` , so you may verify the authenticity of the original transaction before updating your records. --- Source: https://www.artspay.com/docs/api/gateway/direct-post/tokenize-via-direct-post # Tokenize via Direct Post ### Request When performing a Direct Post Tokenization the following parameters are required: | Name | Type | Description | | --- | --- | --- | | card\_holder | String | The credit card holders name | | card\_number | String | The credit card number | | expiry\_month | Number | The card expiry month, 1 or 2 digits (e.g. 5, 12, 06) | | expiry\_year | Number | The card expiry year, 4 digits (eg. 2023) | | cvv | String | The CVV or Security Code on the back of the card - 3 digits
AMEX Note: this number is printed on the front of an AMEX and is 4 digits in length. | | is\_billing | Boolean | For Recurring transactions this field can be included set to true, which will make the cvv field optional. Defaults to `false` | In addition to these fields the following hidden fields should also be included: | Name | Type | Description | | --- | --- | --- | | return\_path | String | The URL to redirect the customer to with the response.
This will normally be a URL on the merchants website but it can also be a custom-scheme registered for mobile applications. | | verification | String | The verification value. Details on how to calculate this are below. | The URL for the Direct Post form should be: **Sandbox**: `https://gateway.pmnts-sandbox.io/v2/credit_cards/direct/[MERCHANT USERNAME].json`\ **Live**: `https://gateway.pmnts.io/v2/credit_cards/direct/[MERCHANT USERNAME].json` ### Calculating the Verification Value There are several hidden fields in this form which are submitted to the Gateway from the customers browser. These are: * **return\_path** - the URL to return the customer to on completion In order to ensure these values are not changed a verification value is also included, which is determined by the following: ```text verification = hmac_md5(shared_secret, "https://merchantswebsite.com/credit_card/callback"); ``` ### Response Upon completion of the request the customer will be redirected back to the merchants website with a number of key/value pairs in the query string. These will be: ```text r=1&successful=true&amount=100000¤cy=AUD&id=071-P-W2MZP0IJ&v=c41844a09c1a14f484e94d3458a13930&token=w5o87fzy&message=Approved&card_holder=Jim+Citizen&card_number=512345XXXXXX2346&card_expiry=03%2F2018&reference=INV-21479&s=-1 ``` | Name | Type | Description | | --- | --- | --- | | r | Number | Response code indicating the outcome of the request - see the list below for details. | | token | String | The credit card token | | card\_holder | String | The card holders name | | card\_number | String | The masked card number - this can be stored if required | | card\_expiry | String | The card expiry date - this can be stored if required | | v | String | The verification value used to verify the response integrity - see below for details on verification | | errors\[] | Array\ | Any errors related to the request - this will be populated if the response code is 90-999 (e.g. errors\[]=Invalid+Card+Number) | ### Response Codes The following response codes are used for Direct Post transactions: | Code | Description | | --- | --- | | 1 | Successful Tokenization | | 95 | Merchant Username not found | | 97 | Validation error - there was an error validating the customers input (e.g. bad card number) | | 99 | Invalid Verification - the verification was not successful indicating the data may have been tampered with | | 999 | Gateway Error - contact support if this error persists | ### Response Verification To verify the response hasn't been tampered with the merchants integration should perform the following verification calculation, and compare the result against the value of **v**: `hmac_md5(shared_secret, "[r]:[token]")` If these values do not match the response should be considered invalid. It is also important that a merchant's system be idempotent with handling responses, so that if a customer reloads the page they are redirected to the system will not treat each request as a new order. ### Echo Parameters In addition to the parameters mentioned above we now support echo parameters, which are values returned in the transaction. To use these simply include them in your form using the following format for the field name `echo[your_param_name]` and they will be included in the response URI. As with the extra parameters above, the echo parameters are **not** included in the verification calculation. --- Source: https://www.artspay.com/docs/api/gateway/payment-plans # Payment Plans Payment Plans allow a merchant to setup a billing schedule for a customer which can charge their credit card, or (if the merchant is configured for Direct Debit) debit from a bank account. Prior to setting up a Payment Plan, a customer record needs to be setup in the system with an associated payment method (i.e. Credit Card or Bank Account). Details on how to create a customer can be found under the Customers section. ### Processing and Retries Payment Plans are processed daily at 3am Sydney time. When a payment succeeds, the payment plan is 'Rolled Over' which will either generate the next payment to replace the one just processed, or update the payment plan (for example, marking as completed, suspending, re-activating etc). Payments will be retried up to 3 times before suspending a plan, with a delay between retries (this delay is defined when setting up a plan as retry\_interval, however it will default to 3 days). ### Response object | Field | Type | Description | | --- | --- | --- | | `id` | String | Unique identifier for this payment plan. | | `customer` | String | Unique identifier for this payment plan's customer. | | `amount` | Integer | The recurring payment amount in the smallest unit for the currency e.g. 1000 = AU$10. | | `currency` | String | The currency code for the plan. | | `setup_fee` | Integer | A setup fee to be charged upon creation of the payment plan. | | `frequency` | String | The frequency of the payments. Acceptable values are: Weekly, Fortnightly, Monthly, 4-Weekly, Quarterly and Annually | | `anniversary` | Integer | The 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` | Date (yyyy-mm-dd) | The date the payment plan should start. This must be in the future. | | `end_date` | Date (yyyy-mm-dd) | The date the payment plan should end on. This must be in the future and greater then the start\_date. Optional. | | `total_count` | Integer | The total number of payments to process for this plan. Optional. | | `total_amount` | Integer | The total amount of all payments to be processed for this plan. Optional. | | `payment_method` | String | The payment method for the plan - this can be Credit Card or Direct Debit.
Note: if a merchant is not configured for Direct Debit, or a customer is not setup with the defined payment method, an error will be returned. | | `reference` | String | Your reference for the payment plan. | | `description` | String | A description for the payment plan (e.g. Model 200R Blender Lay-by) | | `status` | String | The status of the payment plan. | | `status_reason` | String | The reason the status was most recently changed. | | `created_at` | Date as String (ISO 8601) | The date that the payment plan was created. | | `failed_payment_fee` | Integer | A fee to apply to the retried payment in the event of any declined payment. Default: 0
Note: This amount will compound for the total number of retries (3) performed. | | `retry_interval` | Integer | The number of days between payment retries for any declined payments. Default: 3 | | `status_change_date` | Date (yyyy-mm-dd) | The date at which the status will roll over from Active to Suspended or vice versa. | | `payments` | Array of Payment objects | \| Payment object \| \| \|
\| ---------------- \| ----------------- \| --------------------------------------------------------------------------------------------------------------------------------------- \|
\| `id` \| string \| Unique identifier for this payment. \|
\| `payment_plan` \| string \| Unique identifier for this payment's plan. \|
\| `amount` \| integer \| The amount for the payment. \|
\| `currency` \| string \| The currency code for the payment. \|
\| `scheduled_date` \| Date (yyyy-mm-dd) \| The date of the scheduled payment. \|
\| `payment_method` \| string \| The payment method for the payment - this can be Credit Card or Direct Debit \|
\| `status` \| string \| The status of the payment. Possible values are: Scheduled, Completed, Declined, Error and Error - Contact Support. \|
\| `result` \| string \| The result of the payment - this will be any of the Response Codes messages. \|
\| `records` \| Array \| This is an array of the payment method records (i.e. Purchases or Direct Debits). This will include any declined and approved payments. \| | Note that on Payment Plan bounds (End Date, Total Count, Total Amount): If a plan is bounded by an end date, total count or total amount there may be a balloon payment (large final payment) at the end of the plan. For example, if a plan is setup to start on 16/07/2015, end on 31/07/2015, has an amount of $100 and a total amount of $1,000 then the payment amounts created will be: $100, $100, $800. The final large amount is due to the bounding implied by the end date, along with the expectation that a total of $1,000 for the plan will be collected. --- Source: https://www.artspay.com/docs/api/gateway/payment-plans/create-a-payment-plan # Create a payment plan ## Endpoint `POST /payment_plans` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `create-a-payment-plan` ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `customer` | string | yes | ID of the customer that the plan should belong to. | | `card_token` | string | no | The token for a card to link this payment plan to | | `amount` | integer (int32) | yes | Recurring payment amount in the smallest unit of the currency. | | `setup_fee` | integer (int32) | no | Setup fee to be charged upon creation of the payment plan. | | `frequency` | string | yes | Frequency of the payments. Acceptable values are: Daily, Weekly, Fortnightly, Monthly, 4 Weekly, Quarterly, Half Yearly, Annually. | | `payment_method` | string | yes | 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` | integer (int32) | yes | 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` | string (date) | yes | Date that the payment plan should start. This must be in the future. | | `end_date` | string (date) | no | Date that the payment plan should end on. This must be in the future and greater than the start_date. | | `reference` | string | no | Reference for the payment plan. | | `description` | string | no | Description for the payment plan (e.g. Model 200R Blender Lay-by). | | `currency` | string | no | ISO 4217 currency code for the plan. | | `total_count` | integer (int32) | no | Total number of payments to process for this plan. | | `total_amount` | integer (int32) | no | Total amount of all payments to be processed for this plan. | | `failed_payment_fee` | integer (int32) | no | 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` | | `retry_interval` | integer (int32) | no | Number of days between payment retries for any declined payments. Default: `3` | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/payment_plans -u TEST:TEST -X POST -d ' { "customer": "071-C-JE34F66V", "amount": 100, "frequency": "Weekly", "payment_method": "Credit Card", "anniversary": 5, "start_date": "2025-07-16", "total_count": 2 }' ``` ### Example responses #### 200 (Result) ```json { "successful":true, "response":{ "id":"071-PP-8389G3DA", "customer":"071-C-JE34F66V", "amount":100, "currency":null, "setup_fee":0, "frequency":"Weekly", "anniversary":5, "start_date":"2025-07-16", "end_date":null, "total_count":2, "total_amount":null, "payment_method":"Credit Card", "reference":"071-PP-8389G3DA", "description":null, "status":"Active", "status_reason":"None", "created_at":"2018-07-11T16:23:39+10:00", "failed_payment_fee":0, "retry_interval":3, "status_change_date":null, "card_token": "ABC12345", "payments":[ { "id":"071-PT-WQ8LIHI4", "payment_plan":"071-PP-8389G3DA", "reference":"071-PP-8389G3DA-0001", "amount":100, "currency":null, "scheduled_date":"2025-07-18", "payment_method":"Credit Card", "status":"Scheduled", "result":null, "records":[] }, { "id":"071-PT-QNFQFYW2", "payment_plan":"071-PP-8389G3DA", "reference":"071-PP-8389G3DA-0002", "amount":100, "currency":null, "scheduled_date":"2025-07-25", "payment_method":"Credit Card", "status":"Scheduled", "result":null, "records":[] } ] }, "errors":[], "test":true } ``` #### 422 (Invalid Payment Method) ```json { "successful":false, "response":{ "id":"071-PP-UV4ZJECK", "customer":"071-C-JE34F66V", "amount":100, "currency":null, "setup_fee":0, "frequency":"Weekly", "anniversary":5, "start_date":"2025-07-16", "end_date":null, "total_count":2, "total_amount":null, "payment_method":"Debit Card", "reference":"071-PP-UV4ZJECK", "description":null, "status":"Active", "status_reason":"None", "created_at":null, "failed_payment_fee":0, "retry_interval":3, "status_change_date":null, "payments":[] }, "errors":["Payment method is not valid"], "test":true } ``` --- Source: https://www.artspay.com/docs/api/gateway/payment-plans/update-a-payment-plan # Update a payment plan *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. When 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. Note: Payment plan must be active for any other attributes to be updated.* ## Endpoint `PUT /payment_plans/{id_or_reference}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `update-a-payment-plan` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id_or_reference` | path | string | yes | ID or merchant's reference of the payment plan to update. | ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `card_token` | string | no | The card token to link this payment plan to | | `new_status` | string | no | Status to update to. Valid values are "Suspended", "Active", "Cancelled", | | `reason` | string | no | Reason for updating payment plan status | | `until_date` | string (date) | no | 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. | | `amount` | integer (int32) | no | Recurring payment amount in the smallest unit of the currency. | | `setup_fee` | integer (int32) | no | Setup fee to be charged upon creation of the payment plan. | | `frequency` | string | no | Frequency of the payments. Acceptable values are: Daily, Weekly, Fortnightly, Monthly, 4 Weekly, Quarterly, Half Yearly, Annually. | | `payment_method` | string | no | 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` | string | no | 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` | string (date) | no | Date that the payment plan should start. This must be in the future. | | `end_date` | string (date) | no | Date that the payment plan should end on. This must be in the future and greater than the start_date. | | `reference` | string | no | Reference for the payment plan. | | `description` | string | no | Description for the payment plan (e.g. Model 200R Blender Lay-by). | | `currency` | string | no | ISO 4217 currency code for the plan. | | `total_count` | integer (int32) | no | Total number of payments to process for this plan. | | `total_amount` | integer (int32) | no | Total amount of all payments to be processed for this plan. | | `failed_payment_fee` | integer (int32) | no | 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` | | `retry_interval` | integer (int32) | no | Number of days between payment retries for any declined payments. Default: `3` | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/payment_plans/071-PP-8389G3DA -u TEST:TEST -X PUT -d ' { "new_status": "Suspended", "until_date": "2025-08-25" }' ``` ```curl curl https://gateway.pmnts-sandbox.io/v1.0/payment_plans/071-PP-8389G3DA -u TEST:TEST -X PUT -d ' { "amount": 100, "frequency": "Weekly", "payment_method": "Credit Card", "anniversary": 5, "start_date": "2025-07-16", "total_count": 2 }' ``` ### Example responses #### 200 (cURL Suspend 200 OK) ```json { "successful":true, "response":{ "id":"071-PP-8389G3DA", "customer":"071-C-JE34F66V", "amount":100, "currency":null,"setup_fee":0, "frequency":"Weekly", "anniversary":5, "start_date":"2025-07-16", "end_date":null, "total_count":2, "total_amount":null, "payment_method":"Credit Card", "reference":"071-PP-8389G3DA", "description":null, "status":"Suspended", "status_reason":"Other", "created_at":"2018-07-11T16:23:39+10:00", "failed_payment_fee":0, "retry_interval":3, "status_change_date":null, "card_token": "ABC12345", "payments":[] }, "errors":[], "test":true } ``` #### 200 (cURL Update 200 OK) ```json { "successful":true, "response":{ "amount":100, "currency":"AUD", "setup_fee":0, "frequency":"Weekly", "anniversary":5, "start_date":"2025-07-17", "end_date":"nil", "total_count":2, "total_amount":200, "payment_method":"Credit Card", "reference":"8774b9d1-57b3-4bc7-854b-f81ae1e51aa7", "description":"nil", "status":"Active", "status_reason":"None", "created_at":"2022-11-24T09:22:02+11:00", "failed_payment_fee":0, "retry_interval":1, "status_change_date":"nil", "display_reason":"None", "card_token": "ABC12345", "payments":[ { "id":"001-PT-ZD1Y124", "payment_plan":"001-PP-2CLZQHLI", "reference":"8774b9d1-57b3-4bc7-854b-f81ae1e51aa7-0001", "amount":100, "currency":"AUD", "scheduled_date":"2025-07-18", "payment_method":"Credit Card", "status":"Scheduled", "result":"nil", "records":[ ] }, { "id":"001-PT-L1MCLPL6", "payment_plan":"001-PP-2CLZQHLI", "reference":"8774b9d1-57b3-4bc7-854b-f81ae1e51aa7-0002", "amount":100, "currency":"AUD", "scheduled_date":"2025-07-25", "payment_method":"Credit Card", "status":"Scheduled", "result":"nil", "records":[ ] } ] }, "errors":[], "test":true } ``` #### 404 (Result) ```json { "successful":false, "response":{}, "errors":["Could not find Payment Plan"], "test":true } ``` --- Source: https://www.artspay.com/docs/api/gateway/payment-plans/cancel-a-payment-plan # Cancel a payment plan *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.* ## Endpoint `DELETE /payment_plans/{id_or_reference}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `cancel-a-payment-plan` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id_or_reference` | path | string | yes | ID or reference of the payment plan to cancel. | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/payment_plans/071-PP-8389G3DA -u TEST:TEST -X DELETE ``` ### Example responses #### 200 (Result) ```json { "successful":true, "response":{ "id":"071-PP-8389G3DA", "customer":"071-C-JE34F66V", "amount":100, "currency":null, "setup_fee":0, "frequency":"Weekly", "anniversary":5, "start_date":"2025-07-16", "end_date":null, "total_count":2, "total_amount":null, "payment_method":"Credit Card", "reference":"071-PP-8389G3DA", "description":null, "status":"Cancelled", "status_reason":"Other", "created_at":"2018-07-11T16:23:39+10:00", "failed_payment_fee":0, "retry_interval":3, "status_change_date":null, "payments":[] }, "errors":[], "test":true } ``` #### 404 (Result) ```json { "successful":false, "response":{}, "errors":["Could not find Payment Plan"], "test":true } ``` --- Source: https://www.artspay.com/docs/api/gateway/payment-plans/list-payment-plans # List payment plans ## Endpoint `GET /payment_plans` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `list-payment-plans` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `from` | query | string (date-time) | no | | | `to` | query | string (date-time) | no | | | `offset` | query | integer (int32) | no | Default: `1` | | `limit` | query | integer (int32) | no | Maximum number of records to return. Must not be more than 50. Default: `10` | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/payment_plans?limit=2 -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful":true, "response":[ { "id":"071-PP-8389G3DA", "customer":"071-C-JE34F66V", "amount":100, "currency":null, "setup_fee":0, "frequency":"Weekly", "anniversary":5, "start_date":"2025-07-16", "end_date":null, "total_count":2, "total_amount":null, "payment_method":"Credit Card", "reference":"071-PP-8389G3DA", "description":null, "status":"Active", "status_reason":"None", "created_at":"2018-07-11T16:23:39+10:00", "failed_payment_fee":0, "retry_interval":3, "status_change_date":null, "payments":[] }, { "id":"071-PP-EFI5O5E3", "customer":"071-C-JMECN7JX", "amount":100, "currency":null, "setup_fee":0, "frequency":"Weekly", "anniversary":5, "start_date":"2015-07-16", "end_date":null, "total_count":5, "total_amount":500, "payment_method":"Credit Card", "reference":"3cbf0d6975c876c7a2f10ceb81760c06", "description":null, "status":"Active", "status_reason":"None", "created_at":"2018-06-12T15:38:13+10:00", "failed_payment_fee":0, "retry_interval":3, "status_change_date":null, "payments":[] } ], "errors":[], "test":true, "records":2, "total_records":346, "page":1, "total_pages":173 } ``` #### 400 (Result) ```json {} ``` --- Source: https://www.artspay.com/docs/api/gateway/payment-plans/fetch-a-payment-plan # Fetch a payment plan ## Endpoint `GET /payment_plans/{id_or_reference}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `fetch-a-payment-plan` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `id_or_reference` | path | string | yes | ID or merchant's reference of the payment plan. | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/payment_plans/071-PP-8389G3DA -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful":true, "response":{ "id":"071-PP-8389G3DA", "customer":"071-C-JE34F66V", "amount":100, "currency":null, "setup_fee":0, "frequency":"Weekly", "anniversary":5, "start_date":"2025-07-16", "end_date":null, "total_count":2, "total_amount":null, "payment_method":"Credit Card", "reference":"071-PP-8389G3DA", "description":null, "status":"Active", "status_reason":"None", "created_at":"2018-07-11T16:23:39+10:00", "failed_payment_fee":0, "retry_interval":3, "status_change_date":null, "payments":[ { "id":"071-PT-WQ8LIHI4", "payment_plan":"071-PP-8389G3DA", "reference":"071-PP-8389G3DA-0001", "amount":100, "currency":null, "scheduled_date":"2025-07-18", "payment_method":"Credit Card", "status":"Scheduled", "result":null, "records":[] }, { "id":"071-PT-QNFQFYW2", "payment_plan":"071-PP-8389G3DA", "reference":"071-PP-8389G3DA-0002", "amount":100, "currency":null, "scheduled_date":"2025-07-25", "payment_method":"Credit Card", "status":"Scheduled", "result":null, "records":[] } ] }, "errors":[], "test":true } ``` #### 404 (Result) ```json { "successful":false, "response":{}, "errors":["Could not find Payment Plan"], "test":true } ``` --- Source: https://www.artspay.com/docs/api/gateway/settlement # Settlement In order to reconcile and report on your credit card transactions an settlement endpoint is available to retrieve summary details. This endpoint details the totals broken down by card type within the specified settlement period. Note: If the settlement date specified is still current (i.e. the date has not rolled over) the totals will not be complete and may be different for new requests. ## Fields The response to the endpoint will return the following data structure: | Name | Type | Description | | --- | --- | --- | | date | date (yyyy-mm-dd) | The settlement period date | | currency | string | The ISO 4217 3-letter currency code for the settlement period | | totals | Array<Mixed> | Documented below, an array of settlement total objects | | totals.scheme | string | The card scheme for the totals | | totals.purchases.amount | integer | The total amount for the settlement period of all successful purchases, in the smallest unit (e.g. cents, yen etc) | | totals.purchases.count | integer | The total number of successful purchases for the settlement period. | | totals.refunds.amount | integer | The total amount for the settlement period of all successful refunds, in the smallest unit (e.g. cents, yen etc) | | totals.refunds.count | integer | The total number of successful refunds for the settlement period. | | totals.total.amount | integer | The total amount for the settlement period of all successful purchases and refunds, in the smallest unit (e.g. cents, yen etc) | | totals.total.count | integer | The total number of successful purchases and refunds for the settlement period. | --- Source: https://www.artspay.com/docs/api/gateway/settlement/fetch-settlement-totals # Fetch settlement totals ## Endpoint `GET /settlement/totals` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `fetch-settlement-totals` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `date` | query | string (date) | no | | | `currency` | query | string | no | | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/settlement/totals?currency=AUD&date=2018-03-27 -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "date": "2018-03-27", "currency": "AUD", "totals": [ { "scheme": "AMEX", "purchases": { "amount": 6000, "count": 3 }, "refunds": { "amount": 0, "count": 0 }, "total": { "amount": 6000, "count": 3 } }, { "scheme": "MasterCard", "purchases": { "amount": 189259, "count": 15 }, "refunds": { "amount": 0, "count": 0 }, "total": { "amount": 189259, "count": 15 } }, { "scheme": "VISA", "purchases": { "amount": 90800, "count": 185 }, "refunds": { "amount": -200, "count": 2 }, "total": { "amount": 90600, "count": 187 } } ] }, "errors": [], "test": true } ``` #### 400 (Result) ```json {} ``` --- Source: https://www.artspay.com/docs/api/gateway/invoices # Invoices ## Invoices are predefined charges that can be paid at a later date via the Hosted Payment Pages. | Field | Type | Description | | --- | --- | --- | | `amount` | integer | Amount of the invoice in the smallest currency unit. | | `currency` | string | The ISO-4217 3-letter currency code for the invoice. | | `description` | string | Description for the invoice. | | `reference` | string | Your reference for this invoice. | | `payable` | boolean | Indicates whether the invoice is awaiting payment. | ## Invoice Import Fields | Field | Type | Description | | --- | --- | --- | | `uuid` | string | Unique identifier for this import. | --- Source: https://www.artspay.com/docs/api/gateway/invoices/fetch-an-invoice # Fetch an invoice *Individual invoices can be retrieved by their reference.* ## Endpoint `GET /invoices/{reference}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `fetch-an-invoice` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `reference` | path | string | yes | Reference of the invoice to be fetched. | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/invoices/X2 -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "amount": 7500, "currency": "AUD", "description": "Animal Registrations", "reference": "X2", "payable": true }, "errors": [], "test": true } ``` --- Source: https://www.artspay.com/docs/api/gateway/invoices/check-invoice-import-status # Check replacement status ## Endpoint `GET /invoice_imports/4a70e8d5-1d7d-441d-9ea2-30d15ff0f2e8` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `check-invoice-import-status` ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/invoice_imports/4a70e8d5-1d7d-441d-9ea2-30d15ff0f2e8 -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful":true, "response":{ "uuid":"4a70e8d5-1d7d-441d-9ea2-30d15ff0f2e8", "status":"complete", "error":null, "invoice_count":991 }, "errors":[], "test":true } ``` #### 400 (Result) ```json {} ``` --- Source: https://www.artspay.com/docs/api/gateway/invoices/import-invoices # Replace all invoices ***Note: This action will replace all existing invoices.*** This action is performed asynchronously. The status of the action can be queried as documented under "Check replacement status". ## Endpoint `PUT /invoices` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `import-invoices` ### Example request ```curl curl -X PUT https://gateway.pmnts-sandbox.io/v1.0/invoices -u TEST:TEST --data-binary @invoices.csv -H "Content-Type: text/csv ``` ### Example responses #### 200 (Result) ```json { "successful":true, "response":{ "uuid":"4a70e8d5-1d7d-441d-9ea2-30d15ff0f2e8", "status":"pending" }, "errors":[], "test":true } ``` #### 400 (Result) ```json {} ``` --- Source: https://www.artspay.com/docs/api/gateway/oauth-clients # OAuth Clients An OAuth Client is used to setup single-use tokens for the Javascript SDK integration path. While you can create your OAuth Client via the merchant dashboard some merchants and partners may opt to do this via the API for streamlined integration methods. --- Source: https://www.artspay.com/docs/api/gateway/oauth-clients/create-an-oauth-client # Create an OAuth Client Response fields: | Name | Type | Description | | --- | --- | --- | | access\_key | String | The identification component of the OAuth Client. This value is not considered sensitive, but it is recommended this is not disclosed publicly. | | access\_secret | String | The secret component of the OAuth Client, used to authentication the actions using this set of credentials. At a minimum this should be stored securely. | ## Endpoint `POST /oauth_clients` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `create-an-oauth-client` ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `name` | string | no | The name for the OAuth Client, used to differentiate between different clients/keys | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/oauth_clients -d '{"name": "test-client"} -U TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "access_key" : "Bwq5112385pDtg==", "access_secret" : "yekVasd23hqW_Fnodvt5-GZeCdXA=" } ``` #### 422 (Result) ```json { "errors" : [ "already exists" ] } ``` --- Source: https://www.artspay.com/docs/api/gateway/reports-1 # Reports Access timely report data to valuable information. ### Pre-requesites This endpoint is only available to merchants who have a direct acquiring relationship with Fat Zebra. \*Note: timings for when report data is available will vary. If the request is for today, data may not be immediately available for today. --- Source: https://www.artspay.com/docs/api/gateway/reports-1/fetch-a-payout-report-for-date # Fetch a payout report for date ### Payout Reports Payout reports contain information about your purchases, refunds, and disputes for a given date. ### Response Object The table below outlines the fields that are returned by the `/payouts` namespace. Expect an array of objects with these fields if you have payouts to multiple accounts on the same day. | Field | Type | Description | | --- | --- | --- | | `payout_date` | String / Date YYYY-MM-DD | The date of the payout. | | `payouts` | Array | An array of payouts. | | `method` | • VISA/MASTERCARD
• UPI
• AMEX
• BECS | This represents the method associated with the payout. | | `funding_account` | Object | This stores the account number and bsb. | | `bsb` | String / “NNN-NNN” | The bsb of the funding account object. | | `account_number` | String | The account number of the funding account object. | | `reference` | String / “FZ-YYYYMMDD-<string>” | The reference displayed on the merchant’s bank statement. | | `amount` | Float | The total payout disbursed that day. Can be a negative value denoting a claw back (direct debit). | | `detail` | Object | Contains the breakdown of the figures that determine the payout figure. | | `gross_processing_amount` | Float | The total **gross** value of your purchases minus refunds and chargebacks. | | `transaction_count` | Integer | The count of all transactions processed for the day. | | `processing_fees_amount` | Float | The total of all charges withheld. This excludes dispute charges. | | `dispute_charges_amount` | Float | The total chargeback fees incurred (and deducted). | | `disputes_count` | Integer | The count of all disputes processed for the day. | ## Endpoint `GET /reports/payouts/{date}` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `fetch-a-payout-report-for-date` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `date` | path | string (date) | yes | Default: `2022-01-01` | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/reports/payouts/2022-01-01 -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "payout_date": "2022-01-01", "payouts": [{ "method": "VISA/MASTERCARD", "funding_account": { "bsb": '123-345, "account_number": '0123456789' }, "amount": 1000.00, "reference": "FZ-20220929-HWZIJX", "detail": { "gross_processing_amount": 1000.00, "transaction_count": 1, "processing_fees_amount": -10.00, "disputes_count": 1, "disputes_amount": -10.0 } }] }, "errors": [] } ``` #### 400 (Invalid Date) ```json { "successful": false, "response": null, "errors": [ "Invalid date parameter" ], } ``` --- Source: https://www.artspay.com/docs/api/gateway/reports-1/fetch-a-payout-report-for-date-transactions # Fetch a payout's transactions for date ### Payout Reports Payout reports contain information about your purchases, refunds, and disputes for a given date. ## Endpoint `GET /reports/payouts/{date}/transactions` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `fetch-a-payout-report-for-date-transactions` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `date` | path | string (date) | yes | Default: `2022-01-01` | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/reports/payouts/2024-01-01/transactions -u TEST:TEST ``` ### Example responses #### 400 (Invalid Date) ```json { "successful": false, "response": null, "errors": [ "Invalid date parameter" ], } ``` --- Source: https://www.artspay.com/docs/api/gateway/disputes # Disputes Access data about disputes that have been raised against your transactions. --- Source: https://www.artspay.com/docs/api/gateway/disputes/list-disputes # List disputes ## Endpoint `GET /disputes` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `list-disputes` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `from` | query | string | no | Return disputes that were opened on or after this date, provided in the format 'YYYY-DD-MM'. Default: `90 days ago` | | `to` | query | string | no | Return disputes that were opened up to and on this date, provided in the format 'YYYY-MM-DD'. Default: `today` | | `search` | query | string | no | Dispute reference or transaction fatzebra ID to search on. | | `status` | query | string | no | Disputes of any status will be returned if this is not provided. Acceptable values: open, lost, won, expired, accepted. | | `order_by` | query | string | no | Acceptable values: opened_on, next_due_date. Default: `opened_on` | | `order_direction` | query | string | no | Acceptable values: asc, desc. Default: `desc` | | `offset` | query | integer (int32) | no | Page number. Default: `1` | | `limit` | query | integer (int32) | no | Number of disputes to return per page. Default: `10` | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/disputes -u TEST:TEST ``` ### Example responses #### 200 (Result) ```json { "successful": true, "response": { "has_more": true, "records": 2, "total_records": 9, "page": 1, "total_pages": 5, "disputes": [ { "opened_on": "2022-09-15", "transaction_id": "092-P-JHXOULO0", "reference": "202208036718", "reason_code": "001", "reason_description": "Fraud", "amount_cents": 1000000, "amount_currency": "AUD", "next_due_date": "2022-09-30", "status": "open" }, { "opened_on": "2022-09-15", "transaction_id": "093-P-AX6XLKRT", "reference": "342f0e9f3aa82119", "reason_code": "001", "reason_description": "Fraud", "amount_cents": 1000000000, "amount_currency": "AUD", "next_due_date": "2022-09-30", "status": "lost" } ] }, "errors": [], "test": true } ``` #### 422 (Result) ```json { "successful": false, "response": {}, "errors": [ "Invalid date range" ], "test": true } ``` --- Source: https://www.artspay.com/docs/api/gateway/disputes/fetch-dispute # Fetch dispute ## Endpoint `GET /transactions/{transaction_fatzebra_id}/dispute` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `fetch-dispute` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `transaction_fatzebra_id` | path | string | yes | The fatzebra id of the transaction. | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/transactions/001-P-154WFRUM/dispute -u TEST:TEST ``` ### Example responses #### 200 (Disputed) ```json { "successful": true, "response": { "disputed": true, "dispute": { "opened_on": "2022-11-08", "reference": "20210929603011-5", "amount_cents": 420, "amount_currency": "AUD", "next_due_date": "2022-11-22", "status": "open", "reason_code": "4837", "reason_description": "No Cardholder Authorization", "dispute_events": [ { "acquirer_event_code": "CB1", "acquirer_event_description": "1st Chargeback", "posting_date": "2022-11-08" } ] } }, "errors": [], "test": true } ``` #### 200 (Not Disputed) ```json { "successful": true, "response": { "disputed": false }, "errors": [], "test": true } ``` #### 404 (Result) ```json { "successful": false, "response": {}, "errors": [ "Could not find transaction" ], "test": true } ``` #### 422 (Result) ```json { "successful": false, "response": {}, "errors": ["Merchant not configured for TPP"], "test": true } ``` --- Source: https://www.artspay.com/docs/api/gateway/disputes/accept-dispute # Accept dispute ## Endpoint `PUT /transactions/{transaction_fatzebra_id}/dispute/accept` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `accept-dispute` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `transaction_fatzebra_id` | path | string | yes | The fatzebra id of the transaction. | ### Example request ```curl curl https://gateway.pmnts-sandbox.io/v1.0/transactions/001-P-154WFRUM/dispute/accept -u TEST:TEST ``` ### Example responses #### 201 (OK) ```json { "successful": true, "response": {}, "errors": [], "test": true } ``` #### 404 (Result) ```json { "successful": false, "response": {}, "errors": [ "Could not find transaction" ], "test": true } ``` #### 422 (Result) ```json { "successful": false, "response": {}, "errors" => ['Dispute has already been closed'] "test": true } ``` --- Source: https://www.artspay.com/docs/api/gateway/health-check # Health Check *An optional health check end point.* This endpoint lets merchants quickly determine if the FZ gateway is operational.
--- Source: https://www.artspay.com/docs/api/gateway/health-check/health-check-1 # Health Check *A simple echo service to verify gateway health. A 200 response code suggests all is fine.* ## Endpoint `GET /health` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `get_health` ### Path and query parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `echo` | query | string | no | An optional query string to be returned back by the API Default: `echo` | ### Example responses #### 200 (OK) ```json { "timestamp": 1769469514, "echo": "NONE" } ``` #### 200 (OK - 1) ```json { "timestamp": 1769469514, "echo": "my_echo" } ``` --- Source: https://www.artspay.com/docs/api/digital-wallet-registration/merchant-registration # Apple Pay on the Web - Domain Registration In order to start using Apple Pay on the Web each merchant domain and associated sub domains where the Apple Pay on the Web will be used need to be registered and validated with Apple. The steps do to this are as follows: 1. Download the domain association file for the environment you are setting up the domain for from the list below: * [Production](https://paynow.pmnts.io/apple_pay/domain_verification/production.txt) * [Sandbox](https://paynow.pmnts.io/apple_pay/domain_verification/sandbox.txt) 2. Place the domain association file on your web server so that it is accessible in the following path: ```text /.well-known/apple-developer-merchantid-domain-association ``` For example, if your domain is `www.example.com` you should be able to access the file at the following URL: [https://www.example.com/.well-known/apple-developer-merchantid-domain-association](https://www.example.com/.well-known/apple-developer-merchantid-domain-association) 3. Test the URL to ensure the association file is returned properly: ```shell curl https://www.example.com/.well-known/apple-developer-merchantid-domain-association ``` 4. Make an API request to the Gateway API to register this new domain: ```http POST https://gateway.pmnts-sandbox.io/v1.0/utilities/apple_pay/domains/www.example.com ``` This will trigger verification of your domain with Apple, and could take up to 45 seconds (in most cases this is completed very quickly). > More than one domain? > > If you have more then one domain you can register them with multiple requests. 5. Once this step is completed you can start accepting Apple Pay on the Web for the domains registered. You can now follow the [Apple Pay on the Web](https://developer.apple.com/documentation/apple_pay_on_the_web) documentation to implement the button on your website. > Security Configuration Requirements > > **Note**: if you do not use HTTPS, your HTTPS configuration is not secure, or the domain association file cannot be accessed on your domains via HTTPS this step will fail and the status of the registration will be **Error** --- Source: https://www.artspay.com/docs/api/digital-wallet-registration/merchant-registration/register-create-an-apple-pay-on-the-web-domain # Register (Create) an Apple Pay on the Web Domain Response fields: | Name | Type | Description | | --- | --- | --- | | created\_at | DateTime | Timestamp the record was created at | | updated\_at | DateTime | Timestamp of the last update to the record | | domain | String | The domain registered with Apple | | status | String | The status of the domain registration. Possible values are:
• Active
• Error
• Pending
• Pending Delete | ## Endpoint `POST /utilities/apple_pay/domains/www.example.com` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `register-create-an-apple-pay-on-the-web-domain` ### Body parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `async` | boolean | no | 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` | ### Example responses #### 200 (Result) ```json { "errors" : [], "response" : { "created_at" : "2021-04-17T22:28:44+10:00", "domain" : "test.com", "status" : "Active", "updated_at" : "2021-04-17T12:28:45+00:00" }, "successful" : true, "test" : true } ``` #### 404 (Result) ```json { "errors" : [ "Record for www.example.com not found" ], "response" : {}, "successful" : false, "test" : true } ``` --- Source: https://www.artspay.com/docs/api/digital-wallet-registration/merchant-registration/list-apple-pay-web-domains # List Apple Pay (web) domains Response fields: | Name | Type | Description | | --- | --- | --- | | domain | String | The domain registered with Apple | | status | String | The status of the domain registration. Possible values are:
*Active*
*Error*
*Pending*
*Pending Delete* | ## Endpoint `GET /utilities/apple_pay/domains` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `list-apple-pay-web-domains` ### Example responses #### 200 (Result) ```json { "errors" : [], "response" : [{ "domain" : "test.com", "status" : "Active" }], "successful" : true, "test" : true } ``` --- Source: https://www.artspay.com/docs/api/digital-wallet-registration/merchant-registration/check-get-an-apple-pay-on-the-web-domain # Check (Get) an Apple Pay on the Web Domain Response fields: | Name | Type | Description | | --- | --- | --- | | created\_at | DateTime | Timestamp the record was created at | | updated\_at | DateTime | Timestamp of the last update to the record | | domain | String | The domain registered with Apple | | status | String | The status of the domain registration. Possible values are:
• Active
• Error
• Pending
• Pending Delete | ## Endpoint `GET /utilities/apple_pay/domains/www.example.com` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `check-get-an-apple-pay-on-the-web-domain` ### Example responses #### 200 (Result) ```json { "errors" : [], "response" : { "created_at" : "2021-04-17T22:28:44+10:00", "domain" : "test.com", "status" : "Active", "updated_at" : "2021-04-17T12:28:45+00:00" }, "successful" : true, "test" : true } ``` #### 404 (Result) ```json { "errors" : [ "Record for www.example.com not found" ], "response" : {}, "successful" : false, "test" : true } ``` --- Source: https://www.artspay.com/docs/api/digital-wallet-registration/merchant-registration/remove-delete-an-apple-pay-on-the-web-domain # Remove (Delete) an Apple Pay on the Web Domain Response fields: | Name | Type | Description | | --- | --- | --- | | created\_at | DateTime | Timestamp the record was created at | | updated\_at | DateTime | Timestamp of the last update to the record | | domain | String | The domain registered with Apple | | status | String | The status of the domain registration. Possible values are:
• Active
• Error
• Pending
• Pending Delete | ## Endpoint `DELETE /utilities/apple_pay/domains/www.example.com` Base URL from the OpenAPI spec: - `https://gateway.pmnts-sandbox.io/v1.0` Operation ID: `remove-delete-an-apple-pay-on-the-web-domain` ### Example responses #### 202 (Result) ```json { "successful": true, "response": {}, "errors": [], "is_test": true } ``` #### 404 (Result) ```json { "errors" : [ "Record for www.example.com not found" ], "response" : {}, "successful" : false, "test" : true } ``` --- Source: https://www.artspay.com/docs/api/hosted-payment-pages/hosted-payment-pages # V2 - Overview *Fat Zebra provides a hosted payment page for merchants who wish to remove all PCI-DSS scope from their systems. This is known commercially as PayNow. Please note that merchants and service providers are required to complete Self-Assessment Questionnaire A to adhere to PCI DSS Compliance.* Currently the hosted payment page supports three methods of implementation: * Standard Hosted Page (i.e. redirection from the merchants website to the payment page) * iframe embedded page * Accounting platform payment page (for example Xero or Saasu) The V2 UI looks like this, but can be restyled by using the `css` parameter documented below: ![](https://files.readme.io/78b6065-image.png) ### Usage The data sent between the merchant and Fat Zebra, and from Fat Zebra to the merchant is sent in the request URL - to ensure that this has not been tampered with the payload includes a verification value, which is a signed-hash based on the payload values, using a shared secret between the merchant and Fat Zebra. This process has been closely modeled on the Fat Zebra Direct Post method - it is recommend you review this documentation for further details which may not be covered here. ### URLs There are two different URLs for the PayNow service - one for the Live environment and one for the Sandbox environment: | Environment | BASE URL | | :---------- | :----------------------------------- | | Sandbox | `https://paynow.pmnts-sandbox.io/v2` | | Live | `https://paynow.pmnts.io/v2` | ### Request In order to direct the customer to the hosted payment page the merchants website should prepare the following URL and either use this as the redirect destination, or as the IFRAME source: `https://paynow.pmnts.io/v2/[username]/[reference]/[currency]/[amount]/[hash]` #### URL Parameters The following parameters are required and are used to build the URL which the user should be redirected to (or as the source for the IFRAME): | Name | Type | Description | | --- | --- | --- | | amount | number | The amount of the transaction, as a decimal value.
For currencies which do not make use of the decimal/cent value this should be omitted as 00 (e.g. 300.00 for ¥300) | | hash | string | The hash is a MD5 hexdigest of a string compiled from the request parameters.
See below (**Verification Value Calculation**) for more details. | | reference | string | The invoice number or order reference | | currency | string (3 characters) | The [ISO-4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) 3-letter currency code for the transaction | | username | string | The merchants Fat Zebra username | #### Options Provide any of the following as query parameters to specify display options - these are **optional** parameters: | Name | Type | Description | Default | | --- | --- | --- | --- | | iframe | boolean | Indicates whether to show the stripped-down iframe layout or not | false | | show\_email | boolean | Indicates whether to show and require the email field or not | true | | show\_extras | boolean | Indicates whether to display the invoice number and the amount to the customer | true | | return\_path | string | The return URL for the transaction success - if this is omitted the result will be displayed on screen to the customer
• \*Note\*\*: if the a URL is specified it must be included in the verification hash. This may be a non-resolving URL for callback handling in mobile
applications if required (e.g. paymentcallback://....) | empty | | tokenize\_only | boolean | If this is set the card will not be charged, and will only be tokenized for future use | false | | auth | boolean | If this is set the card being tokenized or the transaction processed will have an auth for the **amount specified in the request** performed. This can be used to verify the card
details are valid before storing. | false | | recurring | boolean | *(Apple Pay only)*
If this is set, the payment will have an **ecm** of **32** (Internet Order - Recurring).
See [Recurring & Other Transaction Types](https://www.artspay.com/docs/developer/purchases/extra-and-extended-fields/recurring-and-other-transaction-types) for more details. | false | | button\_text | string | Specifies the text to be displayed for the submit button (e.g. Pay Now or Submit) | Pay Now | | visacheckout | boolean | Indicates whether to show the Visa Checkout button | true | | applepay | boolean | Indicates whether to show the Apple Pay button (if the user's device supports Apple Pay) | true | | googlepay | boolean | Indicates whether to show the Google Pay button (if the user's device supports Google Pay) | true | | return\_target | string | When used in iframe mode (iframe=true) specifies where the target for the form post (e.g. post back to \_parent, \_self or speficied) | empty | | postmessage | boolean | When used in iframe mode (iframe=true) specifies that the response should be sent using postMessage instead of redirecting | false | | css | string | HTTPS URL for external CSS - this must be a valid HTTPS URL, and serve up a valid CSS file. Depends on css\_signature | empty | | css\_signature | string | HMAC-MD5 of the css URL with the shared secret to sign the request. | empty | | logo\_url | string | HTTPS URL for the merchant logo. This must be a valid HTTPS URL and serve up a valid image file. | empty | | hide\_button | boolean | Hides the button from the checkout form for when the checkout should be triggered by postMessage. Note this option is dependent on the v2 layout. | false | | layout | string | Specifies the layout for the hosted payment page (also aliased as l - e.g. l=v2) | v1 | | cards | string, comma separated | Specifies the whitelist or blacklist of accepted cards. If the string is prefixed with an exclamation mark (!) the cards listed will not be permitted.
Possible values are: AMEX, JCB, VISA, MasterCard, Diners
**Examples**
!AMEX,JCB - disabled AMEX and JCB
VISA,AMEX - enabled only VISA and AMEX
• \*Note\*\* if this field is present it is included in the end of the verification value string. | empty | | surcharge | boolean | Specifies if a surcharge will be applied. Surcharge rates are set in the Surcharging section of the Merchant Dashboard.
• \*Note\*\*: if the surcharge field is set to true, “:true” must be appended in the verification hash. | false | | hide\_card\_holder | boolean | Specifies if the card holder name field should be hidden | false | **Note on external CSS:** When external CSS specified in the options the hosted payment page a number of verification and sanitisation steps are taken before rendering the CSS in the page, including: * Verifying the URL specified is served over HTTPS and is in-fact a CSS file * Verifying that the css\_signature matches the URL * Scrubbing any potentially dangerous CSS statements from the file After successful verification and sanitising , the filtered CSS is cached by the Hosted Payment Page for 5 minutes. If the cache needs to be updated, the following options are available: * Change the URL and update the signature to reflect - the CSS cache uses the filename and merchant ID as the cache key, so changing this will force the cache to be updated #### Verification Value Calculation There are two points of verification for requests - once when the request is received by Fat Zebra (when the hosted page is rendered to the user), and once when the response is returned to the merchant - it is important that the response is verified by the merchant to ensure that the response has not been tampered with by malicious users. ##### Request Verification (Redirect to Fat Zebra) The request received by Fat Zebra will be verified with the following steps: 1. The reference, currency, amount, and if present, hide\_card\_holder and return\_path will be concatenated into a string, joined by colons: ``` https://paynow.pmnts.io/v2/samsbooks/INV1121/AUD/100.25/xxxxxxxxxxx&hide_card_holder=true -> "INV1121:100.25:AUD:true" ``` If `hide_card_holder`and/or return\_path is not included, they will be omitted: ``` https://paynow.pmnts.io/v2/samsbooks/INV1121/AUD/100.25/xxxxxxxxxxx&hide_card_holder=true -> "INV1121:100.25:AUD" ``` 2. The value of this string will then be hashed with a HMAC-MD5, using the shared-secret known by Fat Zebra and the merchant (please contact Fat Zebra Support if you are unsure of where to find this shared secret). ``` shared_secret = "<>" verification = hmac_md5(shared_secret, "INV1121:100.25:AUD:true") ``` ##### Response Verification (Purchases) For purchases the response verification will consist of the response code, success indicator, amount, currency, transaction ID and the card token: ``` https://www.samsbooks.com/payment/callback?r=1&successful=true&amount=10025¤cy=AUD&id=001-P-ABCDG1124&token=abcd1234&v=xxxxx....... -> "1:true:10025:AUD:001-P-ABCDG1123:abcd1234" shared_secret = "<>" verification = hmac_md5(shared_secret, "1:true:10025:AUD:001-P-ABCDG1123:abcd1234") # v == verification should be true ``` The response for purchases will also include the following: | Name | Type | Description | | --- | --- | --- | | message | string | Any messages relating to the transaction | | amount | integer | The amount, as an integer | | reference | string | The transaction reference | | id | string | The Fat Zebra transaction ID | | currency | string | The [ISO-4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) 3-letter currency code for the transaction | | card\_number | string | The masked credit card number (e.g. 512345XXXXXXXX2346) | | card\_holder | string | The card holders name | | card\_expiry | date (mm/yyyy) | The card expiry date | | card\_type | string | The card type of the credit card used. Possible values are:
VISA, MasterCard, AMEX, JCB, Diners, Discover, China UnionPay, Unknown | | successful | boolean | Indicator of transaction success | ##### Response Verification (Tokenization) For tokenization the response verification will consist of the response code, and the card token: ``` https://www.samsbooks.com/payment/callback?r=1&token=abcd1234&v=xxxxxxxxx........ -> "1:abcd1234" shared_secret = "<>" verification = hmac_md5(shared_secret, "1:abcd1234") # v == verification should be true ``` The response for tokenization will also include the following: | Name | Type | Description | | :----------- | :------------- | :------------------------------------------------------ | | card\_number | string | The masked credit card number (e.g. 512345XXXXXXXX2346) | | card\_holder | string | The card holders name | | card\_expiry | date (mm/yyyy) | The card expiry date | | token | string | The token representing the card in Fat Zebra systems | #### Response Codes The following response codes are used when a redirect URL is provided: | Code | Description | | :--- | :------------------------------------------------------------------------------------------------------- | | 1 | Successful | | 2 | Declined - examine the message parameter for possible explanations | | 94 | Cancelled - the merchant clicked the Cancel button on the payment or checkout form | | 95 | Merchant Not Found - possible incorrect username | | 96 | Reference not unique | | 97 | Validation error - check the errors\[] parameters for error messages | | 99 | Invalid Verification - the verification value does not match the parameters supplied | | 999 | Gateway error - an unknown error has occurred and the merchant should investigate with Fat Zebra Support | #### IFRAME and postMessage Support The Hosted Payment Page supports being embedded in an IFRAME and communicating back to the parent window via the postMessage function. In order to support this the following needs to be done: 1. The postmessage=true parameter needs to be added to the URL 2. The following code should be added to handle the messages from the IFRAME: ```javascript window.paymentHost = "https://paynow.pmnts-sandbox.io"; var messageListener = function(event) { if (event.origin !== window.paymentHost) { return; } // Older browsers will have a query-string style data payload // Whereas newer browsers will have an object var payload = event.data; if (typeof event.data == 'string') { if (/\[object/i.test(event.data)) { alert("Sorry, it looks like there has been a problem communicating with your browser..."); // Raised if the serialization failed } // Deserialize into an object var pairs = payload.split("&"); payload = {}; for (var i = 0; i < pairs.length; i++) { var element = pairs[i]; var kv = element.split("="); payload[kv[0]] = kv[1]; } } if ('data' in payload) { var payload = payload.data; } switch (payload.message) { case "transaction.complete": // Handle the transaction complete message. // Payload will be in e.data.data (eg. payload.data.r == 1) return true; case "transaction.processing": // Handle the processing of the transaction - implementation optional. return true; case "transaction.cancelled": // Handle the transaction being cancelled (i.e. show message, re-display the window etc). return true; } }; if (window.addEventListener) { window.addEventListener("message", messageListener); } else { window.attachEvent("onmessage", messageListener); } ``` ### Testing Standard Fat Zebra test procedures apply for the Hosted Payment Page. For a successful transaction you should choose the MasterCard ending in 0014. If this card is not present (as this is a shared account) it can be re-added with the following details: --- Source: https://www.artspay.com/docs/api/hosted-payment-pages/v3-overview # V3 - Overview *Fat Zebra provides a hosted payment page for merchants who wish to remove all PCI-DSS scope from their systems. This is known commercially as PayNow. Please note that merchants and service providers are required to complete Self-Assessment Questionnaire A to adhere to PCI DSS Compliance.* Currently the hosted payment page supports three methods of implementation: * Standard Hosted Page (i.e. redirection from the merchants website to the payment page) * IFrame embedded page * Accounting platform payment page (for example Xero or Saasu) The V3 UI looks like this, but it can be re-styled using the `css` parameter, documented below: ![](https://files.readme.io/2f18059-image.png) ### Usage The data sent between the merchant and Fat Zebra, and from Fat Zebra to the merchant is sent in the request URL - to ensure that this has not been tampered with the payload includes a verification value, which is a signed-hash based on the payload values, using a shared secret between the merchant and Fat Zebra. This process has been closely modeled on the Fat Zebra Direct Post method - it is recommend you review this documentation for further details which may not be covered here. ### Adding Apple Pay Wallet parameters Please follow the full [Apple Pay configuration](https://www.artspay.com/docs/developer/wallets/apple-pay) guide prior to attempting to add it to your hosted payments page. ### Adding 3D Secure parameters Please contact via support@fatzebra.com ### Adding Google Pay parameters Activate Google Pay in the Payment Methods section of the Dashboard
### URLs There are two different URLs for the PayNow service - one for the Sandbox environment and one for the Live environment: | Environment | BASE URL | | :---------- | :----------------------------------- | | Sandbox | `https://paynow.pmnts-sandbox.io/v3` | | Live | `https://paynow.pmnts.io/v3` | ### Request In order to direct the customer to the hosted payment page the merchants website should prepare the following URL and either use this as the redirect destination, or as the IFRAME source: `https://paynow.pmnts.io/v3/[username]/[reference]/[currency]/[amount]/[hash]` #### URL Parameters The following parameters are required and are used to build the URL which the user should be redirected to (or as the source for the IFRAME): | Name | Type | Description | | --- | --- | --- | | amount | number | The amount of the transaction, as a decimal value.
For currencies which do not make use of the decimal/cent value this should be omitted as 00 (e.g. 300.00 for ¥300) | | hash | string | The hash is a MD5 hexdigest of a string compiled from the request parameters.
See below (**Verification Value Calculation**) for more details. | | reference | string | The invoice number or order reference | | currency | string (3 characters) | The [ISO-4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) 3-letter currency code for the transaction | | username | string | The merchants Fat Zebra username | #### Options Provide any of the following as query parameters to specify display options - these are **optional** parameters: | Name | Type | Description | Default | | --- | --- | --- | --- | | iframe | boolean | Indicates whether to show the stripped-down iframe layout or not | false | | show_email | boolean | Indicates whether to show and require the email field or not | true | | show_extras | boolean | Indicates whether to display the invoice number and the amount to the customer | true | | return_path | string | The return URL for the transaction success - if this is omitted the result will be displayed on screen to the customer
Note: if the a URL is specified it must be included in the verification hash. This may be a non-resolving URL for callback handling in mobile
applications if required (e.g. paymentcallback://....) | empty | | tokenize_only | boolean | If this is set the card will not be charged, and will only be tokenized for future use | false | | auth | boolean | If this is set the card being tokenized or the transaction processed will have an auth for the **amount specified in the request** performed. This can be used to verify the card
details are valid before storing. | false | | button_text | string | Specifies the text to be displayed for the submit button (e.g. Pay Now or Submit) | Pay Now | | return_target | string | When used in iframe mode (iframe=true) specifies where the target for the form post (e.g. post back to _parent, _self or speficied) | empty | | postmessage | boolean | When used in iframe mode (iframe=true) specifies that the response should be sent using postMessage instead of redirecting | false | | css | string | HTTPS URL for external CSS - this must be a valid HTTPS URL, and serve up a valid CSS file. Depends on css_signature | empty | | css_signature | string | HMAC-MD5 of the css URL with the shared secret to sign the request.
For example, the CSS signature for [https://example.com/example.css](https://example.com/example.css) with a shared secret of "TEST" would be:
`21387fed0d8f862e19a79b346eb710b8`
Importantly: this hash is not a hash of the _contents_ of the CSS file -- only the URL of the CSS file. | empty | | logo_url | string | HTTPS URL for the merchant logo. This must be a valid HTTPS URL and serve up a valid image file. | empty | | hide_button | boolean | Hides the button from the checkout form for when the checkout should be triggered by postMessage. Note this option is dependent on the v2 layout. | false | | cards | string, comma separated | Specifies the whitelist or blacklist of accepted cards. If the string is prefixed with an exclamation mark (!) the cards listed will not be permitted.
Possible values are: AMEX, JCB, VISA, MasterCard, Diners
**Examples**
!AMEX,JCB - disabled AMEX and JCB
VISA,AMEX - enabled only VISA and AMEX
• *Note** if this field is present it is included in the end of the verification value string. | empty | | surcharge | boolean | Specifies if a surcharge will be applied. Surcharge rates are set in the Surcharging section of the Merchant Dashboard.
• *Note**: if the surcharge field is set to true, “:true” must be appended in the verification hash. | false | | hide_card_holder | boolean | Specifies if the card holder name field should be hidden | false | **Note on external CSS:** When external CSS specified in the options the hosted payment page a number of verification and sanitisation steps are taken before rendering the CSS in the page, including: * Verifying the URL specified is served over HTTPS and is in-fact a CSS file * Verifying that the css_signature matches the URL * Scrubbing any potentially dangerous CSS statements from the file After successful verification and sanitising , the filtered CSS is cached by the Hosted Payment Page for 5 minutes. If the cache needs to be updated, the following options are available: * Change the URL and update the signature to reflect - the CSS cache uses the filename and merchant ID as the cache key, so changing this will force the cache to be updated #### Verification Value Calculation There are two points of verification for requests - once when the request is received by Fat Zebra (when the hosted page is rendered to the user), and once when the response is returned to the merchant - it is important that the response is verified by the merchant to ensure that the response has not been tampered with by malicious users. ##### Request Verification (Redirect to Fat Zebra) The request received by Fat Zebra will be verified with the following steps: 1. The reference, currency, amount, and if present, hide_card_holder and return_path will be concatenated into a string, joined by colons: ``` https://paynow.pmnts.io/v3/samsbooks/INV1121/AUD/100.25/xxxxxxxxxxx&hide_card_holder=true -> "INV1121:100.25:AUD:true" ``` If hide_card_holder and/or return_path is not included, they will be omitted: ``` https://paynow.pmnts.io/v3/samsbooks/INV1121/AUD/100.25/xxxxxxxxxxx&hide_card_holder=true -> "INV1121:100.25:AUD" ``` 2. The value of this string will then be hashed with a HMAC-MD5, using the shared-secret known by Fat Zebra and the merchant (please contact Fat Zebra Support if you are unsure of where to find this shared secret). ``` shared_secret = "<>" verification = hmac_md5(shared_secret, "INV1121:100.25:AUD:true") ``` ##### Response Verification (Purchases) For purchases the response verification will consist of the response code, success indicator, amount, currency, transaction ID and the card token: ``` https://www.samsbooks.com/payment/callback?r=1&successful=true&amount=10025¤cy=AUD&id=001-P-ABCDG1124&token=abcd1234&v=xxxxx....... -> "1:true:10025:AUD:001-P-ABCDG1123:abcd1234" shared_secret = "<>" verification = hmac_md5(shared_secret, "1:true:10025:AUD:001-P-ABCDG1123:abcd1234") # v == verification should be true ``` The response for purchases will also include the following: | Name | Type | Description | | --- | --- | --- | | message | string | Any messages relating to the transaction | | amount | integer | The amount, as an integer | | reference | string | The transaction reference | | id | string | The Fat Zebra transaction ID | | currency | string | The [ISO-4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) 3-letter currency code for the transaction | | card_number | string | The masked credit card number (e.g. 512345XXXXXXXX2346) | | card_holder | string | The card holders name | | card_expiry | date (mm/yyyy) | The card expiry date | | card_type | string | The card type of the credit card used. Possible values are:
VISA, MasterCard, AMEX, JCB, Diners, Discover, China UnionPay, Unknown | | successful | boolean | Indicator of transaction success | ##### Response Verification (Tokenization) For tokenization the response verification will consist of the response code, and the card token: ``` https://www.samsbooks.com/payment/callback?r=1&token=abcd1234&v=xxxxxxxxx........ -> "1:abcd1234" shared_secret = "<>" verification = hmac_md5(shared_secret, "1:abcd1234") # v == verification should be true ``` The response for tokenization will also include the following: | Name | Type | Description | | :---------- | :------------- | :------------------------------------------------------ | | card_number | string | The masked credit card number (e.g. 512345XXXXXXXX2346) | | card_holder | string | The card holders name | | card_expiry | date (mm/yyyy) | The card expiry date | | token | string | The token representing the card in Fat Zebra systems | #### Response Codes The following response codes are used when a redirect URL is provided: | Code | Description | | :--- | :------------------------------------------------------------------------------------------------------ | | 1 | Successful | | 2 | Declined - examine the message parameter for possible explanations | | 94 | Cancelled - the merchant clicked the Cancel button on the payment or checkout form | | 95 | Merchant Not Found - possible incorrect username | | 96 | Reference not unique | | 97 | Validation error - check the errors[] parameters for error messages | | 99 | Invalid Verification - the verification value does not match the parameters supplied | | 999 | Gateway error - an unknown error has occurred and the merchant should investigate with Fat Zebra Suppor | ### Testing Standard Fat Zebra test procedures apply for the Hosted Payment Page. You can use [our test card numbers](https://www.artspay.com/docs/developer/testing/test-card-numbers) to check the behaviour of the hosted payment page. --- Source: https://www.artspay.com/docs/api/hosted-payment-pages/persisted-invoices # Persisted Invoices Persisted invoices are invoices that have been uploaded via the Merchant Dashboard or via the API. In order to iFrame or direct your customers to our persisted invoices pages, authentication is required. ### 1. Authentication Authentication is achieved by providing some extra query parameters in the URL. This helps to avoid credit card skimming bots. The base path is `//invoices`. The query parameters that must be provided are: | Parameter | Explanation | | --- | --- | | nonce | A alphanumeric string, randomly generated by you each time the page is accessed. | | ts | An epoch timestamp representing the current time. | | v | An MD5 hex-encoded verification code which is the timestamp (ts) and the nonce concatenated with a colon and encoded with your "PayNow" token. | Below is an example of how to generate the verification code in Ruby. ```ruby v = OpenSSL::HMAC.hexdigest('md5', paynow_token, [timestamp, nonce].join(':')) ``` ### 2. HTML Insert one of the following to your website, replacing the nonce, ts and v parameters with your own. ```html Pay Now ``` ### 3. Landing Page (Reference Entry) When the customer arrives on the landing page, they will be asked to enter their invoice reference. ![854](https://files.readme.io/cbd6f9c-Screen_Shot_2017-11-27_at_10.11.01_am.png "Screen Shot 2017-11-27 at 10.11.01 am.png") ### 4. Credit Card Details Entry If the customer enters a valid reference, they can then see the details of the invoice and enter their credit card details. ![1138](https://files.readme.io/5816fb5-Screen_Shot_2017-11-27_at_10.15.26_am.png "Screen Shot 2017-11-27 at 10.15.26 am.png") ### 5. Confirmation If successful the customer will see a message confirming that the payment has been processed. ![1176](https://files.readme.io/b845f7b-Screen_Shot_2017-11-27_at_11.57.47_am.png "Screen Shot 2017-11-27 at 11.57.47 am.png") --- Source: https://www.artspay.com/docs/api/hosted-payment-pages/xero-and-saasu # Xero Integration To add Fat Zebra as an invoice payment option for Xero Invoices the following steps should be taken within your Xero account: 1. Click on **Settings** and then **General Settings** 2. Click on **Invoice Settings** 3. Click the **Payment Services** button, and then click **Add Payment Service**, and then choose **Custom Payment URL** 4. Name the service **Fat Zebra**, and set the service URL to the following, replacing **username** with your Fat Zebra merchant username: [https://paynow.pmnts.io/invoice/username/\[INVOICENUMBER\]/\[CURRENCY\]/\[AMOUNTDUE\]](https://paynow.pmnts.io/invoice/username/\[INVOICENUMBER]/\[CURRENCY]/\[AMOUNTDUE]) 5. Click **Save** 6. Go back to the **Invoice Settings** area, and click the **Options** button for the invoice template you wish to use this service for, and choose **Edit** 7. In the **Payment Services** drop down select the new **Fat Zebra** service you have created, and then click **Save** Once this is completed invoices which are sent via Xero will include a link to view the invoice online - the page hosting the invoice will also include a link to pay the invoice, which will redirect to Fat Zebra hosted payment page. --- Source: https://www.artspay.com/docs/api/hosted-payment-pages/mastercard-click-to-pay # Click to Pay [Click to Pay](https://www.mastercard.com.au/en-au/personal/ways-to-pay/click-to-pay.html) is a simple, secure, and consistent way to checkout. It is built on Industry standards on [EMV](https://www.emvco.com) specifications and smart security powered by Mastercard and is supported by major card schemes, such as Mastercard, Visa, and others. With millions of customers already enrolled in Click to Pay, leverage this capability to provide your customers a faster, secure, and best in class payment experience. We integrate to Click to Pay for all participating networks (including Mastercard and Visa) via Mastercard SRCi system providing an embedded checkout experience and currently support three methods of integration: * [Hosted Page ](https://www.artspay.com/docs/api/hosted-payment-pages/mastercard-click-to-pay/click-to-pay-hosted-payment-page)(i.e. redirection from the merchants website to the payment page) -- we host the whole checkout flow for you and redirect back to your site (when the `return_path` option is provided). * IFrame embed -- you embed the Click to Pay iframe within your own checkout flow, and we send events from the frame back to the parent page. * [JavaScript SDK](https://www.artspay.com/docs/api/hosted-payment-pages/mastercard-click-to-pay/click-to-pay-javascript-sdk) -- this embeds the iframe in a page for you and provides features to hook into those events. Both methods support Mastercard and Visa payment methods. ### Testing #### Best Practices Visa, Mastercard, and AMEX have strict fraud and velocity rules – running up agains them can cause failed transactions and 500 errors.\ Using a new email address is strongly recommended when repeating your tests. Repeating with the same emails will likely result in errors #### Sandbox Testing First, enroll with Mastercard's Sandbox by entering your details here: [https://sandbox.src.mastercard.com/profile/enroll](https://sandbox.src.mastercard.com/profile/enroll). Once you have a Click to Pay account you can then start using it. #### Test Credit Card Numbers For a full list of test numbers that work with Click to Pay, [please visit this page.](https://www.artspay.com/docs/api/hosted-payment-pages/mastercard-click-to-pay/click-to-pay-test-card-numbers#/) #### Variable response credit card numbers To test "variable response" card numbers, use the cents value of a purchase's price to specify which[ Response Code](https://www.artspay.com/docs/developer/purchases/response-codes) you would like. For example, a purchase with a price of $123.05 and any of the following cards would result in an 05 - Declined response. PAN Data cards: * 5120350100064545 * 5120350100064552 * 5186001700008876 * 5120350100064578 * 5186001700001434 Token Data cards: * 5120350100064537 * 5120350100064545 * 5120350100064552 * 5120350100064560 * 5120350100064578 #### Mastercard Click-To-Pay Action Sheet Installation: CDN: | Environment | URL | | :---------- | :--------------------------------------------------------------------------------------------------- | | Staging | [https://cdn.pmnts-staging.io/sdk/v1/fatzebra.css](https://cdn.pmnts-staging.io/sdk/v1/fatzebra.css) | | Sandbox | [https://cdn.pmnts-sandbox.io/sdk/v1/fatzebra.css](https://cdn.pmnts-sandbox.io/sdk/v1/fatzebra.css) | | Production | [https://cdn.pmnts.io/sdk/v1/fatzebra.css](https://cdn.pmnts.io/sdk/v1/fatzebra.css) | These are the classes and id's required to display MasterCard's recommended action sheet for click-to-pay. ```
``` This will render: on Desktop an animated side bar: ![](https://files.readme.io/509475b-Screenshot_2023-11-10_at_11.33.31_am.png) on Mobile an animated action sheet: ![](https://files.readme.io/e71d195-Screenshot_2023-11-10_at_11.33.16_am.png) For further reference: [https://github.com/Mastercard/action-sheet-reference-app](https://github.com/Mastercard/action-sheet-reference-app) --- Source: https://www.artspay.com/docs/api/hosted-payment-pages/mastercard-click-to-pay/click-to-pay-configuration # Click to Pay - Configuration The following configuration documentation is for all forms of Click to Pay. ### URLs There are two different URLs for the PayNow service - one for the Sandbox environment and one for the Live environment: | Environment | BASE URL | | :---------- | :---------------------------------------------- | | Sandbox | `https://paynow.pmnts-sandbox.io/v3/clicktopay` | | Live | `https://paynow.pmnts.io/v3/clicktopay` | ### Request In order to direct the customer to the hosted payment page the merchants website should prepare the following URL and either use this as the redirect destination, or as the iframe source: `https://paynow.pmnts.io/v3/clicktopay/[username]/[reference]/[currency]/[amount]/[hash]` #### User identification URL Parameters The Click to Pay integration also allows you to pass in two parameters to identify your users. | Name | Type | Description | | :----- | :----- | :---------------------------------------------------------------------------------------------------------------------------- | | email | string | The email address for your user | | mobile | string | The mobile number for your user. Can either be in a format of `0491 570 006` or can include a country code: `+61 491 570 006` | If you pass both, a lookup will be attempted first for email, and then mobile. #### URL Parameters The following parameters are required and are used to build the URL which the user should be redirected to (or as the source for the IFRAME): | Name | Type | Description | | --- | --- | --- | | username | string | The merchants Fat Zebra username | | reference | string | The invoice number or order reference | | currency | string (3 characters) | The [ISO-4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) 3-letter currency code for the transaction | | amount | number | The amount of the transaction, as a decimal value.
For currencies which do not make use of the decimal/cent value this should be omitted as 00 (e.g. 300.00 for ¥300) | | hash | string | The hash is a MD5 hexdigest of a string compiled from the request parameters.
See below (**Verification Value Calculation**) for more details. | #### Options Provide any of the following as query parameters to specify display options - these are **optional** parameters: | Name | Type | Description | Default | | --- | --- | --- | --- | | auth | boolean | If this is set the card being tokenized or the transaction processed will have an auth for the **amount specified in the request** performed. This can be used to verify the card details are valid before storing. | false | | card\_list\_button\_text | string | Sets the button text on the card list step of the flow. Default value is conditional based on `tokenizeOnly` value. | Confirm payment / Confirm payment method | | css | string | HTTPS URL for external CSS - this must be a valid HTTPS URL, and serve up a valid CSS file. Depends on `css_signature` | empty | | css\_signature | string | HMAC-MD5 of the css URL with the shared secret to sign the request. | empty | | display\_name | string | Sets the merchant name displayed in the 'Save card for future use' text block when checking out with a new card. | merchant trading name | | email | string | An email address to identify the user for Click to Pay. Used to perform an ID lookup as soon as the component loads. Can be passed at the same time as `mobile`. | empty | | hide\_confirm\_button | boolean | Hides the "Confirm Payment" button on the final "Confirmation" step of the Click to Pay checkout form for when the checkout should be triggered by the parent frame (via a postmessage) | false | | hide\_manual\_entry\_link | boolean | Hides the "Enter card details manually" link at the bottom of all Click to Pay screens. | false | | iframe | boolean | If you're rendering Click to Pay in an iframe, this will need to be set to `true`. | false | | mobile | string | A mobile number to identify the user for Click to Pay. Used to perform an ID lookup as soon as the component loads. Can be passed at the same time as `email`. | empty | | return\_path | string | The return URL for the transaction success - if this is omitted the result will be displayed on screen to the customer
• \*Note\*\*: if the a URL is specified it must be included in the verification hash. This may be a non-resolving URL for callback handling in mobile
applications if required (e.g. paymentcallback://....) | empty | | return\_target | string | The target for the form post (e.g. post back to `_parent`, `_self` or specified) | empty | | shared\_data | string | Comma-separated string that sets the shared data types specified in the 'Save card for future use' text block when checking out with a new card.
Options are:
• card (=> "card details")
• billing (=> "billing address")
• email (=> "email")
• mobile (=> "mobile number") | card,billing,email,mobile | | submit\_payment\_button\_text | string | Sets the button text on the new card checkout and manual card entry steps of the flow. Default value is conditional based on `tokenizeOnly` value. | Pay Now /
Add payment method | | tokenize\_only | boolean | Used to store just the card details themselves, without authorizing or capturing a purchase. | false | **Note on external CSS:** When external CSS specified in the options the hosted payment page a number of verification and sanitisation steps are taken before rendering the CSS in the page, including: * Verifying the URL specified is served over HTTPS and is in-fact a CSS file * Verifying that the css\_signature matches the URL * Scrubbing any potentially dangerous CSS statements from the file After successful verification and sanitising , the filtered CSS is cached by the Hosted Payment Page for 5 minutes. If the cache needs to be updated, the following options are available: * Change the URL and update the signature to reflect - the CSS cache uses the filename and merchant ID as the cache key, so changing this will force the cache to be updated #### Verification Value Calculation There are two points of verification for requests - once when the request is received by Fat Zebra (when the hosted page is rendered to the user), and once when the response is returned to the merchant - it is important that the response is verified by the merchant to ensure that the response has not been tampered with by malicious users. ##### Request Verification (Redirect to Fat Zebra) The request received by Fat Zebra will be verified with the following steps: 1. The reference, currency, amount will be concatenated into a string, joined by colons: ``` https://paynow.pmnts.io/v3/clicktopay/samsbooks/INV1121/AUD/100.25/xxxxxxxxxxx -> "INV1121:100.25:AUD" ``` 2. The value of this string will then be hashed with a HMAC-MD5, using the shared-secret known by Fat Zebra and the merchant (please contact Fat Zebra Support if you are unsure of where to find this shared secret). ``` shared_secret = "<>" verification = hmac_md5(shared_secret, "INV1121:100.25:AUD") ``` ##### Response Verification (Purchases) For purchases the response verification will consist of the response code, success indicator, amount, currency, transaction ID and the card token: ``` https://www.samsbooks.com/payment/callback?r=1&successful=true&amount=10025¤cy=AUD&id=001-P-ABCDG1124&token=abcd1234&v=xxxxx....... -> "1:true:10025:AUD:001-P-ABCDG1123:abcd1234" shared_secret = "<>" verification = hmac_md5(shared_secret, "1:true:10025:AUD:001-P-ABCDG1123:abcd1234") # v == verification should be true ``` The response for purchases will also include the following: | Name | Type | Description | | --- | --- | --- | | message | string | Any messages relating to the transaction | | amount | integer | The amount, as an integer | | reference | string | The transaction reference | | id | string | The Fat Zebra transaction ID | | currency | string | The [ISO-4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) 3-letter currency code for the transaction | | card\_number | string | The masked credit card number (e.g. 512345XXXXXXXX2346) | | card\_holder | string | The card holders name | | card\_expiry | date (mm/yyyy) | The card expiry date | | card\_type | string | The card type of the credit card used. Possible values are:
VISA, MasterCard | | successful | boolean | Indicator of transaction success | --- Source: https://www.artspay.com/docs/api/hosted-payment-pages/mastercard-click-to-pay/click-to-pay-hosted-payment-page # Click to Pay - Hosted Payment Page Mastercard Click to Pay securely stores users credit cards so that they can retrieve them during a checkout process. You can direct this integration to retrieve a particular user's cards by providing the `email` or `mobile` query parameters in the request. Mastercard Click to Pay will also remember users across different checkout sessions, even across different merchants. If the user is known via this route, they will be taken straight to their list of cards within the "User Flow" section shown below. #### User Flow When these parameters are passed, this integration will automatically perform a Click to Pay user lookup. If the user is found, then the user will be prompted to enter an OTP code to verify themselves with the Click to Pay system: ![](https://files.readme.io/46400c7-image.png) If the OTP code is correct, then the user will be shown a list of their cards: ![](https://files.readme.io/43e382f-image.png) When the card is selected, the confirmation screen appears: ![](https://files.readme.io/b9521c7-image.png) Clicking "Confirm payment" will show the Mastercard Click to Pay confirmation loading screen while the payment is being processed: ![](https://files.readme.io/b099a34-image.png) Once the payment has been processed, you will see a receipt screen: ![](https://files.readme.io/2c01c12-image.png) Alternatively, if you have provided a `return_path` parameter during the initial checkout flow, the user will be redirected to that path instead. ### URLs There are two different URLs for the PayNow service - one for the Sandbox environment and one for the Live environment: | Environment | BASE URL | | :---------- | :---------------------------------------------- | | Sandbox | `https://paynow.pmnts-sandbox.io/v3/clicktopay` | | Live | `https://paynow.pmnts.io/v3/clicktopay` | ### Request In order to direct the customer to the hosted payment page the merchants website should prepare the following URL and either use this as the redirect destination, or as the IFRAME source: `https://paynow.pmnts.io/v3/clicktopay/[username]/[reference]/[currency]/[amount]/[hash]` #### User identification URL Parameters The Click to Pay integration also allows you to pass in two parameters to identify your users. | Name | Type | Description | | :----- | :----- | :---------------------------------------------------------------------------------------------------------------------------- | | email | string | The email address for your user | | mobile | string | The mobile number for your user. Can either be in a format of `0491 570 006` or can include a country code: `+61 491 570 006` | If you pass both, a lookup will be attempted first for email, and then mobile. #### URL Parameters The following parameters are required and are used to build the URL which the user should be redirected to (or as the source for the IFRAME): | Name | Type | Description | | --- | --- | --- | | username | string | The merchants Fat Zebra username | | reference | string | The invoice number or order reference | | currency | string (3 characters) | The [ISO-4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) 3-letter currency code for the transaction | | amount | number | The amount of the transaction, as a decimal value.
For currencies which do not make use of the decimal/cent value this should be omitted as 00 (e.g. 300.00 for ¥300) | | hash | string | The hash is a MD5 hexdigest of a string compiled from the request parameters.
See below (**Verification Value Calculation**) for more details. | #### Options Provide any of the following as query parameters to specify display options - these are **optional** parameters: | Name | Type | Description | Default | | --- | --- | --- | --- | | auth | boolean | If this is set the card being tokenized or the transaction processed will have an auth for the **amount specified in the request** performed. This can be used to verify the card details are valid before storing. | false | | card\_list\_button\_text | string | Sets the button text on the card list step of the flow. Default value is conditional based on `tokenizeOnly` value. | Confirm payment / Confirm payment method | | css | string | HTTPS URL for external CSS - this must be a valid HTTPS URL, and serve up a valid CSS file. Depends on `css_signature` | empty | | css\_signature | string | HMAC-MD5 of the css URL with the shared secret to sign the request. | empty | | display\_name | string | Sets the merchant name displayed in the 'Save card for future use' text block when checking out with a new card. | merchant trading name | | email | string | An email address to identify the user for Click to Pay. Used to perform an ID lookup as soon as the component loads. Can be passed at the same time as `mobile`. | empty | | hide\_confirm\_button | boolean | Hides the "Confirm Payment" button on the final "Confirmation" step of the Click to Pay checkout form for when the checkout should be triggered by the parent frame (via a postmessage) | false | | hide\_manual\_entry\_link | boolean | Hides the "Enter card details manually" link at the bottom of all Click to Pay screens. | false | | iframe | boolean | If you're rendering Click to Pay in an iframe, this will need to be set to `true`. | false | | mobile | string | A mobile number to identify the user for Click to Pay. Used to perform an ID lookup as soon as the component loads. Can be passed at the same time as `email`. | empty | | return\_path | string | The return URL for the transaction success - if this is omitted the result will be displayed on screen to the customer
• \*Note\*\*: if the a URL is specified it must be included in the verification hash. This may be a non-resolving URL for callback handling in mobile
applications if required (e.g. paymentcallback://....) | empty | | return\_target | string | The target for the form post (e.g. post back to `_parent`, `_self` or specified) | empty | | shared\_data | string | Comma-separated string that sets the shared data types specified in the 'Save card for future use' text block when checking out with a new card.
Options are:
• card (=> "card details")
• billing (=> "billing address")
• email (=> "email")
• mobile (=> "mobile number") | card,billing,email,mobile | | submit\_payment\_button\_text | string | Sets the button text on the new card checkout and manual card entry steps of the flow. Default value is conditional based on `tokenizeOnly` value. | Pay Now /
Add payment method | | tokenize\_only | boolean | Used to store just the card details themselves, without authorizing or capturing a purchase. | false | **Note on external CSS:** When external CSS specified in the options the hosted payment page a number of verification and sanitisation steps are taken before rendering the CSS in the page, including: * Verifying the URL specified is served over HTTPS and is in-fact a CSS file * Verifying that the css\_signature matches the URL * Scrubbing any potentially dangerous CSS statements from the file After successful verification and sanitising , the filtered CSS is cached by the Hosted Payment Page for 5 minutes. If the cache needs to be updated, the following options are available: * Change the URL and update the signature to reflect - the CSS cache uses the filename and merchant ID as the cache key, so changing this will force the cache to be updated #### Verification Value Calculation There are two points of verification for requests - once when the request is received by Fat Zebra (when the hosted page is rendered to the user), and once when the response is returned to the merchant - it is important that the response is verified by the merchant to ensure that the response has not been tampered with by malicious users. ##### Request Verification (Redirect to Fat Zebra) The request received by Fat Zebra will be verified with the following steps: 1. The reference, currency, amount will be concatenated into a string, joined by colons: ``` https://paynow.pmnts.io/v3/clicktopay/samsbooks/INV1121/AUD/100.25/xxxxxxxxxxx -> "INV1121:100.25:AUD" ``` 2. The value of this string will then be hashed with a HMAC-MD5, using the shared-secret known by Fat Zebra and the merchant (please contact Fat Zebra Support if you are unsure of where to find this shared secret). ``` shared_secret = "<>" verification = hmac_md5(shared_secret, "INV1121:100.25:AUD") ``` ##### Response Verification (Purchases) For purchases the response verification will consist of the response code, success indicator, amount, currency, transaction ID and the card token: ``` https://www.samsbooks.com/payment/callback?r=1&successful=true&amount=10025¤cy=AUD&id=001-P-ABCDG1124&token=abcd1234&v=xxxxx....... -> "1:true:10025:AUD:001-P-ABCDG1123:abcd1234" shared_secret = "<>" verification = hmac_md5(shared_secret, "1:true:10025:AUD:001-P-ABCDG1123:abcd1234") # v == verification should be true ``` The response for purchases will also include the following: | Name | Type | Description | | --- | --- | --- | | message | string | Any messages relating to the transaction | | amount | integer | The amount, as an integer | | reference | string | The transaction reference | | id | string | The Fat Zebra transaction ID | | currency | string | The [ISO-4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) 3-letter currency code for the transaction | | card\_number | string | The masked credit card number (e.g. 512345XXXXXXXX2346) | | card\_holder | string | The card holders name | | card\_expiry | date (mm/yyyy) | The card expiry date | | card\_type | string | The card type of the credit card used. Possible values are:
VISA, MasterCard | | successful | boolean | Indicator of transaction success | The following Click to Pay transaction metadata will also be appended where available: | Name | Type | Description | | :------------------------------ | :----- | :-------------------------- | | click\_to\_pay\_correlation\_id | string | Click to Pay correlation ID | | click\_to\_pay\_transaction\_id | string | Click to Pay transaction ID | | click\_to\_pay\_flow\_id | string | Click to Pay flow ID | ##### Response Verification (Tokenization) For tokenization the response verification will consist of the response code, and the card token: ``` https://www.samsbooks.com/payment/callback?r=1&token=abcd1234&v=xxxxxxxxx........ -> "1:abcd1234" shared_secret = "<>" verification = hmac_md5(shared_secret, "1:abcd1234") # v == verification should be true ``` The response for tokenization will also include the following: | Name | Type | Description | | :----------- | :------------- | :------------------------------------------------------ | | card\_number | string | The masked credit card number (e.g. 512345XXXXXXXX2346) | | card\_holder | string | The card holders name | | card\_expiry | date (mm/yyyy) | The card expiry date | | token | string | The token representing the card in Fat Zebra systems | The following Click to Pay transaction metadata will also be appended where available: | Name | Type | Description | | :------------------------------ | :----- | :-------------------------- | | click\_to\_pay\_correlation\_id | string | Click to Pay correlation ID | | click\_to\_pay\_transaction\_id | string | Click to Pay transaction ID | | click\_to\_pay\_flow\_id | string | Click to Pay flow ID | #### Response Codes The following response codes are used when a redirect URL is provided: | Code | Description | | :--- | :------------------------------------------------------------------------------------------------------- | | 1 | Successful | | 2 | Declined - examine the message parameter for possible explanations | | 94 | Cancelled - the merchant clicked the Cancel button on the payment or checkout form | | 95 | Merchant Not Found - possible incorrect username | | 96 | Reference not unique | | 97 | Validation error - check the errors\[] parameters for error messages | | 99 | Invalid Verification - the verification value does not match the parameters supplied | | 999 | Gateway error - an unknown error has occurred and the merchant should investigate with Fat Zebra Support | --- Source: https://www.artspay.com/docs/api/hosted-payment-pages/mastercard-click-to-pay/click-to-pay-iframe-embed # Click to Pay - iFrame Embed When using the iframe embed option, generate a URL as per the steps outlined in the [Configuration documentation](https://www.artspay.com/docs/api/hosted-payment-pages/mastercard-click-to-pay/click-to-pay-configuration). ### Cross-frame communication (with `tokenizeOnly`) When the `tokenize_only` parameter is set to `true`, and the `postmessage` parameter to `true`, then your parent frame will receive an event, which you can subscribe with this code: ``` ``` The shape of the data is documented on the ["Using tokenized cards" page](https://www.artspay.com/docs/api/hosted-payment-pages/mastercard-click-to-pay/click-to-pay-using-tokenized-cards). --- Source: https://www.artspay.com/docs/api/hosted-payment-pages/mastercard-click-to-pay/click-to-pay-javascript-sdk # Click to Pay - JavaScript SDK To use Click to Pay with FatZebra's JavaScript SDK, you call the `renderClickToPay` function: ```javascript javascript fz.renderClickToPay({ containerId: 'fz-paynow', paymentIntent: { payment: { amount: 100, currency: "AUD", reference: "ABCD1234", }, verification: hash, } }); ``` The `containerId` parameter here will render the Click to Pay UI within the element with that ID. An example element would be: ```ruby HTML
``` You may wish to pass an email and/or mobile as options to identify a user for the Click to Pay flow ``` fz.renderClickToPay({ containerId: 'fz-paynow', paymentIntent: { payment: { amount: 100, currency: "AUD", reference: "ABCD1234", }, verification: hash, }, options: { email: "test@example.com", mobile: "0491 571 266", } }); ``` Calling this function will render an iframe within the specified element on the page. The User Flow here is identical to how it works on the ["Hosted Payment Page" version ](https://www.artspay.com/docs/api/hosted-payment-pages/mastercard-click-to-pay/click-to-pay-hosted-payment-page)of this form. For other options, please see the `options` section below. ### Verification hash calculation The verification hash is calculated by combining the reference, amount and currency into a string. Using the examples above: ``` ABCD1234:100:AUD ``` This string is then HMAC-MD5 encrypted using your account's shared secret value. If this secret value was `52ccce5a5c5`, then the way to calculate this hash would be: ``` HmacMD5("ABCD1234:100:AUD", "52ccce5a5c5").toString(); ``` This would result in the hash of: ``` d02851631e2f836ac10bb33e58687dd4 ``` #### returnPath option is included in hash calculation **Note:** if you also include the `returnPath` option, it will be appended to the end of your hash calculation: ``` HmacMD5("ABCD1234:100:AUD:https://example.com/purchase/successful", "52ccce5a5c5").toString(); ``` The calculated hash for this is: ``` 8db3bc06cf4c87f9ea6ed27bfb1ed4f6 ``` #### Check your verification hashes You can check your hash calculation method by using our [Verification Hash Generator](https://fat-zebra-verification.vercel.app/). ### PaymentIntent.Payment The payment intent options indicate the information about the payment once it gets completed. | Option | Description | | :---------- | :-------------------------------------- | | `amount` | The amount (in cents) for the purchase. | | `currency` | The currency for this amount. | | `reference` | A unique reference for this purchase. | ### Options The `renderClickToPay` function takes several options. | Name | Type | Description | Default | | --- | --- | --- | --- | | `auth` | boolean | If this is set the card being tokenized or the transaction processed will have an auth for the **amount specified in the request** performed. This can be used to verify the card details are valid before storing. | `false` | | `cardListButtonText` | string | Sets the button text on the card list step of the flow. Default value is conditional based on `tokenizeOnly` value. | Confirm payment / Confirm payment method | | `css` | string | HTTPS URL for external CSS - this must be a valid HTTPS URL, and serve up a valid CSS file. Depends on `css_signature` | blank | | `cssSignature` | string | HMAC-MD5 of the css URL with the shared secret to sign the request. | blank | | `displayName` | string | Sets the merchant name displayed in the 'Save card for future use' text block when checking out with a new card. | merchant trading name | | `email` | string | An email address to identify the user for Click to Pay. Used to perform an ID lookup as soon as the component loads. Can be passed at the same time as `mobile`. | blank | | `hideConfirmButton` | boolean | Determines whether or not to display the "Confirm Payment" button after a card has been selected during the Click to Pay flow. | `false` | | `hideManualEntryLink` | boolean | Hides the "Enter card details manually" link at the bottom of all Click to Pay screens. | `false` | | `mobile` | string | A mobile number to identify the user for Click to Pay. Used to perform an ID lookup as soon as the component loads. Can be passed at the same time as `email`. | blank | | `mrt` | string | Token generated by the Click to Pay digital checkout flow to assist with user recognition. | blank | | `returnPath` | string | (Used only for complete payment flow). A URL for where to return the user back to once their purchase is complete.
If you do not provide this option, the default "Receipt Screen" will appear instead. | blank | | `returnTarget` | string, either "\_self" or "\_parent" | (Used only for the complete payment flow). Determines which part of the screen will be redirected once the payment completes. Use `_self` if you wish for the iframe to be redirected, or `_parent` if you want the containing page to be redirected instead. | defaults to \_parent behaviour | | `sharedData` | string | Comma-separated string that sets the shared data types specified in the 'Save card for future use' text block when checking out with a new card.
Options are:
• card (=> "card details")
• billing (=> "billing address")
• email (=> "email")
• mobile (=> "mobile number") | card,billing,email,mobile | | `submitPaymentButtonText` | string | Sets the button text on the new card checkout and manual card entry steps of the flow. Default value is conditional based on `tokenizeOnly` value. | Pay Now /
Add payment method | | `tokenizeOnly` | boolean | Determines whether a card will only be tokenized (when this is set to `true`), or if a payment will be captured (when this is set to `false`)
You will want to set this option if you wish to modify the payment amount before capturing the full payment, for example if you're applying a surcharge or a discount. | `false` | **Note on external CSS:** When external CSS specified in the options the hosted payment page a number of verification and sanitisation steps are taken before rendering the CSS in the page, including: * Verifying the URL specified is served over HTTPS and is in-fact a CSS file * Verifying that the css\_signature matches the URL * Scrubbing any potentially dangerous CSS statements from the file After successful verification and sanitising , the filtered CSS is cached by the Hosted Payment Page for 5 minutes. If the cache needs to be updated, the following options are available: * Change the URL and update the signature to reflect - the CSS cache uses the filename and merchant ID as the cache key, so changing this will force the cache to be updated ### Events The following events may be subscribed to during the Click to Pay flow: * `fz.click_to_pay.dcf` - emitted when the Digital Checkout Flow (DCF) is loaded. The card scheme hosting the flow is indicated in the event data. ``` { message: 'Digital checkout form loaded.', data: { cardScheme: <'visa'|'mastercard'|'amex'> }, } ``` * `fz.click_to_pay.mrt` - emitted if a user elects to be remembered in the browser in a new user checkout/OTP flow AND a recognition token is returned during the Click to Pay checkout. The recognition token value is provided in the event data. * When a non-null token value is emitted, it should be persisted as a first-class cookie. * When a null token value is emitted (signifying user sign-out), any associated cookie should be removed. * On the call to `renderClickToPay()`, the cookie value should be fetched and passed in via the `mrt`option. This value will then be used to initialise the Click to Pay checkout. ``` { message: 'MRT created.', data: { mrt: } } ``` * `fz.click_to_pay.resize` - emitted when the Click to Pay container is resized. The new container height (in pixels) is provided in the event data. Note that this event will not be emitted when the DCF flow is entered as this content is controlled by the card schemes. We provide the `fz.click_to_pay.dcf`event to notify when this flow is launched, together with the hosting card scheme, to assist with appropriately sizing the container. ``` { message: 'Container resized.', data: { heightPx: } } ``` * `fz.click_to_pay.tokenization.success` - emitted on tokenization success. This event's body and how to use it is explained further in the ["Using Tokenized Cards"](https://www.artspay.com/docs/api/hosted-payment-pages/mastercard-click-to-pay/click-to-pay-using-tokenized-cards) page. --- Source: https://www.artspay.com/docs/api/hosted-payment-pages/mastercard-click-to-pay/click-to-pay-using-tokenized-cards # Click to Pay - Using tokenized cards When you use Click to Pay, you may wish to tokenize a card and then issue a purchase against that card at a later time. You may wish to do this if you're altering the cost of a purchase, such as when you're applying a surcharge or a discount during the checkout flow. Or, if you wish to use this card for recurring purchases. You can opt-in to this process by using the `tokenize_only` parameter during the checkout flow. Consult either the iframe or SDK pages for how to subscribe to these relevant tokenization events. In both cases, you'll get back an `'fz.click_to_pay.tokenization.success'` event. This event will contain data in this shape: ```json json { "message": "Card tokenization success.", "data": { "gatewayResponse": { "r": 1, "successful": true, "token": "d846bgx28s97l3u2ke3k", "tokenizeOnly": true, "cardHolder": "MasterCard Click To Pay User", "cardNumber": "518600XXXXXX8785", "cardExpiry": "07/2027", "cardType": "MasterCard", "cardCategory": "Credit", "cardSubcategory": "Standard", "clickToPay": { "correlationId": "34f4a04b.fa6ba445-8530-458d-856b-6867fce06b46", "transactionId": "0a4e0d3.34f4a04b.296f80511b492eda82f4d20017d35c0f12693bfd", "flowId": "34f4a04b.fa6ba445-8530-458d-856b-6867fce06b46.1699227515" }, "v": "f4249fe67d0dc3ca86e57353b69d914f" }, "clickToPayResponse": { "srcDigitalCardId": "4b20076b-c13b-4a66-a8e1-015caab73d7a", "panBin": "518600", "panLastFour": "8785", "digitalCardData": { "descriptorName": "Mastercard", "artUri": "https://sbx.assets.mastercard.com/card-art/combined-image-asset/HIGH-MASK-3x.png", "isCoBranded": false, "status": "ACTIVE" }, "digitalCardFeatures": [], "panExpirationMonth": "07", "panExpirationYear": "2027", "paymentCardDescriptor": "mastercard", "paymentCardType": "PREPAID", "maskedBillingAddress": {}, "cardholderFirstName": "R***", "cardholderLastName": "B***", "cardholderFullName": "R*** B***" } } } ``` **Note:** when applying a surcharge, use the first 6 digits of the `gatewayResponse.cardNumber` field. This value is always populated, where as `clickToPayResponse.panBIN` will only be populated in certain situations. Do not rely on `clickToPayResponse.panBIN` being present for surcharge calculation. We return both the Gateway and Click to Pay response here to give you the most information you need to potentially display the chosen card's information back to the consumer. The `token` here will be consistent for the selected card, and future purchases through the Click to Pay flow will be tied to this token. We encourage you to continue to route the user through the Click to Pay flow, for security reasons. #### Verifying postmessages The `v` value returned in `gatewayResponse` is a hash of the token and your account's shared secret. Using the above details of `r=1` and `token=d846bgx28s97l3u2ke3k`, and a shared secret value of `52ccce5a5c5` in a HMAC-MD5 calculation, we combine them like this: ```javascript HmacMD5(":", "").toString(); ``` With the above values we get: ```javascript HmacMD5("1:d846bgx28s97l3u2ke3k", "52ccce5a5c5").toString(); ``` And then this results in a verification value of: ``` 7a84eef23efedecb693575315f0c6abb ``` #### Submitting purchases after tokenization When making a purchase request, you should pass your intended amount through (in cents) and token (from `gatewayResponse.token`) through in the request. **If this purchase was initiated from the Click to Pay flow, you should also include the Click to Pay metadata in the transaction.** If this purchase was initiated outside of the Click to Pay flow, such as for a recurring subscription charge, you do not need to include this information. Here's an example using our Ruby gem, showing how the Click to Pay metadata is included: ```ruby Ruby FatZebra::Purchase.create( amount: 104, reference: "ABCD1234" token: token, customer_ip: customer_ip, metadata: { click_to_pay_correlation_id: click_to_pay_correlation_id, click_to_pay_flow_id: click_to_pay_flow_id, click_to_pay_transaction_id: click_to_pay_transaction_id, } ) ``` This metadata is for tracking purposes only, and we can use it to correlate events between users opting-in to the the Click to Pay checkout, and fulfilling a transactional flow. --- Source: https://www.artspay.com/docs/api/hosted-payment-pages/mastercard-click-to-pay/click-to-pay-test-card-numbers # Click to Pay - Test Card Numbers Please use the below card numbers when testing Click to Pay. Note - Mastercard may update these numbers yearly. [See the Mastercard developer documentation here.](https://developer.mastercard.com/unified-checkout-solutions/documentation/testing/test_cases/click_to_pay_case/#test-cards) ### Mastercard test cards #### Test cards to receive PAN data | Card Number | Expiry Date | CVV | | :--------------- | :-------------- | :----------- | | 5186001700008785 | Any future date | Any 3 digits | | 5186001700009726 | Any future date | Any 3 digits | | 5186001700009908 | Any future date | Any 3 digits | | 5186001700008876 | Any future date | Any 3 digits | | 5186001700001434 | Any future date | Any 3 digits | #### Test cards to receive token data | Card Number | Expiry Date | CVV | | :--------------- | :-------------- | :----------- | | 5120350100064537 | Any future date | Any 3 digits | | 5120350100064545 | Any future date | Any 3 digits | | 5120350100064552 | Any future date | Any 3 digits | | 5120350100064560 | Any future date | Any 3 digits | | 5120350100064578 | Any future date | Any 3 digits | #### Tokenisation eligible test cards for token authentication framework | Card Number | Expiry Date | CVV | Region | Authentication Outcome | | :--------------- | :-------------- | :----------- | :----- | :----------------------- | | 2223001870064586 | Any future date | Any 3 digits | US | Successful 3DS Challenge | | 5204731620064595 | Any future date | Any 3 digits | US | Successful 3DS Challenge | | 5204731620064587 | Any future date | Any 3 digits | US | Successful 3DS Challenge | | 5120350261420361 | Any future date | Any 3 digits | UK | Successful 3DS Challenge | | 5120350268376905 | Any future date | Any 3 digits | UK | Successful 3DS Challenge | | 5120350283765454 | Any future date | Any 3 digits | UK | Successful 3DS Challenge | | 5506900487058777 | Any future date | Any 3 digits | US | Failed 3DS Challenge | | 5506900487741018 | Any future date | Any 3 digits | US | Failed 3DS Challenge | ### Visa test cards | Card Number | Expiry Date | CVV | | :--------------- | :---------- | :-- | | 4622943123103732 | 2025 / 12 | 750 | | 4622943123103740 | 2025 / 12 | 604 | | 4622943123103757 | 2025 / 12 | 952 | | 4622943123103765 | 2025 / 12 | 603 | | 4622943123103773 | 2025 / 12 | 489 | | 4622943123103781 | 2025 / 12 | 963 | | 4622943123103799 | 2025 / 12 | 262 | | 4622943123103807 | 2025 / 12 | 472 | | 4622943123103815 | 2025 / 12 | 191 | | 4622943123103823 | 2025 / 12 | 914 | | 4622943123103831 | 2025 / 12 | 600 | | 4622943123103849 | 2025 / 12 | 491 | | 4622943123103856 | 2025 / 12 | 325 | | 4622943123103864 | 2025 / 12 | 640 | | 4622943123103872 | 2025 / 12 | 009 | | 4622943123103880 | 2025 / 12 | 082 | | 4622943123103898 | 2025 / 12 | 297 | | 4622943123103906 | 2025 / 12 | 851 | | 4622943123103914 | 2025 / 12 | 843 | | 4622943123103922 | 2025 / 12 | 621 | ### Amex test cards Suitable Amex QA test accounts (xx - 37) with static one-time-password configuration for merchants are as follows: > For all Amex test cards transactions, please use 123456 as one-time password for OTP validation | Card Number | Expiry Date | CVV | Email Address | | :-------------- | :---------- | :--- | :------------------------------------------------------------------------------- | | 373708623186001 | 2028 / 12 | 7777 | [UCS\_Merchant\_SBX\_2@mailinator.com](mailto:UCS_Merchant_SBX_2@mailinator.com) | | 372280864074008 | 2028 / 12 | 7777 | [UCS\_Merchant\_SBX\_2@mailinator.com](mailto:UCS_Merchant_SBX_2@mailinator.com) | | 377222581193005 | 2028 / 12 | 7777 | [UCS\_Merchant\_SBX\_2@mailinator.com](mailto:UCS_Merchant_SBX_2@mailinator.com) | | 372399427875006 | 2028 / 12 | 7777 | [UCS\_Merchant\_SBX\_2@mailinator.com](mailto:UCS_Merchant_SBX_2@mailinator.com) | | 371316662951004 | 2028 / 12 | 7777 | [UCS\_Merchant\_SBX\_2@mailinator.com](mailto:UCS_Merchant_SBX_2@mailinator.com) | ### Discover test cards > There is no email address associated with each card, so they can be enrolled to any account. Discover does not use a hard coded OTP value, instead they will send a real OTP to a user’s email address. | Card Type | Card Number | Expiry Date | CVV | | :--------- | :--------------- | :---------- | :-- | | Green Card | 6011208987835157 | 2025 / 10 | 123 | | Green Card | 6011208893321714 | 2025 / 11 | 234 | | Green Card | 6011208877089667 | 2025 / 12 | 345 | | Green Card | 6011300031471038 | 2025 / 10 | 456 | | Green Card | 6011308026990615 | 2025 / 11 | 567 |