🎁Products
A Product object holds the basic information about your checkout experience. It holds information about your business name, wallet address, and what Pay.so should do when you receive funds.
Create a Product 🧑🔧
URL Path
POST
/products
Create a product programmatically via the Pay.so API.
Parameters
Required fields are marked in bold and with an asterisk
Don't forget to include the headers!
name *
:string
The name of your product.email *
:string
The email address where you want to receive notifications about payments.send_webhook
:boolean
Whether you would like to receive a webhook notification when a Resolved Payment is created (defaults tofalse
).webhook_url
:string
Where you would like to receive a POST request when a Resolved Payment is created. Required if send_webhook is true.send_email
:boolean
Whether you would like to send a plain text email to the customer after completing checkout (defaults tofalse
).email_body
:string
The email text you would like to include in your email to the customer after they have completed checkout. Required if send_email is true.success_url
:string
Where to direct your customer upon successful checkout.failure_url
:string
Where to direct your customer if they want to abandon checkout.custom_fields:
array
Any extra information you want to capture during checkout. Valid items arefull_name
,reference
,referrer
,company
,job_title
.active
:boolean
Whether the checkout is active or not (defaults tofalse
).expires_in_minutes
:integer
If present, this will set an expiration timer on the checkout and display the timer to the customer. Once expired the user will not be able to complete the checkout and a message will be displayed. The value cannot be less than5
.tax_rate
:decimal
The tax rate included in the price you will charge (for receipt purposes) (defaults to 0.0).swappable
:boolean
Whether you want Pay.so to offer a token swap to the buyer if they don't have the requested token (might cause small fluctuations in received amounts but can boost conversion) (defaults totrue
).open_amount
:boolean
Whether you want the user to be able to choose the amount they pay (defaults tofalse
).token[blockchain] *
:string
The blockchain of the token that you would like to accept. Allowed options:ethereum
,binance-smart-chain
,polygon
token[network] *
:string
The network of the token you would like to accept. Allowed options:mainnet
. For testing purposes, you can usetestnet
but only with the test BUSD contract address listed on the next point.token[address] *
:string
The contract address of the token you would like to accept. Case sensitive. Must be the contract address forUSDC
,DAI
,USDT
,BUSD
on the Ethereum, BNB, or Polygon chains. For testing purposes, you can get test tokens from here and use the test BUSD contract address:0xeD24FC36d5Ee211Ea25A80239Fb8C4Cfd80f12Ee.
Supported Tokens
Address | Token | Chain |
---|---|---|
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 | USDC | Ethereum |
0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d | USDC | BSC |
0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 | USDC | Polygon |
0x6B175474E89094C44Da98b954EedeAC495271d0F | DAI | Ethereum |
0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3 | DAI | BSC |
0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063 | DAI | Polygon |
0xdAC17F958D2ee523a2206206994597C13D831ec7 | USDT | Ethereum |
0x55d398326f99059fF775485246999027B3197955 | USDT | BSC |
0xc2132D05D31c914a87C6611C10748AEb04B58e8F | USDT | Polygon |
0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56 | BUSD | BSC |
0xeD24FC36d5Ee211Ea25A80239Fb8C4Cfd80f12Ee | BUSD | BSC testnet |
You must nest the above params under a product
key. Additionally you must nest ["blockchain", "network", "address"] under a token
key.
See the example request below ⬇️
Example Request
Response
Fetch all Products 🎁
URL Path
GET
/products
- Returns all products created via the API.
Don't forget to include the headers!
Example Request
Response
Update a Product 🛠️
URL Path
PATCH
/product/:product_id
- Allows you to enable/disable a product.
Parameters
Required fields are marked in bold and with an asterisk
Don't forget to include the headers and the product_id!
active *
:boolean
Whether you want your Product to be active or not.
You must nest the above params in a "product" hash.
See the example request below ⬇️
Example Request
Response
Last updated