Create Ramp Session
API
Create Ramp Session
Initialize a new ramp widget session for a user
POST
Create Ramp Session
API Overview
Base URL
All API requests should be made to:Authentication
All ZBD endpoints are protected by an API Key. To make requests against these endpoints you must pass a header property calledapikey with your ZBD Project API Key.
Get your API keys by scheduling a call with our sales team.
SSL / HTTPS Access
ZBD only provides a secure interface over HTTPS with SSL certificate support. Any requests that attempt to reach the ZBD API in an insecure fashion (plain-text over HTTP requests) will be rejected.Description
This endpoint creates a session token and widget URL that can be used to embed the ZBD Ramp widget in your game or application.Usage
The ramp widget allows your users to purchase Bitcoin using their preferred fiat currency. The session creation process involves:First
Create a session with user details and configuration options
Second
Receive a widget URL and session token to embed in your application
Configuration
Header Parameters
string
required
ZBD Project API Key
string
Content Type
Body Parameters
string
required
Email address of the user launching the Ramp
string
required
URL to receive webhook notifications
string
Existing user session token (for returning users)
string
Currency to convert from (e.g., USD)
string
Currency to convert to (e.g., BTC)
string
Destination address for the funds (Lightning Address or onchain address)
string
Your internal reference ID for this transaction
object
Additional metadata for the transaction
Error Responses
INVALID_EMAIL- Email format is invalidINVALID_WEBHOOK_URL- Webhook URL is not accessibleUNAUTHORIZED- Invalid API keyRATE_LIMITED- Too many requests
Webhook Events
Webhooks are sent as POST requests to your specifiedwebhook_url.