API Reference
Interact with the Crypax REST API to create and manage payments programmatically. All requests must be made over HTTPS.
Base URL
https://api.crypax.ioAuthentication
Crypax uses two API key types. Include the appropriate key as a request header.
| Header | Key type | Usage |
|---|---|---|
X-Secret-Key | Secret Key | Server-side only. Create/read/refund payments. Prefix: sk_live_ |
X-Publishable-Key | Publishable Key | Safe for browser. Read-only public data. Prefix: pk_live_ |
POST /v1/payments HTTP/1.1
Host: api.crypax.io
X-Secret-Key: sk_live_your_secret_key
Content-Type: application/jsonEndpoints
/v1/paymentsSecret KeyCreate payment
Creates a new payment intent. Returns a clientSecret that the frontend SDK uses to confirm the payment.
Request body
{
"amount": "1.0",
"recipientAddress": "0xYourWalletAddress",
"chainId": 41956,
"currency": "native",
"orderId": "order_123",
"description": "Premium Plan",
"expiresInMinutes": 30
}Response
{
"id": "pay_01HZ...",
"clientSecret": "cs_live_...",
"status": "pending",
"amount": "1.0",
"currency": "native",
"chainId": 41956,
"recipientAddress": "0x...",
"orderId": "order_123",
"expiresAt": "2024-01-01T00:30:00.000Z",
"createdAt": "2024-01-01T00:00:00.000Z"
}/v1/payments/:idSecret KeyGet payment
Retrieves a payment by its ID.
Response
{
"id": "pay_01HZ...",
"status": "confirmed",
"txHash": "0xabcdef1234...",
"blockNumber": 12345,
"amount": "1.0",
"currency": "native",
"chainId": 41956,
"orderId": "order_123",
"createdAt": "2024-01-01T00:00:00.000Z",
"confirmedAt": "2024-01-01T00:02:31.000Z"
}/v1/paymentsSecret KeyList payments
Returns a paginated list of payments for the authenticated merchant.
Response
{
"data": [
{
"id": "pay_01HZ...",
"status": "confirmed",
"amount": "1.0",
"currency": "native",
"orderId": "order_123",
"createdAt": "2024-01-01T00:00:00.000Z"
}
],
"total": 42,
"page": 1,
"limit": 20
}/v1/payments/:id/refundSecret KeyRefund payment
Initiates a refund for a confirmed payment. Only payments in confirmed status can be refunded.
Response
{
"id": "pay_01HZ...",
"status": "refunded",
"refundedAt": "2024-01-01T01:00:00.000Z"
}/v1/chainsPublishable KeyList supported chains
Returns all blockchain networks supported by Crypax.
Response
[
{
"chainId": 41956,
"name": "Plumise Mainnet",
"symbol": "PLM",
"rpcUrl": "https:0
8: "https://explorer.plumise.com"
},
{
"chainId": 1,
"name": "Ethereum Mainnet",
"symbol": "ETH",
"rpcUrl": "https:2
13: "https://etherscan.io"
}
]/v1/tokensPublishable KeyList supported tokens
Returns all ERC-20 tokens supported for payment on each chain.
Response
[
{
"symbol": "USDC",
"name": "USD Coin",
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"decimals": 6,
"chainId": 1
}
]Error Responses
All errors return a consistent JSON shape with an HTTP status code in the 4xx–5xx range.
{
"statusCode": 401,
"message": "Invalid or missing API key",
"error": "Unauthorized"
}