Settle Payment
API Reference
Settle Payment
Execute settlement of a verified EIP-3009 payment with pre-settlement fee collection
POST
Settle Payment
Endpoint
Initiate settlement of a verified payment. The facilitator will:- Collect $0.01 fee from merchant’s approved USDC balance
- Execute customer → merchant payment via 1Shot API
Fee Collection: The $0.01 fee is collected from the merchant’s pre-approved USDC balance BEFORE settlement execution.
Request Parameters
object
required
Same payment payload used in verification
object
required
Same payment requirements used in verification
Request Examples
Response Examples
Response Fields
boolean
required
Whether settlement completed successfully
null
required
Always null (maintained for x402 compatibility)
string
required
Human-readable settlement result
object
details.settlement_id: Unique settlement identifierdetails.verification_id: Associated verification IDdetails.settled_amount: Amount settled (customer payment)details.merchant_received: Amount merchant received (same as settled_amount)details.fee_amount_wei: Fee collected from merchant (10000 = $0.01)details.fee_collection_status: “collected” | “failed”details.fee_tx_hash: On-chain transaction hash of fee collectiondetails.settlement_tx_hash: On-chain transaction hash of settlementdetails.fee_collected_first: Always true (guarantees no free service)details.pricing_model: “flat_rate”details.description: Explanation of fee collection method
Settlement Process
Settlement States
Fee Collection Details
Pre-Settlement Fee Collection
Why collect fee first? Prevents free service exploitation. If settlement executed before fee collection, merchants could intentionally cause settlement failures to get free verification service. Process:- Settlement is blocked
- Customer is NOT charged
- Merchant receives error:
insufficient_allowanceorfee_collection_failed
- Merchant paid $0.01 for the attempt
- This is intentional (prevents exploitation)
Handling Settlement Status
Polling for Completion
Common Issues
Insufficient Allowance
Insufficient Allowance
Error:
fee_collection_status: insufficient_allowanceSolution: Merchant must approve facilitator:Insufficient USDC Balance
Insufficient USDC Balance
Error:
fee_collection_failed: Insufficient USDC balanceSolution: Merchant needs to add USDC to their addressCheck balance:Settlement Takes Long
Settlement Takes Long
Normal: 35-70 secondsBreakdown:
- Fee collection: 5-10 seconds
- Provider submission: 5-15 seconds
- On-chain confirmation: 15-45 seconds
On-Chain Verification
All transactions are publicly verifiable:Settlement Timing
Settlement typically completes in 35-70 seconds on Base. Use polling or webhooks to track status.
Merchant Economics
Per settlement:Best Practices
1
Ensure Sufficient Approval
Before going live, verify merchant has approved enough USDC:
2
Maintain USDC Balance
Ensure merchant address has USDC for fees:
- Minimum: 1 USDC (100 settlements)
- Recommended: Match approval amount
3
Handle Errors Gracefully
Catch and display user-friendly error messages:
4
Monitor Settlements
Log settlement IDs and track success rates:
Next Steps
Verify Payment
Verify before settling
Error Handling
Handle settlement failures
Webhooks
Get settlement notifications
Architecture
Understand fee collection
Settlement complete! Customer payment delivered to merchant, fee collected from merchant’s approved balance.