Skip to main content

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:

  1. Login (generate JWT)
  2. Create a guest user (Step 1)
  3. Generate a guest token (Step 2)
  4. 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 format YYYY-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

ParameterDescriptionHow to get
consumerIDUnique ID of merchant or useryou may access /me andpoint on the api or contact your admin
transactionIDUnique transaction referenceAny unique string (UUID, etc.)
tokenGuest access tokenFrom Step 3

Optional Parameters (Pre-filled & Locked)

ParameterDescriptionNotes / Source
methodPayment method (e.g., "Wire Transfer")Supported: "Credit Card", "Wire Transfer", "Google Pay", etc.
vendorPayment provider IDContact admin to obtain a valid vendor ID
amountAmount to be spentYou can choose any amount
spendCurrencyFiat currency in UPPERCASE (e.g., EUR)Retrieve options via currency list API
receiveCurrencyCrypto currency in UPPERCASE (e.g., BTC)Retrieve options via currency list API
networkBlockchain 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 CurrencyRequired Fields
EURiban, bic
GBPaccountNumber, 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...