Making your first payment
This tutorial walks you through the complete process of making your first test payment using Redpin’s sandbox environment.
Prerequisites
Before starting, ensure you have sandbox credentials from our Partner Integrations Team and basic understanding of the payment flow.
Required items:
- Sandbox credentials from our Partner Integrations Team
- Your Customer ID on Redpin’s platform
All API requests require OAuth 2.0 Bearer token authentication. See the Authentication guide for complete setup instructions and token management.
Step-by-step payment process
Step 1: Submit third-party customer data (if required)
This step is only required if the person sending the funds is NOT the account holder. If you (the account holder) are sending funds from your own account, skip this step and proceed to Step 2.
Submit compliance data for the third-party customer who will be making the payment:
When to use this step:
- Property developers collecting payments from buyers
- Platforms facilitating payments on behalf of their users
- Any scenario where the funding source is not the account holder
When to skip this step:
- You are sending funds from your own account
- Direct account holder transactions
Step 2: Get currency quote
Request a quote for the currency conversion:
Quotes expire after 30 minutes. Save the quote_id
for creating the payment in Step 4.
Step 3: Add recipient
Step 4: Create payment with FX conversion
Create the payment order with automatic FX conversion:
Important: Set the is_third_party_payment
flag based on the same decision from Step 1:
is_third_party_payment: true
- If you submitted third-party customer data in Step 1is_third_party_payment: false
- If you skipped Step 1 (account holder sending own funds)
Key parameters:
is_third_party_payment
: Must match whether you completed Step 1client_customer_ref
: Required whenis_third_party_payment: true
quote_id
: From Step 2recipient_details
: From Step 3
Webhook configuration
Set up webhooks for status updates
Configure webhooks to receive real-time payment status updates:
Webhook signatures are included in the svix-signature
header for security verification. See Webhooks documentation for signature validation examples.
Testing the payment flow
In sandbox, payments are automatically simulated with instant status updates for testing purposes.
Status progression
Monitor these status changes during testing:
AWAITING_FUNDS
- Payment created, awaiting customer fundsRECEIVED_FUNDS
- Funds received, ready for FX conversionFX_COMPLETED
- Currency conversion completedPAYOUT_INITIATED
- Transfer to recipient initiatedPAYMENT_COMPLETED
- Payment successfully delivered to recipient
Successful payment test
Expected flow:
- All steps complete without errors
- Webhooks deliver status updates
- Final status is
PAYMENT_COMPLETED
Common test scenarios
Quote expiration:
- Quote expires before conversion creation
- Regenerate quote and retry
Validation errors:
- Invalid recipient bank details
- Incorrect currency codes
- Missing required fields
Next steps
Review error handling patterns and implement robust failure recovery
Plan your migration from sandbox to production environment
Explore API vs Hosted approaches for your platform
Configure production webhooks for real-time notifications