Authentication
Last updated
All API requests require an API key passed in the X-Api-Key header.
X-Api-Key: ap_live_your_api_key_hereLog in to the AstraPay Dashboard
Go to Settings → API Keys
Click Create API Key
Select scopes and choose Test or Live mode
Copy the key immediately — it is only shown once
ap_live_
Production — processes real payments
ap_test_
Test mode — payments auto-complete, no blockchain
Each key has one or more scopes that control which endpoints it can access.
payments:create
POST /payments, POST /payments/:id/cancel
Create and cancel payments
payments:read
GET /payments, GET /payments/:id
Read payment data
products:manage
All /products endpoints
Full CRUD on products
webhooks:manage
All /webhooks endpoints
Full CRUD on webhooks
The account associated with the API key must be activated and have a merchant profile set up. Requests from banned or incomplete accounts return 401.
Last updated