API Endpoint
POST
/api/v0/payment-intents/stablecoin
Idempotency: Supported (recommended for all operations)
Authentication
All requests require API key authentication using the following headers:Your application’s client key
Your application’s client secret
Idempotency
The endpoint supports idempotency to prevent duplicate payments:Include a unique UUID v4 in the header
Subsequent requests with the same key return the original response
Keys expire after 24 hours
Subsequent requests with the same key return the original response
Keys expire after 24 hours
Supported Networks
Our platform currently supports the following blockchain networks:Network | Code | Description |
---|---|---|
Ethereum | ethereum | Main Ethereum network |
Polygon | polygon | Polygon (Matic) network |
Solana | solana | Solana blockchain |
Base | base | Coinbase’s Base network |
Arbitrum | arbitrum | Arbitrum Layer 2 |
Optimism | optimism | Optimism Layer 2 |
Avalanche C-Chain | avalanche_c_chain | Avalanche C-Chain |
Stellar | stellar | Stellar network |
Tron | tron | Tron blockchain |
Supported Stablecoins
Currency | Code | Description |
---|---|---|
USDC | usdc | USD Coin |
EURC | eurc | Euro Coin |
Request Parameters
Required Parameters
The stablecoin currency to convert FROM (usdc, eurc)
Example:
Example:
"usdc"
The blockchain network where source currency resides
Example:
Example:
"ethereum"
The blockchain network where converted currency will be delivered
Example:
Example:
"polygon"
Optional Parameters
The stablecoin currency to convert TO (defaults to sourceCurrency)
Example:
Example:
"eurc"
Wallet address for receiving funds (Ethereum 0x… or Solana format)
Example:
Example:
"0x742d35Cc6634C0532925a3b8D4C9db96c4b4d8e1"
Payment amount in source currency (omit for flexible amounts)
Example:
Example:
"100.50"
Customer’s first name (max 100 chars)
Example:
Example:
"John"
Customer’s last name (max 100 chars)
Example:
Example:
"Doe"
Customer’s email address
Example:
Example:
"john.doe@example.com"
Customer’s physical address
Example:
Example:
"123 Main St, New York, NY 10001"
Customer’s country
Example:
Example:
"United States"
Customer’s country ISO code
Example:
Example:
"US"
Customer’s province/state
Example:
Example:
"New York"
Customer’s province/state ISO code
Example:
Example:
"NY"
Customer’s phone number
Example:
Example:
"+1-555-123-4567"
Examples
Response Format
Success Response (201 Created)
Response Fields
Unique transaction identifier in our database
External bridge service transfer ID
Current state: pending, processing, completed, failed, cancelled
Payment amount (null for flexible amounts until user specifies)
Source payment details including payment rail and currency
Destination payment details including payment rail, currency, and address
Customer information (if provided)
Creation timestamp (ISO 8601)
Last update timestamp (ISO 8601)
Error Responses
Network-Specific Considerations
Address Formats
Networks: Ethereum, Polygon, Base, Arbitrum, Optimism, AvalancheUse hexadecimal format starting with
0x
Example: 0x742d35Cc6634C0532925a3b8D4C9db96c4b4d8e1
Gas Fees & Transaction Speed
Network | Typical Fee | Speed | Best For |
---|---|---|---|
Ethereum | High | Slow | Large transfers, maximum security |
Polygon | Very Low | Fast | Frequent small transfers |
Solana | Very Low | Very Fast | High-frequency trading |
Base | Low | Fast | Consumer applications |
Arbitrum | Low | Fast | DeFi applications |
Optimism | Low | Fast | DeFi applications |
Avalanche | Medium | Fast | Cross-chain transfers |
Use Cases
Cross-Chain Arbitrage
Enable users to move assets between networks to take advantage of price differences or liquidity opportunities.Currency Conversion
Allow seamless conversion between USDC and EURC for international payments and regional preferences.Layer 2 Onboarding
Help users move from expensive Layer 1 (Ethereum) to cheaper Layer 2 solutions (Polygon, Arbitrum, Optimism).Multi-Chain Portfolio Management
Enable users to distribute their holdings across multiple networks for diversification and risk management.Dynamic Pricing
Create flexible payment intents for services with variable pricing, allowing users to specify amounts during checkout.Best Practices
Amount Validation
- Use string format for amounts to avoid floating-point precision issues
- Support up to 6 decimal places
- Validate minimum amounts based on network gas fees
Address Validation
- Always validate destination addresses before creating payment intents
- Use different validation patterns for different networks
- Consider implementing address checksums for Ethereum-compatible networks
Error Handling
- Implement proper retry logic for network failures
- Handle insufficient balance scenarios gracefully
- Provide clear error messages to users
Idempotency
- Always use unique idempotency keys for each request
- Store and reuse keys for retries of the same operation
- Implement proper key expiration handling
Integration Examples
React Integration
Support
For additional support or questions about the Create Stablecoin Payment Intent API:- Check our API status page for known issues
- Review the error codes and messages in your responses
- Contact our support team with your
bridge_transfer_id
for specific transaction issues - Use our testing environment to validate integrations before going live
Based on the Scalar documentation from Create Stablecoin Payment Intent.