Quickstart Setup
Get started with Redpinβs B2B API integration quickly and easily. This guide provides complete setup instructions for both API integration and Hosted UI integration approaches.
This quickstart guide provides production-ready examples that demonstrate the full B2B payment flow, from authentication to payment execution. Choose the integration approach that best fits your needs.
Prerequisites
Before you begin, ensure you have:
- API Credentials: Your Redpin client ID and client secret
- Customer ID: Your assigned customer identifier
- Development Environment: Choose your preferred platform below
Integration Options
Redpin offers two main integration approaches:
For backend applications and custom integrations
Direct API access for complete control over the payment flow:
- Full API control and customization
- Backend-only integration
- Multiple language support (Java, Python)
- Production-ready examples with error handling
Reference implementations for third-party applications
Complete example applications demonstrating hosted payment flow integration:
- React.js web application reference
- React Native mobile app reference
- Embedded Redpin payment interface
- Real-world integration patterns and best practices
API Integration
Complete backend integration examples in Java and Python that demonstrate the full B2B payment flow.
Choose Your Language
Java
Python
Java Integration
Prerequisites
- Java 11 or higher
- Maven 3.6 or higher
Step 1: Clone and Setup
Step 2: Configure Environment
Step 3: Run the Integration
Complete Flow:
Individual Components:
API Integration Flow
The complete integration follows this sequence:
- π Authentication - Create access token using client credentials
- π Webhook Subscription - Set up real-time payment status notifications
- π€ Customer Creation - Register third-party customer information
- π₯ Recipient Creation - Add payment recipient details
- π± Quote Creation - Get exchange rate quotes
- π³ Payment Creation - Execute the international payment
The API integration examples include comprehensive error handling, logging, validation, and testing to ensure production readiness.
Hosted UI Integration
Reference implementations demonstrating how to integrate Redpinβs hosted payment flow into third-party applications. These example apps show the complete integration flow, from user interaction to payment completion.
Choose Your Platform
React.js
React Native
React.js Reference Application
Prerequisites
- Node.js (v18 or higher)
- npm or yarn
- Modern web browser
This is a reference implementation that demonstrates how to integrate Redpinβs hosted payment flow into a React.js application. Use this as a guide for implementing similar functionality in your own applications.
Step 1: Clone and Setup
Step 2: Configure Environment
Step 3: Start the Backend Server
The server will start on http://localhost:8080
Step 4: Start the React App
The app will open at http://localhost:3000
Available Scripts
Key Integration Features Demonstrated
These reference applications demonstrate essential integration patterns:
- Payment Flow Integration - How to embed Redpin payment options in your app
- API Call Flow - Complete flow from user click to payment completion
- Session Management - Handling payment sessions and user state
- Compliance Checks - Alert handling for incomplete compliance requirements
- Error Handling - Managing payment failures and edge cases
- Success Flow - Seamless user experience after successful payments
- WebView Integration - Embedding hosted payment interface
- Theme Customization - How to customize hosted UI with basic theme parameters
The reference apps include examples of theme customization, showing how to modify the hosted payment interface appearance using basic theme parameters to match your applicationβs branding.
Hosted UI Integration Flow
The hosted UI integration follows this user journey:
Payment Process:
What Happens Behind the Scenes:
The reference apps automatically handle:
- Customer Management - Creating or updating customer information
- Compliance Checks - Ensuring all required information is complete
- Session Optimization - Reusing existing sessions for faster payments
- Payment Processing - Secure payment flow through hosted interface
- Status Updates - Real-time payment status notifications
- Theme Customization - Matching the payment interface to your appβs branding
These reference applications include a backend server (server.js/server.mjs) that demonstrates how to proxy API calls and handle authentication securely. Study the server implementation to understand the required backend integration patterns. The apps also showcase theme customization capabilities for the hosted payment interface.
What You Can Expect
Backend Integration Examples
- Authentication Flow - Secure token-based authentication
- Customer Management - Create and manage third-party customers
- Recipient Management - Add and manage payment recipients
- Quote Management - Get real-time exchange rate quotes
- Payment Processing - Execute international payments
- Webhook Handling - Real-time payment status updates
Reference Application Features
- Payment Flow Integration - Complete example of embedding Redpin payments
- API Call Patterns - Demonstrates proper API calling sequence
- Session Management - Shows how to handle payment sessions
- Compliance Handling - Examples of compliance check alerts and flows
- Error Scenarios - Comprehensive error handling examples
- Success Flows - Complete user journey after successful payment
- WebView Integration - How to embed hosted payment interface
- Theme Customization - Examples of customizing hosted UI themes with basic parameters
- Real-time Status - Live payment status updates and notifications
Need Help?
If you encounter any issues during setup:
- Study the Reference Code - Review the React.js and React Native implementations
- Check API Documentation - Refer to the complete API reference
- Verify Configuration - Ensure all environment variables are set correctly
- Test Connectivity - Verify API endpoints are accessible
- Review Integration Patterns - Study how the reference apps handle payment flows
- Contact Support - Reach out to our support team for assistance
Make sure to use sandbox credentials for testing and development. Production credentials should only be used in production environments.