# PayGate.to — Payment Gateway API (Cards)

> Machine-readable reference for AI agents and LLMs. Source of truth: https://paygate.to/docs/payment-gateway-api/
> Generated from the hosted documentation on 2026-09-07. Endpoints: 11.

## How to use this file

Give this whole file to an AI assistant and ask it to write the integration. It contains every
endpoint, every parameter, the exact example values from the documentation, and real response
payloads. Nothing here is summarised or paraphrased away.

## Facts an agent needs before writing code

- **Authentication: none.** No sign up, no API key, no token, no auth header. Do not invent one.
- **Transport:** plain HTTPS. Parameters go in the query string unless a request body is shown.
- **Placeholders:** anything in `{curly braces}` is a value the integrator supplies.
- **URL-encoding:** values that are themselves URLs (callbacks) must be percent-encoded.
  Values already shown encoded in an example are passed through exactly as-is — re-encoding them breaks the call.
- **Base host:** `api.paygate.to`. A white-label deployment may serve the same paths from its own domain.

## Overview

This publicly available API provided by PayGate.to allows you to generate payment links anonymously without KYC. You can accept Credit/debit card (including MasterCard, Visa, and Maestro) – Apple Pay – Google Pay – SEPA or ACH local bank transfer. You will receive instant payouts to your USDC (Polygon) wallet address once the customer pay using the link. For more information visit: https://paygate.to/instant-payment-gateway/

For successful payment link generation you need to make two mandatory steps:

- Generate a temporary encrypted wallet address using GET wallet.php by passing a unique callback URL + your own USDC (Polygon) wallet address to receive payouts. Optionally you can use the affiliate.php wallet creator and pass an additional wallet you own to earn affiliate percentage commission on every sale.

- Redirect the customer to the payment page by passing the generated encrypted wallet address along with other required parameters through another GET request to Process Payment. This request will directly send the customer to the payment page.

Please consult minimum order values for payment providers. Optionally you can white-label this API and use your own custom domain.

## Endpoints

### Standard Integration

