Order mapping and identification
Map and identify orders using tokens and external IDs in the onramp widget
Order token
The orderToken
parameter is used to initiate the widget with a prepared order created using our REST API.
Example usage
When to use order tokens
Order tokens are useful when you want to:
- Pre-configure specific order parameters on the server side
- Implement server-side validation before allowing widget initialization
- Track orders through your backend systems before user interaction
- Ensure consistent pricing and availability
External ID
The externalId
parameter allows you to link Swipelux orders to your own system's order IDs or references.
Requirements
- Maximum length: 64 characters
- Must be unique within your system
- Can contain alphanumeric characters, hyphens, and underscores
Static external ID
If you know the external ID in advance:
Dynamic external ID
If you need to generate the external ID at runtime:
Example with UUID generation
Combining order token and external ID
You can use both parameters together for maximum flexibility: