Zateway supports two authentication methods: API Keys for server-to-server, and JWT Tokens for dashboard access.
API Key Authentication
Include your API key in the X-API-Key header (or use Authorization: Bearer). Keys must start with zate_.
curl
curl -X POST https://your-domain.com/api/v1/payments \
-H "Content-Type: application/json" \
-H "X-API-Key: zate_sk_your_api_key_here" \
-d '{
"amount": "50.00",
"currency": "USDT",
"chain": "polygon",
"merchantWallet": "0xYourWallet"
}'
Node.js
const response = await fetch("https://your-domain.com/api/v1/payments", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": process.env.ZATEWAY_API_KEY, // zate_sk_...
},
body: JSON.stringify({
amount: "50.00",
currency: "USDT", // or "USDC"
chain: "polygon", // polygon | solana | base | bsc | arbitrum | optimism
merchantWallet: "0xYourWallet",
}),
});
const session = await response.json();
console.log("Checkout URL:", session.checkoutUrl);
Python
import requests
response = requests.post(
"https://your-domain.com/api/v1/payments",
headers={
"Content-Type": "application/json",
"X-API-Key": os.environ["ZATEWAY_API_KEY"], # zate_sk_...
},
json={
"amount": "50.00",
"currency": "USDT", # or "USDC"
"chain": "polygon", # polygon | solana | base | bsc | arbitrum | optimism
"merchantWallet": "0xYourWallet",
},
)
session = response.json()
print("Checkout URL:", session["checkoutUrl"])