Get Widget/Payment Link via API
The Crymbo Widget allows guest users to be onboarded and directed into a compliant payment flow. This guide explains how to:
- Login (generate JWT)
- Create a guest user (Step 1)
- Generate a guest token (Step 2)
- Build the widget URL (Step 3)
Step 1: Authenticate to the API
You must first generate a JWT token. See the full authentication documentation for details Generate JWT
Step 2: Create Guest with PII
Endpoint: POST /v3/auth/create-guest-with-pii
Headers:
Authorization: Bearer <your_token>
Accept: application/json
Request Body:
{
"email": "user@example.com",
"pii": {
"firstName": "John",
"lastName": "Doe",
"dob": "1990-01-01",
"phone": "+1 555 123 4567",
"address": "123 Main Street",
"city": "New York",
"country": "USA",
"zipCode": "10001"
}
}
💡 Notes:
dob
must be in formatYYYY-MM-DD
country
must be an ISO 3166-1 alpha-3 code (e.g.USA
,ISR
,GBR
)
Step 3: Generate Guest Token
Endpoint: POST /v3/auth/generate-guest-token
Headers:
Authorization: Bearer <your_token>
Accept: application/json
Request Body:
{
"username": "user@example.com"
}
Example Response:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Step 4: Build the Widget URL
The widget is accessed via the following URL structure:
https://widget.{your-platform-domain}/widget/token
Required Parameters
Parameter | Description | How to get |
---|---|---|
consumerID | Unique ID of merchant or user | you may access /me andpoint on the api or contact your admin |
transactionID | Unique transaction reference | Any unique string (UUID, etc.) |
token | Guest access token | From Step 3 |
Optional Parameters (Pre-filled & Locked)
Parameter | Description | Notes / Source |
---|---|---|
method | Payment method (e.g., "Wire Transfer") | Supported: "Credit Card", "Wire Transfer", "Google Pay", etc. |
vendor | Payment provider ID | Contact admin to obtain a valid vendor ID |
amount | Amount to be spent | You can choose any amount |
spendCurrency | Fiat currency in UPPERCASE (e.g., EUR) | Retrieve options via currency list API |
receiveCurrency | Crypto currency in UPPERCASE (e.g., BTC) | Retrieve options via currency list API |
network | Blockchain network (enum, must match system) | Retrieve options via currency list API |
These fields, if included, are locked and not editable in the widget UI.
Vendor-Specific Fields
Some vendors require additional fields. Example for BCB SEPA:
Required Fields:
Spend Currency | Required Fields |
---|---|
EUR | iban , bic |
GBP | accountNumber , sortCode |
Example Widget URL
https://widget.{your-platform-domain}/widget/token?
consumerID=abc123&
transactionID=1750340448230&
method=Wire Transfer&
vendor=ZEdGSHdqqqQeWtxR2s9&
amount=100&
spendCurrency=EUR&
receiveCurrency=BTC&
network=BITCOIN&
token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
With SEPA 2 (EUR) Banking Info:
https://widget.{your-platform-domain}/widget/token?
consumerID=abc123&
transactionID=1750340448230&
method=Wire Transfer&
vendor=ZEdGSHdqqqQeWtxR2s9&
amount=100&
spendCurrency=EUR&
receiveCurrency=BTC&
network=BITCOIN&
iban=DE89370400440532013000&
bic=COBADEFFXXX&
token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...