Skip to main content

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, listing and reading payments, and withdrawals. Bearer JWT: required for merchant dashboard withdrawal APIs under /v1/merchants/{merchantId}/withdrawals and GET /v1/merchants/{merchantId}/withdrawals/config. See the API reference for interactive endpoint docs.
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)

Set type 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)

Withdrawals

List and get-by-id use GET on the same base path; see API Reference.

Withdrawal configuration (bearer)

Call GET https://api.spacepay.solutions/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.