API Integration
For maximum control, integrate directly with SpacePay’s REST APIs to build your own payment interface.Authentication
Merchant secret key (X-SpacePay-Secret-Key): use on your server for creating payments or deposits, reading a payment by id, and withdrawals.
Payment secret (X-SpacePay-Payment-Secret): returned in the create-payment response as secret. Use it for customer-scoped routes under /v1/external/payment-secret-auth/payments/... (status, quotes, refresh).
Bearer JWT: required for merchant dashboard withdrawal APIs under /v1/merchants/{merchantId}/withdrawals and GET /v1/merchants/{merchantId}/withdrawals/config.
API keys: Generate merchant secret keys in the admin dashboard under
Settings → Developers → API Keys.
Create payment (fixed amount)
type defaults to payment. You must send amount (minimum 250 cents per API schema).
Create deposit (flexible amount)
Settype to deposit. Omit amount (it is ignored). Deposits must be enabled for the merchant.
List payments (merchant secret)
GET /v1/external/secretkey-auth/payments supports optional query params: type, status, search, sortBy, sortOrder, limit, and offset.
Get payment (merchant secret)
Payment secret flows
Usesecret from the create response with X-SpacePay-Payment-Secret. Endpoints include payment details, status, listing and creating quotes, and POST refresh-status. For deposit payments, quote creation may include forceDepositAmount (cents).
Withdrawals
GET on the same base path; see API Reference.
Withdrawal configuration (bearer)
CallGET https://api.spacepay.co.uk/v1/merchants/{merchantId}/withdrawals/config with a Bearer token to read supported tokens, limits, and the backend wallet before you build withdrawal UIs.
API Reference
For generated schemas and every endpoint, see the API Reference and the endpoint groups in the API reference tab.Error handling
SpacePay uses standard HTTP status codes and returns detailed error information:Next steps
SDK Integration
Use our official SDK for easier integration.
Webhooks
Set up real-time payment notifications.
Testing
Learn about test environments and scenarios.
API Reference
Endpoint reference and OpenAPI-backed pages.