Troubleshooting - Accepting Payments
Troubleshooting Accepting Payments
Solutions to common issues when integrating payment acceptance.
Authentication Issues
401 Unauthorized Error
Problem: API returns 401 Unauthorized
Causes:
- Invalid API key or secret
- Expired token
- Token not included in request
Solutions:
Order Creation Issues
Payment Method Not Supported
Problem: Error โPayment method not supported for country/currencyโ
Cause: Using a payment method that isnโt available for the target country or currency
Solution:
Common mistakes:
- Using
SPEIfor Colombia (usePSEinstead) - Using
PSEfor Brazil (usePIXinstead) - Wrong currency for payment method
Invalid Document Number
Problem: Error โInvalid document number formatโ
Cause: Document number doesnโt match expected format for the document type
Solution:
Duplicate Order / Idempotency Issues
Problem: Creating duplicate orders or getting โOrder already existsโ error
Solution: Use externalId for idempotency
Payment Flow Issues
Order Stuck in PENDING
Problem: Order stays in PENDING status and never completes
Causes in Production:
- Customer hasnโt completed payment
- Payment URL expired
- Payment provider issues
Causes in Sandbox:
- Using failure test amount (666)
- Network issues
Solutions:
In Sandbox:
- Orders complete automatically after 5-30 seconds
- If using amount 666, order will fail (this is intentional for testing)
Payment Completed but No Webhook Received
Problem: Order shows COMPLETED in API but webhook wasnโt received
Causes:
- Webhook endpoint not configured
- Webhook endpoint unreachable
- Webhook endpoint returning errors
- Firewall blocking webhooks
Solutions:
Invalid Webhook Signature
Problem: Webhook signature verification fails
Cause: Incorrect signature calculation or wrong secret
Solution:
Amount and Currency Issues
Amount Validation Errors
Problem: โInvalid amountโ or โAmount too low/highโ
Causes:
- Amount is 0 or negative
- Amount exceeds limits
- Decimal amounts where integers expected
Solutions:
Currency Mismatch
Problem: โCurrency not supportedโ or mismatch errors
Cause: Using wrong currency for country or payment method
Solution:
Network and Timeout Issues
Request Timeout
Problem: API requests timeout
Causes:
- Slow network
- API under heavy load
- Missing timeout configuration
Solutions:
Contact Support
If youโve tried these solutions and still have issues:
Please include:
- Order ID or External ID
- Error message
- Request/response examples (remove sensitive data)
- Steps to reproduce
- Environment (sandbox/production)
Diagnostic Checklist
Use this checklist when troubleshooting:
- API credentials are correct
- Using correct base URL (sandbox vs production)
- Token is valid and not expired
- Payment method is supported for country/currency
- Amount meets minimum/maximum requirements
- Document number format is correct
- Currency matches country
- Webhook endpoint is publicly accessible
- Webhook signature verification is correct
- Network connectivity is stable
- Proper error handling is implemented
- Timeout values are appropriate