- [GET Create Wallet](#create-wallet)
- [GET Process Payment](#process-payment)
- [GET Multi-provider Mode (optional)](#multi-provider-mode-optional)
- [GET List All Providers](#list-all-providers)

### Affiliate System

- [GET Affiliate Create Wallet (optional)](#affiliate-create-wallet-optional)
- [GET Custom Affiliate Commission (optional)](#custom-affiliate-commission-optional)
- [GET Sub-Affiliate (Optional)](#sub-affiliate-optional)

### Mass Payouts Wallet Split

- [POST Mass Payout](#mass-payout)
- [GET Convert to USD](#convert-to-usd)
- [GET Callback Event](#callback-event)
- [GET Check Payment Status](#check-payment-status)

---

## Group: Standard Integration

Standard integration is for merchants who want to use PayGate.to credit card system directly. Merchant would only need a valid crypto EVM wallet to access the system and it should be a self-custodial wallet to avoid any possible payout issues or coin mismatch. The TrustWallet SWIFT option is the best for beginners who don't understand how crypto works since it provides a single wallet address to receive all coins. While it is possible to use exchanges like a Binance deposit addresses it is not recommended.

There are two important notes regarding the integration:

1. You must use the API to create a unique encrypted wallet `address_in` for each customer and you should avoid reusing the same link for multiple customers otherwise it will get blocked.
2. Creating a unique wallet requires passing a unique callback link of your own with each request. Make sure the links have a unique `GET` parameter value for each like for example a unique order number or invoice ID.

---

## Create Wallet

`GET` — anchor `#create-wallet` — group: Standard Integration

```http
GET https://api.paygate.to/control/wallet.php?address=0xF977814e90dA44bFA03b6295A0616a897441aceC&callback=https%3A%2F%2Fwww.example.com%2Forders.php%3Fnumber%3D8271468415326
```

This endpoint retrieves wallet control information by making an HTTP GET request to the specified URL. The request includes the wallet address and a callback URL. The response returns a status code of 200, along with the encrypted receiving wallet address and callback URL in the JSON format.

Request Parameters

- address: The wallet address to receive instant payouts after customer payment. Wallet must be a valid USDC (Polygon).

- callback: urlencoded callback URL where the payment confirmation will be sent using GET request. You must have at least one unique GET parameter with each request. If you use the same parameter value again the same temporary receiving address will be provided in the response. In production use your own unique callback NOT example.com

Response

The response returns a newly generated encrypted receiving temporary wallet address and the same provided callback URL for confirmation in the JSON format. You may need to json_decode(); the response address_in to pass it in the next step.

- address_in : This is the encrypted wallet address that need to be passed to the payment link generator (Process Payment) in the second step.

- polygon_address_in : This is the generated receiving address decrypted for easy payment tracking. You can't pass this address directly to the second step, you need to pass the encrypted address_in.

- callback_url : This is the same callback URL you passed containing all your parameters returned in a decoded format for confirmation. Our bot will send a GET request to this URL when the customer complete the payment containing all your parameters with an additional parameter value_coin representing the actual USDC value sent by the payment provider which can be useful for your system in case you want to verify the sent amount.

- ipn_token: This token is useful when provided to our support team we will be able to track your payment and investigate failed callback events.

| Parameter | Example value | Description |
|---|---|---|
| `address` | `0xF977814e90dA44bFA03b6295A0616a897441aceC` |  |
| `callback` | `https%3A%2F%2Fwww.example.com%2Forders.php%3Fnumber%3D8271468415326` |  |

**OK — Response Example — HTTP 200**

```json
{
    "address_in": "eE5A43DAkczRwxoW3IL7sGsRh6CiMx4kkTCccr6n%2FYMTGhy9b1eeIJLTr9Lho64fJTIeOfgsnJNNc%2FarqtR1jw%3D%3D",
    "polygon_address_in": "0x756C4D5EAad2165b3841a543Cf851Eed6AAF211B",
    "callback_url": "https://www.example.com/orders.php?number=8271468415326",
    "ipn_token": "ZEE2cW8zb1N0N2otZEc3eHh3MDNUU1lTMEExYmVvcDBVNlVBcEl5Y01RcmFTMUtpbExHX0V2QTJucXpQRVdGRnQ3dzhmUVhYZUE%3D"
}
```

---

## Process Payment

`GET` — anchor `#process-payment` — group: Standard Integration

```http
GET https://checkout.paygate.to/process-payment.php?address=eE5A43DAkczRwxoW3IL7sGsRh6CiMx4kkTCccr6n%2FYMTGhy9b1eeIJLTr9Lho64fJTIeOfgsnJNNc%2FarqtR1jw%3D%3D&amount=103.78&provider=moonpay&email=john%40example.com&currency=USD
```

This endpoint will redirect the customer to the payment page. You should treat this as the payment URL. Your CMS should pass all the following parameters.

- address: you need to pass the encrypted address_in generated from GET wallet.php | Passing your payout wallet address directly without the first step will result in a 400 bad request.

- amount: Amount you need the customer to pay. For example 105.78 this should be the order total in your system. You can add more fees by passing bigger amounts to cover the payment processing fees.

- provider: Possible values can be fetched from provider id at provider status endpoint. Other providers can be available exclusively through the Multi-provider mode only.

- email: urlencoded customer email address

- currency: Currency code, for example: USD or EUR or CAD

stripe, transfi, robinhood and bitnovo providers values need to be in USD only!

upi is INR currency only! | interac is CAD currency only!

Please note that you are not allowed to use the payment link within embedded iframe, user must be redirected to the licensed payment provider page directly. Your system will be notified after customer payment using the predefined callback URL.

By default when the end customer is redirected through this endpoint our servers would detect the customer location country automatically. However in some cases you may want to hide our domain completely and fetch the end provider payment URL that this endpoint is redirecting to. In this case you may need to note that payment links are usually built based on end customer location country and you should always make sure to pass the end user geo country ISO code by passing HTTP request header PGTO-IPCountry with its value as the country ISO code of end user for example ES for Spain.

| Parameter | Example value | Description |
|---|---|---|
| `address` | `eE5A43DAkczRwxoW3IL7sGsRh6CiMx4kkTCccr6n%2FYMTGhy9b1eeIJLTr9Lho64fJTIeOfgsnJNNc%2FarqtR1jw%3D%3D` |  |
| `amount` | `103.78` |  |
| `provider` | `moonpay` |  |
| `email` | `john%40example.com` |  |
| `currency` | `USD` |  |

---

## Multi-provider Mode (optional)

`GET` — anchor `#multi-provider-mode-optional` — group: Standard Integration

```http
GET https://checkout.paygate.to/pay.php?address=eE5A43DAkczRwxoW3IL7sGsRh6CiMx4kkTCccr6n%2FYMTGhy9b1eeIJLTr9Lho64fJTIeOfgsnJNNc%2FarqtR1jw%3D%3D&amount=103.78&email=john%40example.com&currency=USD&domain=checkout.paygate.to
```

This endpoint is similar to process-payment.php but it will redirect the customer to a hosted page with multi-provider selection list. Options displayed on the hosted payment page are based on several factors including but not limited to customer location, payment amount and currency. GET parameters can be as follows:

Required Parameters

- address: you need to pass the ecnrypted address_in generated from GET https://api.paygate.to/control/wallet.php | Passing your payout wallet address directly without the first step will result in a 400 bad request.

- amount: Amount you need the customer to pay. For example 105.78 this should be the order total in your system. You can add more fees by passing bigger amounts to cover the payment processing fees.

- email: urlencoded customer email address

- currency: Currency code, for example: USD or EUR or CAD

Optional Parameters

- domain: This is an optional parameter to white-label (rebrand) the hosted checkout page with your own custom domain name. You can set your own rebranded subdomain that will replace any instance of checkout.paygate.to in the hosted payment page code. The format of this optional parameter value should be like checkout.example.com and it can be set to be hidden within your cloudflare worker code to prevent manipulation.

- logo: urlencoded image URL to be used as the brand logo displayed on the multi-coin crypto checkout page. This is an optional value and it can be for example your own website/brand logo.

- background: urlencoded HEX color code to optionally change the background color of the checkout page. Instead of HEX code you may pass direct CSS color naming like green, blue, orange, etc.

- theme: urlencoded HEX color code to optionally change the theme color of the checkout page. Instead of HEX code you may pass direct CSS color naming like green, blue, orange, etc.

- button: urlencoded HEX color code to optionally change the checkout page button color. Instead of HEX code you may pass direct CSS color naming like green, blue, orange, etc.

| Parameter | Example value | Description |
|---|---|---|
| `address` | `eE5A43DAkczRwxoW3IL7sGsRh6CiMx4kkTCccr6n%2FYMTGhy9b1eeIJLTr9Lho64fJTIeOfgsnJNNc%2FarqtR1jw%3D%3D` |  |
| `amount` | `103.78` |  |
| `email` | `john%40example.com` |  |
| `currency` | `USD` |  |
| `domain` | `checkout.paygate.to` |  |

---

## List All Providers

`GET` — anchor `#list-all-providers` — group: Standard Integration

```http
GET https://api.paygate.to/control/provider-status
```

This endpoint will return full list of possible providers you can use within the credit card system and their minimum order value. No extra GET parameters needed with this endpoint.

Response

- id: This is the API provider id to be used as &provider= parameter value for process payment link.

- provider_name: User friendly (human readable) provider name.

- status: Up to date status of the provider. If it is not active then you should avoid using this provider in your system.

- minimum_currency: The currency of the minimum allowed order amount for this provider. Note that the provider may still support other currencies.

- minimum_amount: The minimum order amount for this provider.

**OK — Response Example — HTTP 200**

```json
{
    "providers": [
        {
            "id": "wert",
            "provider_name": "Wert.io",
            "status": "active",
            "minimum_currency": "USD",
            "minimum_amount": 1
        },
        {
            "id": "stripe",
            "provider_name": "Stripe (USA)",
            "status": "active",
            "minimum_currency": "USD",
            "minimum_amount": 2
        },
        {
            "id": "coinbase",
            "provider_name": "Coinbase Pay",
            "status": "redirected",
            "minimum_currency": "USD",
            "minimum_amount": 2
        },
        {
            "id": "rampnetwork",
            "provider_name": "ramp.network",
            "status": "active",
            "minimum_currency": "USD",
            "minimum_amount": 4
        },
        {
            "id": "robinhood",
            "provider_name": "Robinhood (USA)",
            "status": "active",
            "minimum_currency": "USD",
            "minimum_amount": 5
        },
        {
            "id": "revolut",
            "provider_name": "Revolut (EU/EEA)",
            "status": "active",
            "minimum_currency": "EUR",
            "minimum_amount": 6
        },
        {
            "id": "unlimit",
            "provider_name": "Unlimit",
            "status": "active",
            "minimum_currency": "USD",
            "minimum_amount": 10
        },
        {
            "id": "bitnovo",
            "provider_name": "Bitnovo",
            "status": "active",
            "minimum_currency": "USD",
            "minimum_amount": 10
        },
        {
            "id": "kryptonim",
            "provider_name": "Kryptonim",
            "status": "active",
            "minimum_currency": "USD",
            "minimum_amount": 10
        },
        {
            "id": "topper",
            "provider_name": "Topper",
            "status": "active",
            "minimum_currency": "USD",
            "minimum_amount": 10
        },
        {
            "id": "gateconnect",
            "provider_name": "Gate Connect",
            "status": "unstable",
            "minimum_currency": "USD",
            "minimum_amount": 10
        },
        {
            "id": "transak",
            "provider_name": "Transak",
            "status": "active",
            "minimum_currency": "USD",
            "minimum_amount": 15
        },
        {
            "id": "binance",
            "provider_name": "Binance Connect",
            "status": "active",
            "minimum_currency": "USD",
            "minimum_amount": 15
        },
        {
            "id": "alchemypay",
            "provider_name": "Alchemy Pay",
            "status": "redirected",
            "minimum_currency": "USD",
            "minimum_amount": 15
        },
        {
            "id": "moonpay",
            "provider_name": "MoonPay",
            "status": "active",
            "minimum_currency": "USD",
            "minimum_amount": 20
        },
        {
            "id": "banxa",
            "provider_name": "Banxa",
            "status": "active",
            "minimum_currency": "USD",
            "minimum_amount": 20
        },
        {
            "id": "guardarian",
            "provider_name": "Guardarian",
            "status": "redirected",
            "minimum_currency": "USD",
            "minimum_amount": 20
        },
        {
            "id": "cryptix",
            "provider_name": "Cryptix",
            "status": "active",
            "minimum_currency": "USD",
            "minimum_amount": 20
        },
        {
            "id": "particle",
            "provider_name": "particle.network",
            "status": "active",
            "minimum_currency": "USD",
            "minimum_amount": 30
        },
        {
            "id": "mercuryo",
            "provider_name": "mercuryo.io",
            "status": "unstable",
            "minimum_currency": "USD",
            "minimum_amount": 30
        },
        {
            "id": "sardine",
            "provider_name": "Sardine.ai",
            "status": "active",
            "minimum_currency": "USD",
            "minimum_amount": 30
        },
        {
            "id": "simpleswap",
            "provider_name": "SimpleSwap",
            "status": "unstable",
            "minimum_currency": "USD",
            "minimum_amount": 30
        },
        {
            "id": "utorg",
            "provider_name": "UTORG",
            "status": "active",
            "minimum_currency": "USD",
            "minimum_amount": 50
        },
        {
            "id": "simplex",
            "provider_name": "Simplex",
            "status": "active",
            "minimum_currency": "USD",
            "minimum_amount": 50
        },
        {
            "id": "transfi",
            "provider_name": "Transfi",
            "status": "active",
            "minimum_currency": "USD",
            "minimum_amount": 70
        },
        {
            "id": "upi",
            "provider_name": "UPI/IMPS",
            "status": "active",
            "minimum_currency": "INR",
            "minimum_amount": 1600
        },
        {
            "id": "interac",
            "provider_name": "Interac",
            "status": "active",
            "minimum_currency": "CAD",
            "minimum_amount": 100
        }
    ]
}
```

---

## Group: Affiliate System

The affiliate system works the same way as the standard integration but it would allow sending and distributing the payout to multiple wallets. This would be controlled at the encrypted wallet creation step (`address_in`).

There are multiple possible setups for the affiliate system:

1. Follow the easy [custom domain guide](https://paygate.to/white-label-api-custom-domain-guide/) to fully integrate the system with or without affiliate commission. Using this easy method you can set your own **custom set commission**, rebranding the payment gateway with minimal coding skills.
2. Use this API server side to earn the default 0.5% or any **custom set commission** as you wish. (Payouts will be distributed to two wallets one is the merchant and the other is for the affiliate who rebranded the system).
3. Use this API server side to create an advanced integration with both sub-merchants and sub-affiliates. So you would have merchants using your system and affiliates under you doing marketing to the rebranded payment gateway.

In all use cases it is instant approval and instant payouts for all. The generated receiving wallets will automatically send payouts per the set API commission percentage. *Make sure the merchant wallets and affiliate wallets are different otherwise requests will fail.*

---

## Affiliate Create Wallet (optional)

`GET` — anchor `#affiliate-create-wallet-optional` — group: Affiliate System

```http
GET https://api.paygate.to/control/affiliate.php?address=0xF977814e90dA44bFA03b6295A0616a897441aceC&callback=https%3A%2F%2Fwww.example.com%2Forder%3Fnumber%3D82176413628089&affiliate=0x3c783c21a0383057D128bae431894a5C19F9Cf06
```

Optionally if you want to white-label (rebrand) our payment gateway then you can use this endpoint as the first step and pass your affiliate wallet as an extra affiliate parameter to earn commission on every sale. Merchant wallet and affiliate wallet must be different or the request will fail.

| Parameter | Example value | Description |
|---|---|---|
| `address` | `0xF977814e90dA44bFA03b6295A0616a897441aceC` |  |
| `callback` | `https%3A%2F%2Fwww.example.com%2Forder%3Fnumber%3D82176413628089` |  |
| `affiliate` | `0x3c783c21a0383057D128bae431894a5C19F9Cf06` |  |

**OK — Response Example — HTTP 200**

```json
{
    "address_in": "aV9oMn9gnOq8ykVfkWzIiNiDqS4Cx2sPmepd0v%2F%2BOX5WJ9AZsUBWqlYsOQxuOy1%2FhlP%2BEDkctFyu6HYFpfOMlg%3D%3D",
    "polygon_address_in": "0x82b1d4439e0dcB404aCC3b1aDfA4b00d11Ec5df8",
    "callback_url": "https://www.example.com/order?number=82176413628089",
    "ipn_token": "ZEE2cW8zb1N0N2otZEc3eHh3MDNUU1lTMEExYmVvcDBVNlVBcEl6UWNRX2ZXUWktM09UdlJyVTlrcV9MRm1kTHY3QTA%3D"
}
```

---

## Custom Affiliate Commission (optional)

`GET` — anchor `#custom-affiliate-commission-optional` — group: Affiliate System

```http
GET https://api.paygate.to/control/custom-affiliate.php?address=0xF977814e90dA44bFA03b6295A0616a897441aceC&callback=https%3A%2F%2Fwww.example.com%2Forder%3Fnumber%3D82173313628090&affiliate=0x3c783c21a0383057D128bae431894a5C19F9Cf06&affiliate_fee=0.01&merchant_fee=0.98
```

This optional endpoint is for advanced rebranding usage. If you want to rebrand (white-label) and set a custom redistribution of the payout or set a custom commssion fee to yourself as an affiliate then you can optionally use this endpoint to create wallets. This endpoint is similar to the Affiliate endpoint with two extra parameters affiliate_fee and merchant_fee. Those two parameters can be used to distribute percentage of the instant payout to address and affiliate wallets.

affiliate_fee is used to set percentage to the affiliate wallet, if it is set to 0.01 this wallet would receive 1% of the total final payout. merchant_fee is used to set percentage to the address wallet, if it is set to 0.98 then this wallet would receive 98% of the total final payout.

The sum of affiliate_fee and merchant_fee must always be 0.99 as our service fee is 1% of the total payout. If the total is not 0.99 the request would fail.

| Parameter | Example value | Description |
|---|---|---|
| `address` | `0xF977814e90dA44bFA03b6295A0616a897441aceC` |  |
| `callback` | `https%3A%2F%2Fwww.example.com%2Forder%3Fnumber%3D82173313628090` |  |
| `affiliate` | `0x3c783c21a0383057D128bae431894a5C19F9Cf06` |  |
| `affiliate_fee` | `0.01` |  |
| `merchant_fee` | `0.98` |  |

**OK — Response Example — HTTP 200**

```json
{
    "address_in": "PSHb7nNwS2o06r0DqAWrXmB8wc8IM%2Fww8An%2F6NnshnsSq0ng%2Bpi4%2B6BIjNg2J8mI67Nt1mtagMetMw93izaXbg%3D%3D",
    "polygon_address_in": "0xA7Eba8e2e69CEe6e2AAB875B2Dd97F8698Dd8BAb",
    "callback_url": "https://www.example.com/order?number=82173313628090",
    "ipn_token": "ZEE2cW8zb1N0N2otZEc3eHh3MDNUU1lTMEExYmVvcDBVNlVBcEl6UWNRX2ZXUWktM09UdlJyVTRsYV9MRm1kTHY3RTk%3D"
}
```

---

## Sub-Affiliate (Optional)

`GET` — anchor `#sub-affiliate-optional` — group: Affiliate System

```http
GET https://api.paygate.to/control/custom-sub-affiliate.php?address=0xF977814e90dA44bFA03b6295A0616a897441aceC&callback=https%3A%2F%2Fwww.example.com%2Forder%3Fnumber%3D82173314628191&affiliate=0x3c783c21a0383057D128bae431894a5C19F9Cf06&affiliate_fee=0.01&merchant_fee=0.97&sub_affiliate_fee=0.01&sub_affiliate=0x082489A616aB4D46d1947eE3F912e080815b08DA
```

This optional endpoint is for advanced rebranding usage. If you want to rebrand (white-label) and set a custom redistribution of the payout or set a custom commssion fee for both yourself as an affiliate and your sub-affiliate then you can optionally use this endpoint to create wallets. This endpoint is similar to the Affiliate endpoint with extra parameters affiliate_fee , sub_affiliate_fee and merchant_fee. Those parameters can be used to distribute percentage of the instant payout to address, sub-affiliate and affiliate wallets.

affiliate_fee is used to set percentage to the affiliate wallet, if it is set to 0.01 this wallet would receive 1% of the total final payout. merchant_fee is used to set percentage to the address wallet, if it is set to 0.97 then this wallet would receive 97% of the total final payout. sub_affiliate_fee is used to set percentage to the sub_affiliate wallet, if it is set to 0.01 the sub_affiliate would receive 1% of the final payout.

The sum of affiliate_fee, sub_affiliate_fee and merchant_fee must always be 0.99 as our service fee is 1% of the total payout. If the total is not 0.99 the request would fail.

| Parameter | Example value | Description |
|---|---|---|
| `address` | `0xF977814e90dA44bFA03b6295A0616a897441aceC` |  |
| `callback` | `https%3A%2F%2Fwww.example.com%2Forder%3Fnumber%3D82173314628191` |  |
| `affiliate` | `0x3c783c21a0383057D128bae431894a5C19F9Cf06` |  |
| `affiliate_fee` | `0.01` |  |
| `merchant_fee` | `0.97` |  |
| `sub_affiliate_fee` | `0.01` |  |
| `sub_affiliate` | `0x082489A616aB4D46d1947eE3F912e080815b08DA` |  |

**OK — Response Example — HTTP 200**

```json
{
    "address_in": "wBWnsV63iw08CXjZ%2BYQwKYMRz5K4mpBRZwHuGe5PUKmpVyBLgI5PXJqvs4X11%2F6zRrqtAnyI3kYvE1J0SSUaYA%3D%3D",
    "polygon_address_in": "0x1a65e22d1A8e3001574446D6d92632D5E075073a",
    "callback_url": "https://www.example.com/order?number=82173314628191",
    "ipn_token": "ZEE2cW8zb1N0N2otZEc3eHh3MDNUU1lTMEExYmVvcDBVNlVBcEl6UWNRX2ZXUWktM09UdlJyVTRsYV9NRm1kTHZyRTg%3D"
}
```

---

## Group: Mass Payouts Wallet Split

The mass payout endpoint can be used if you want to split the payout across large number of wallets. You can set up to 19 wallets to receive the payout split according to the percentage set for each. This can be useful in cases of multiple wallets mass payouts, advanced rebrand, white-label and setting variable fees per merchant.

The generated encrypted wallet `address_in` can be used for payment links (Process Payment) and Multi-provider Mode similar the standard integration.

---

## Mass Payout

`POST` — anchor `#mass-payout` — group: Mass Payouts Wallet Split

```http
POST https://api.paygate.to/control/mass-payout.php
```

The request must be made via the POST request method with the body in JSON format including the callback URL where you will receive payment status notification and up to 19 wallets with the respective percentage to split the payout through them. So for example if the wallet is set to 0.01 it will receive 1% of the total payout.

Similar to all previous endpoints the callback URL should have one unique GET parameter. The total fees for all wallets must always be 0.99 representing 99% of the payout as the paygate.to imposed fees is 1%. If any request is made with total fees other than 0.99 the request will fail. If you use the same callback URL value again the same temporary receiving address with initial set fees will be provided in the response. In production use your own unique callback NOT example.com.

Disclaimer: With more payout wallets set the crypto forwarding minimum maybe higher. If the credit card provider send some amount below the crypto minimum it maybe stuck in the receiving wallet. You may check the crypto API docs for further information regarding crypto mass payouts.

Response

The response returns a newly generated encrypted receiving temporary wallet address and the same provided callback URL for confirmation in the JSON format. You may need to json_decode(); the response address_in to pass it in the next step.

- address_in : This is the encrypted wallet address that need to be passed to the payment link generator (Process Payment) in the second step.

- polygon_address_in : This is the generated receiving address decrypted for easy payment tracking. You can't pass this address directly to the second step, you need to pass the encrypted address_in.

- callback_url : This is the same callback URL you passed containing all your parameters returned in a decoded format for confirmation. Our bot will send a GET request to this URL when the customer complete the payment containing all your parameters with an additional parameter value_coin representing the actual USDC value sent by the payment provider which can be useful for your system in case you want to verify the sent amount.

- ipn_token: This token is useful when provided to our support team we will be able to track your payment and investigate failed callback events.

Request body:

```json
{
  "callback": "https://www.example.com/order/?invoice=a3g8388g4h83jth8fddhdhdtgdthdtg48jjnjvjndv4888",
  "fees": {
    "0x89630237D79B49Ba90c485AA7F8003D23F76c64b": 0.01,
    "0xa557CEC455324d3A665491cFE85F0e88030D8775": 0.04,
    "0x026BEB2e88989beBC5e4Dabf957CAEC8999a2277": 0.06,
    "0xc08A4D184A021385b787c7881eEd73B2d379e796": 0.30,
    "0xF977814e90dA44bFA03b6295A0616a897441aceC": 0.58
  }
}
```

**OK — Response Example — HTTP 200**

```json
{
    "address_in": "vRS9gJfxuLU9aySRf8EBWp69HsCJUvc%2B6eKojZ0s1u%2B3s5ugvsUS6FZ7JgXOJHre9pLi1gFF2pz%2B1DUfG1w6Fw%3D%3D",
    "polygon_address_in": "0x2c9fAF455F9aB195D09AC9a3313d729Bddf4537A",
    "callback_url": "https://www.example.com/order/?invoice=a3g8388g4h83jth8fddhdhdtgdthdtg48jjnjvjndv4888",
    "ipn_token": "ZEE2cW8zb1N0N2otZEc3eHh3MDNUU1lTMEExYmVvcDBVNlVBcEl6QUlCUGNUUUtsZ3JuZ0ZyRnNucTNBR0RKSDU3QS1Ja0tOZHEzbUhaS1RPUzBmSDB2czB5LXZvZkFkbHYwOHlmdTRqNGJDU3plUjBB"
}
```

---

## Convert to USD

`GET` — anchor `#convert-to-usd` — group: Mass Payouts Wallet Split

```http
GET https://api.paygate.to/control/convert.php?from=EUR&value=1258.31
```

Some providers like wert, Stripe, Transfi and rampnetwork supports USD only. You may need to convert your amount to USD currency.

Request Parameters

from : The from currency code you want to convert to USD for example: EUR or SEK.

value : The amount of the from currency to be converted to USD.

Response

value_coin : Converted amount to USD.

exchange_rate : Currency conversion rate to USD.

| Parameter | Example value | Description |
|---|---|---|
| `from` | `EUR` |  |
| `value` | `1258.31` |  |

**OK — Example Response — HTTP 200**

```json
{
    "status": "success",
    "value_coin": "1351.76",
    "exchange_rate": "1.07427"
}
```

---

## Callback Event

`GET` — anchor `#callback-event` — group: Mass Payouts Wallet Split

```http
GET https://www.example.com/orders.php?number=827746841326&value_coin=105.6&coin=polygon_usdc&txid_in=0xa22a82b4aefbc55f6382e1b5c0b4f0e3c034a654df3bcac431f7fed1942e22bc&txid_out=0x94c2c3e84c2021e6bf377aebf8abf03b49570611bb0c336e357d7f4516f56244&address_in=0x32e854bD1270670C832634CA87858fFd9F3e2c78&value_forwarded_coin=104.016&address_out=%7B%220x34653D12778FccF10eE978EfFb16450258d2aFc9%22%3A%220.0500%22%2C%220x042beb6Ab05814c3A54C4124e368a30c4f7c93FB%22%3A%220.9250%22%7D
```

When a payment is made by one of the providers our bot will visit your callback URL using GET request method. All your original parameters will be included plus the following payment data parameters:

- value_coin: Amount of USDC paid by the provider.

- coin: Payout coin type usually polygon_usdc or polygon_usdt

- txid_in: Polygon TXID of the payment made from the provider to the order assigned wallet.

- txid_out: Instant payout TXID from the order assigned wallet to your merchant predefined wallet.

- address_in: This should match the same polygon_address_in unencrypted wallet generated at the first step.

- value_forwarded_coin: Total amount forwarded from the order assigned wallet to merchant and affiliates.

- address_out: URL-encoded JSON object listing every payout address credited by this order and the share of value_forwarded_coin each one received. Decode it to work out the exact amount settled on the blockchain to each address, after all fees.

💡Payouts maybe sent in ETH or USDC or USDT (Polygon or BEP-20) or POL native token. Same wallet should work to receive all. Make sure you use a self-custodial wallet to receive payouts. Full crypto tickers list, you may also use the crypto endpoint for exchange rates.

| Parameter | Example value | Description |
|---|---|---|
| `number` | `827746841326` |  |
| `value_coin` | `105.6` |  |
| `coin` | `polygon_usdc` |  |
| `txid_in` | `0xa22a82b4aefbc55f6382e1b5c0b4f0e3c034a654df3bcac431f7fed1942e22bc` |  |
| `txid_out` | `0x94c2c3e84c2021e6bf377aebf8abf03b49570611bb0c336e357d7f4516f56244` |  |
| `address_in` | `0x32e854bD1270670C832634CA87858fFd9F3e2c78` |  |
| `value_forwarded_coin` | `104.016` |  |
| `address_out` | `%7B%220x34653D12778FccF10eE978EfFb16450258d2aFc9%22%3A%220.0500%22%2C%220x042beb6Ab05814c3A54C4124e368a30c4f7c93FB%22%3A%220.9250%22%7D` |  |

**Decoding address_out**

address_out is percent-encoded so that it survives the query string. Decode it once and you are left with a JSON object keyed by payout address:

 Copy{
 "0x34653D12778FccF10eE978EfFb16450258d2aFc9": "0.0500",
 "0x042beb6Ab05814c3A54C4124e368a30c4f7c93FB": "0.9250"
}

Each value is that address’s share of value_forwarded_coin, already net of every fee. Multiply the two to get what the address actually received on-chain:

- 0.0500 × 104.016 = 5.2008

- 0.9250 × 104.016 = 96.2148

Server frameworks percent-decode the query string for you — PHP’s $_GET, Express’s req.query and Flask’s request.args all hand you the decoded value — so only the JSON parse is left. If you read the raw query string yourself, decode it first with urldecode(), decodeURIComponent() or urllib.parse.unquote().

 Copy// PHP
$shares = json_decode($_GET['address_out'], true);
foreach ($shares as $address => $share) {
 $paid = bcmul($_GET['value_forwarded_coin'], $share, 18); // exact amount sent to $address
}

// Node.js (Express)
const shares = JSON.parse(req.query.address_out);
for (const [address, share] of Object.entries(shares)) {
 const paid = Number(req.query.value_forwarded_coin) * Number(share);
}

# Python (Flask)
from decimal import Decimal
import json
shares = json.loads(request.args["address_out"])
forwarded = Decimal(request.args["value_forwarded_coin"])
for address, share in shares.items():
 paid = forwarded * Decimal(share)

Use a decimal type rather than a float wherever the payout is settled in a coin with many decimal places; binary floating point cannot hold these values exactly.

---

## Check Payment Status

`GET` — anchor `#check-payment-status` — group: Mass Payouts Wallet Split

```http
GET https://api.paygate.to/control/payment-status.php?ipn_token=ZEE2cW8zb1N0N2o2ZDJ1LTFoQTZRVFFObTBwTE9wQXJFYjBYcnBEQWJ4dkxYQXk0aExpeUFfWmt3Zi1NUlNJUzlxZDdlUm1WTDdMbEdJNlNOU1lmREVEXzJqLS1zYVZjMGY4OTBQbTNoWkxWQm1qSW5NeFg2ZE5NRmpxUV9OODR6cTBFQVMyd08wZVkzdEFoUlpBV25MbE81eHFKS2NoOU43eENfM2s%3D
```

Use this endpoint to check the payment status.

Warning: This endpoint is intended to be used on casual basis only to check the payment status and payout info when needed. However you shouldn't rely on this endpoint to change order status on your own website/system to avoid getting rate limited. To change order status within your own website system you should rely on the Callback Event where our bot will hit your server when the payment is made.

Request Parameters

- ipn_token: You should have this from the first request creating the wallet.

Response

- status: It is either paid or unpaid.

- value_coin: Amount of crypto sent by the provider to the order assigned wallet, usually USDC.

- txid_out: TXID of the payout transaction to your merchant wallet on the blockchain.

- coin: The payout coin type usually polygon_usdc

| Parameter | Example value | Description |
|---|---|---|
| `ipn_token` | `ZEE2cW8zb1N0N2o2ZDJ1LTFoQTZRVFFObTBwTE9wQXJFYjBYcnBEQWJ4dkxYQXk0aExpeUFfWmt3Zi1NUlNJUzlxZDdlUm1WTDdMbEdJNlNOU1lmREVEXzJqLS1zYVZjMGY4OTBQbTNoWkxWQm1qSW5NeFg2ZE5NRmpxUV9OODR6cTBFQVMyd08wZVkzdEFoUlpBV25MbE81eHFKS2NoOU43eENfM2s%3D` |  |

**OK — Response Example — HTTP 200**

```json
{
    "status": "paid",
    "value_coin": "117.59",
    "txid_out": "0xe85ed56174785b0bb9fcb522655f961675ad236f2aad2f5bb4fa2f074ac09726",
    "coin": "polygon_usdc"
}
```

---

_End of PayGate.to — Payment Gateway API (Cards). Hosted documentation: https://paygate.to/docs/payment-gateway-api/_
