DLN Referral Codes
For deBridge Liquidity Network (DLN) integrations, referral codes are generated on-chain and enable additional features like auto-cancellation.What Referral Codes Enable
| Capability | Description |
|---|---|
| Order Tracking | See all orders created through your integration |
| Analytics | Monitor volume, fees, and user activity |
| Feature Toggles | Enable DLN features like auto-cancellation per integration |
| Custom Support | Faster debugging with order attribution |
Getting a Referral Code
Visit the Referral Page
Go to app.debridge.com/refer
Select Network
Choose Polygon for the cheapest generation fee. The code works across all supported chains including Solana.
Using Your Code
API Integration
IncludereferralCode in your
create-tx requests.
More details are available in the API documentation.
Widget Integration
Set ther parameter in your widget configuration.
Tracking Orders
Query all orders associated with your referral code using the tracking API: See the full order tracking documentation for available filters and response fields.Code Example
A complete working example is available on GitHub: get-orders-by-referral-code.tsAuto-Cancellation Feature
For DLN integrations, referral codes unlock auto-cancellation—automatic cancellation of unfulfilled orders after a timeout, improving user experience.How It Works
- Unprofitable orders: Cancelled after 5 minutes
- Other issues: Cancelled after 15 minutes
- Cost: Subsidized by deBridge
- Result: Users don’t need to manually cancel failed orders
Enabling Auto-Cancellation
This feature requires approval from deBridge:- Contact deBridge to request the feature
- Configure required parameters (
srcAllowedCancelBeneficiary) - deBridge reviews your integration
- Feature is enabled for your referral code
Technical References
API Parameters
Full referralCode parameter specification
Order Tracking
Query orders by referral code
Auto-Cancellation
Automatic order cancellation setup
Widget Reference
Widget configuration options