Skip to main content

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:

  1. Creating a guest user
  2. Generating a guest token
  3. Building the widget URL
  4. 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

ParameterDescription
consumerIDUnique ID of the merchant or user
transactionIDUnique transaction reference
tokenThe 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.

ParameterDescription
methodPayment method (e.g. “Wire Transfer”)
vendorPayment provider ID
amountAmount to be spent
spendCurrencyCurrency being spent (UPPERCASE, e.g. EUR)
receiveCurrencyCurrency to receive (UPPERCASE, e.g. BTC)
networkNetwork 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 CurrencyRequired Additional Fields
EURiban, bic
GBPaccountNumber, 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

ScenarioResult
Required params onlySkips onboarding; user fills payment details manually
Required + some optional paramsPre‑filled values locked; remaining fields open for user input
Required + all optional params (valid)Direct redirect to the payment page
Missing any required paramsWidget shows an error or blocks entry
SEPA 2 without bank infoPrompts user for iban & bic or accountNumber & sortCode
SEPA 2 with full bank info in URLSkips bank input; proceeds with automatic user creation and payment