Skip to content

API Reference

This is the complete API reference for BITXpay. All endpoints use HTTPS and return JSON responses.

Base URL

text
https://api.bitxpay.com/api/v1
text
https://sandboxapi.bitxpay.com/api/v1

Authentication

All merchant API requests must include signature authentication headers. Merchant endpoints (Payment Links) use Ed25519 (EdDSA) signature authentication (RSA-PSS accepted for legacy keys). See Authentication for details.

Merchant APIs (Ed25519 signature):

bash
X-API-Key: btxm_test_xxxxxxxxxxxx      # use btxm_live_xxxxxxxxxxxx in production
X-API-Signature: <base64_encoded_ed25519_signature>
X-API-Timestamp: 2026-01-31T12:00:00Z

HMAC authentication

An HMAC-SHA256 authentication scheme is planned for a future set of standard (non-merchant) APIs. It is not yet available — no live endpoints use it today. It will be documented here once those endpoints ship.

Endpoints

Payments (Merchant API)

MethodEndpointDescription
GET/payment_links/currenciesGet supported currencies
GET/payment_linksList all payment links
POST/payment_linksCreate a payment link
GET/payment_links/:idGet payment link by ID
DELETE/payment_links/:idDelete a payment link

Subscriptions — Authenticated (Merchant) Routes

MethodEndpointDescription
POST/subscriptions/plans/Create a subscription plan
GET/subscriptions/plans/List subscription plans
GET/subscriptions/plans/:idGet subscription plan by ID
PUT/subscriptions/plans/:idUpdate a subscription plan
DELETE/subscriptions/plans/:idDeprecate a subscription plan
POST/subscriber/Create a subscriber
GET/subscriber/Get subscribers by merchant
GET/subscriber/plan/:plan_idGet subscribers by plan ID
PUT/subscriber/:idUpdate a subscriber
GET/subscriber/:idGet subscriber by ID
GET/invitations/Get invitations by plan ID
GET/subscriptions/link/List subscription links
GET/subscriptions/link/:idGet subscription link by ID

These routes require Merchant API Key authentication (X-API-Key/X-API-Signature with Ed25519), same as the Payments API.

Subscriptions — Public Routes

MethodEndpointDescription
GET/public/subscriptions/plans/List public subscription plans
GET/public/subscriptions/plans/:idGet public subscription plan by ID
GET/public/subscriber/preparePrepare subscription enrollment
GET/public/subscriber/:idGet subscriber by ID
PUT/public/subscriber/:idUpdate subscriber
POST/public/subscriptions/link/Create a subscription link
GET/public/subscriptions/link/:walletAddressGet subscription links by wallet address
POST/public/subscriptions/link/paymentRecord a subscription payment
PUT/public/subscriptions/link/:idUpdate a subscription link
GET/public/subscriptions/nft/:plan_idGet subscription NFT metadata

These routes do not require merchant signature headers — they are called directly from the customer-facing wallet/checkout flow. See Subscriptions for full request/response details.

Response Format

All responses follow a consistent format:

json
{
  "message": "Human-readable result message",
  "data": {
    // Response data
  }
}

Error Handling

Errors return appropriate HTTP status codes with a consistent error body:

json
{
  "message": "Amount must be greater than 0",
  "error": "invalid_amount",
  "code": 400
}
FieldTypeDescription
messagestringHuman-readable description of the error
errorstringMachine-readable error slug (snake_case)
codeintegerHTTP status code, duplicated in the body for convenience

Error Codes

CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Invalid API key
403Forbidden - Insufficient permissions
404Not Found - Resource doesn't exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error

Rate Limits

Rate limits are enforced per API key, per endpoint. See the Rate Limiting section on the Payments page for exact limits (typically 10-30 requests/minute); for Subscriptions, see the Rate Limiting note and contact your account team for current per-route limits.

EnvironmentAccount-level ceiling
Sandbox100 requests/minute
Production1000 requests/minute

The account-level ceiling above is a hard cap across all endpoints combined; the per-endpoint limits documented on each page are typically the binding (lower) limit you will hit first.

Rate limit headers are included in every response:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1705312200