Payment Gateway Integration Guide

The Pay.io Payment Gateway API allows merchants to build a cashier solution directly into their site or app. With a single integration, you can:

  • List currencies available for deposits and withdrawals.

  • Generate deposit addresses for users.

  • Trigger withdrawals securely.

  • Display real-time transaction history.

This guide walks you through the full cashier flow step by step, using the Payment Gateway API.


Prerequisites

Before you start:

  1. Complete merchant onboarding. Contact Pay.io to complete onboarding and configure which currencies you want to support.

  2. Merchant Console access. Obtain your API key and upload your public key.

  3. Ensure you have authorization headers

Header
Description

X-API-Key

Your merchant API key (from Merchant Console or provided by support).

X-API-Nonce

A unique identifier (UUID) for each request. Prevents replay attacks.

X-API-Signature

Signature generated with your private key. See Authorisation.

Step 1: List of Available Currencies

Your cashier first needs to display the currencies available for transactions. For this, you'll need to call GET v1/merchant/currencies endpoint.

Request:

Response (example):

Your frontend can now render a currency picker for users.


Step 2: Get a Deposit Address

When a user selects a currency and wants to deposit, your cashier front-end needs to request a deposit address. For this, you'll need to call the POST /v1/user/deposit/address endpoint or POST /v1/user/deposit/link_external_wallet endpoint for depositing to an external service provider's wallet.

Request:

Response (example):

You can now display this wallet address, and a QR code if desired, to the user.


Step 3: Support Withdrawal of Funds

For withdrawals, your cashier must collect the amount and destination address from the user, then call the Withdrawals API.

Request:

Response (example):


Step 4: List User Transactions

You can display a user’s deposit and withdrawal history using the User Transactions API.

Request:

Response (example):

This endpoint allows you to show users their full transaction history in your cashier UI.


Keeping in Sync

For real-time transaction updates, use Event Notifications & Webhooks. This ensures you can instantly reflect deposit confirmations and completed withdrawals in your cashier.

Keep in Mind

  • Always verify API signatures using your private key.

  • Use UUIDs for user_reference to ensure uniqueness.

  • Display both “processing” and “confirmed” statuses to set correct user expectations.

  • Pair the Transactions API with webhooks for reliability and reconciliation.


Last updated