Get Widget/Payment Link via API
The Crymbo Widget lets you onboard guest users, pre-fill transaction data, and direct them into a seamless payment flow with full compliance. This guide covers:
- Creating a guest user
- Generating a guest token
- Building the widget URL
- Widget behavior based on data passed
Step 1: Create Guest with PII
Endpoint:
POST /v3/auth/create-guest-with-pii
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"
}
}
Step 2: Generate Guest Token
Endpoint:
POST /v3/auth/generate-guest-token
Request Body:
{
"username": "user@example.com"
}
Response:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Step 3: Build the Widget URL
The widget is accessed via:
https://widget.{your-platform-domain}/widget/{token}
Replace {token}
with the guest token from Step 2.
Required Parameters
Parameter | Description |
---|---|
consumerID | Unique ID of the merchant or user |
transactionID | Unique transaction reference |
token | The guest token generated earlier |
Optional Parameters
If included, these fields will be hidden and auto‑filled. When all required + optional parameters are valid, users are sent straight to payment.
Parameter | Description |
---|---|
method | Payment method (e.g. “Wire Transfer”) |
vendor | Payment provider ID |
amount | Amount to be spent |
spendCurrency | Currency being spent (UPPERCASE, e.g. EUR) |
receiveCurrency | Currency to receive (UPPERCASE, e.g. BTC) |
network | Network to receive funds (e.g. BITCOIN) |
Note: Including optional parameters disables editing for those fields.
SEPA 2 Vendor – Extra Fields
For first‑time SEPA 2 users, include bank details in the URL:
Spend Currency | Required Additional Fields |
---|---|
EUR | iban , bic |
GBP | accountNumber , sortCode |
If omitted, the widget will prompt the user to enter these manually.
Examples
Full Widget URL
https://widget.{your-platform-domain}/widget/{token}?
consumerID=abc123&
transactionID=1750340448230&
method=Wire%20Transfer&
vendor=ZEdGSHdqqqQeWtxR2s9&
amount=100&
spendCurrency=EUR&
receiveCurrency=BTC&
network=BITCOIN&
token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
Full Widget URL for SEPA 2
https://widget.{your-platform-domain}/widget/{token}?
consumerID=abc123&
transactionID=1750340448230&
method=Wire%20Transfer&
vendor=ZEdGSHdqqqQeWtxR2s9&
amount=100&
spendCurrency=EUR&
receiveCurrency=BTC&
network=BITCOIN&
iban=DE89370400440532013000&
bic=COBADEFFXXX&
token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
Summary of Widget Behavior
Scenario | Result |
---|---|
Required params only | Skips onboarding; user fills payment details manually |
Required + some optional params | Pre‑filled values locked; remaining fields open for user input |
Required + all optional params (valid) | Direct redirect to the payment page |
Missing any required params | Widget shows an error or blocks entry |
SEPA 2 without bank info | Prompts user for iban & bic or accountNumber & sortCode |
SEPA 2 with full bank info in URL | Skips bank input; proceeds with automatic user creation and payment |