Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer API Key, for example Bearer sk_live_xxx.

X-StablePay-Timestamp
string
header
required

Unix timestamp in seconds. Must be within 5 minutes of the server time.

X-StablePay-Nonce
string
header
required

Random string for replay protection, 16–64 characters.

X-StablePay-Signature
string
header
required

HMAC-SHA256 signature computed using the merchant API Secret, encoded as lowercase hex.

Headers

X-StablePay-Timestamp
string
required

Unix timestamp in seconds. Must be within 5 minutes of the server time.

X-StablePay-Nonce
string
required

Random string for replay protection, 16–64 characters. A new UUID is recommended for each request.

Required string length: 16 - 64
X-StablePay-Signature
string
required

Compute HMAC-SHA256 over {timestamp}.{nonce}.{requestBody} using the merchant API Secret and encode the result as lowercase hex. For GET requests, requestBody is an empty string.

Idempotency-Key
string
required

Request idempotency key scoped to the merchant, up to 128 characters.

Required string length: 1 - 128

Body

application/json
external_customer_id
string
required

Customer ID in the merchant system. Must be exactly 10 digits.

Pattern: ^[0-9]{10}$
allow_multiple_deposits
boolean
required

Whether multiple deposits are allowed using the same deposit link.

customer_name
string

Customer name. Saved when the customer is first created; existing customer details are not overwritten.

Maximum string length: 255
customer_email
string<email>

Customer email address. Saved when the customer is first created; existing customer details are not overwritten.

Maximum string length: 255
customer_phone
string

Customer phone number. Saved when the customer is first created; existing customer details are not overwritten.

Maximum string length: 50
expires_at
integer<int64>

Expiration time in Unix seconds. Must be in the future. Omit for a link that never expires; the response returns null.

description
string

Description of the deposit session.

Maximum string length: 500
success_url
string<uri>

Redirect URL after successful payment. Must be an absolute HTTPS URL.

Maximum string length: 1024
cancel_url
string<uri>

Redirect URL after the customer cancels payment. Must be an absolute HTTPS URL.

Maximum string length: 1024
metadata
object

Merchant-defined metadata. Up to 50 entries, with keys of 1–64 characters and values of up to 500 characters.

Response

Idempotent replay. Returns the same deposit session that was already created.

deposit_session_id
string
required

Deposit session ID.

customer_id
string
required

StablePay customer ID.

status
enum<string>
required

Deposit session status.

Available options:
active,
closed,
expired
allow_multiple_deposits
boolean
required

Whether multiple deposits are allowed using the same link.

expires_at
integer<int64> | null
required

Expiration time in Unix seconds. Always null when the link never expires.

url
string<uri>
required

Hosted checkout URL.

metadata
object
required

Merchant-defined metadata.

created
integer<int64>
required

Creation time in Unix seconds.

Last modified on October 13, 2026