CrypaxDocs

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.io

Authentication

Crypax uses two API key types. Include the appropriate key as a request header.

HeaderKey typeUsage
X-Secret-KeySecret KeyServer-side only. Create/read/refund payments. Prefix: sk_live_
X-Publishable-KeyPublishable KeySafe for browser. Read-only public data. Prefix: pk_live_
Example request
POST /v1/payments HTTP/1.1
Host: api.crypax.io
X-Secret-Key: sk_live_your_secret_key
Content-Type: application/json

Endpoints

POST/v1/paymentsSecret Key

Create 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"
}
GET/v1/payments/:idSecret Key

Get 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"
}
GET/v1/paymentsSecret Key

List 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
}
POST/v1/payments/:id/refundSecret Key

Refund 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"
}
GET/v1/chainsPublishable Key

List 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"
  }
]
GET/v1/tokensPublishable Key

List 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 4xx5xx range.

Error example
{
  "statusCode": 401,
  "message": "Invalid or missing API key",
  "error": "Unauthorized"
}

API Reference | Crypax Docs | Crypax