Create payment or deposit
Creates a payment (fixed fiat amount) or a deposit (customer chooses how much crypto to send). Both return a hosted flow URL, apaymentId, and a payment secret`.
Deposits require the merchant to have deposits enabled. If deposits are
disabled for your account, contact SpacePay support team.
Request parameters
payment (default) or deposit. For payment, you must send amount. For
deposit, amount is optional; the customer can send a variable amount
on-chain.Amount in cents (for example, 250 = $2.50). Required when
type is
payment or omitted (defaults to payment). Optional when type is
deposit. Minimum: 250 cents, maximum: 100000000 cents.Payment currency. Supports
USD.Your order or reference id for reconciliation.
URL to send the customer after the payment completes.
Optional metadata as a JSON string (passed through to redirects as
configured).
Response fields
Complete payment object including
type (payment | deposit), status, quotes, and deposit address when applicable.Hosted payment URL for the customer.
Payment id (same as
payment.id).Payment secret — use with
X-SpacePay-Payment-Secret on payment-secret
endpoints (never treat this like your merchant secret key).