Documentation
Integration Guide
Payments
Restricted Payment

Restricted Payment

Restricted payment is payment where chain & token already preselected and not available for user to change. Restricted payment use chain and token you send in /payment request body instead of your settings. When payment completed you will receive USDC to your wallet. (Any other token except USDC will be exchanged to USDC before transferring to your wallet)

1. Create a Restricted Payment

Endpoint

POST /payments

Parameters

ParameterTypeRequiredDescription
orderIdstringYesA unique identifier for the payment transaction.
fiatCurrencystringYesThe fiat currency code (e.g., USD, EUR) used for the transaction.
fiatPricenumberYesThe amount in fiat currency that needs to be paid.
sourcestringYesThe source or origin of the payment request (e.g., store name).
descriptionstringNoA brief description of the order being paid for.
redirectUrlstringNoThe URL to redirect the user after a successful payment.
tokenAddressstringYesThe smart contract address of the token used for the payment.
chainIdnumberYesThe blockchain network ID where the token operates.

Request Example

{
  "orderId": "kitten-1",
  "fiatCurrency": "USD",
  "fiatPrice": 10,
  "source": "Cats store",
  "description": "White cat",
  "redirectUrl": "on_success_redirect_url",
  "chainId": 1,
  "tokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
}

Response

FieldTypeDescription
paymentUrlstringThe URL where the payment transaction has been generated.
paymentIdstringA unique identifier assigned to the payment.

Response Example

{
  "data": {
    "paymentUrl": "https://paydefi.io/payment/{PAYMENT_ID}",
    "paymentId": "{PAYMENT_ID}"
  }
}

2. Support Networks

This endpoint retrieves a list of supported blockchain networks and their corresponding IDs.

Endpoint
GET /chain-config/chains
Response
Network IDName
1Ethereum (ETH)
10Optimism
56Binance Smart Chain (BSC)
137Polygon
9000Solana
42161Arbitrum
43114Avalanche C-Chain
Response Example
[
  "1",
  "10",
  "56",
  "137",
  "9000",
  "42161",
  "43114"
]

3. Support Tokens

This endpoint retrieves the list of available tokens for a specific blockchain network.

Endpoint
GET /chain-config/tokens?chainId={chainId}
Parameters
ParameterTypeRequiredDescription
chainIdnumberYesThe blockchain network ID for which tokens should be retrieved.
Request Example
GET /chain-config/tokens?chainId=1
Response
FieldTypeDescription
symbolstringThe ticker symbol of the token (e.g., ETH, USDC).
namestringThe full name of the token.
decimalsnumberThe number of decimal places the token supports.
addressstringThe smart contract address of the token.
chainIdnumberThe blockchain network ID where the token is available.
logoURIstringA URL pointing to the token's logo image.
Response Example
[
  {
    "symbol": "ETH",
    "name": "Ethereum",
    "decimals": 18,
    "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
    "chainId": 1,
    "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png"
  },
  {
    "symbol": "1INCH",
    "name": "1Inch",
    "decimals": 18,
    "address": "0x111111111117dc0aa78b770fa6a738034120c302",
    "chainId": 1,
    "logoURI": "https://gemini.com/images/currencies/icons/default/1inch.svg"
  },
  {
    "symbol": "AAVE",
    "name": "AaveToken",
    "decimals": 18,
    "address": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",
    "chainId": 1,
    "logoURI": "https://gemini.com/images/currencies/icons/default/aave.svg"
  }
]