Codapay API Versions
Codapay offers two versions of its API: v1.0 and v2.0.
While both versions are fully supported, v2.0 is the recommended version for all new integrations. It provides several improvements designed to simplify integration, improve maintainability, and enable access to newer features such as card saving.
Why v2.0?
v2.0 introduces the concept of a Global API Key, replacing the need for multiple API keys across countries and titles. This reduces complexity and streamlines integration and credential management. Additionally, a Project ID field has been added to help distinguish different products or titles, enabling better transaction segmentation and reporting.
Some advanced features, including saved card functionality, are only available when using v2.0 API keys.
Key Differences: v1.0 vs v2.0
API Key
One key per title-country combination
One global API key per merchant
Project ID
Not required
Mandatory for all requests
Saved Card Support
Not supported
Supported
Endpoint URL
/v1.0/Payment
/v2.0/Payment
Request Payload Contract
No projectId
projectId is required
Migrating from v1.0 to v2.0
If you are already integrated with Codapay API v1.0, we recommend upgrading to v2.0 to benefit from a simplified integration and new features. The upgrade process is lightweight and compatible with your existing transaction logic.
Migration Steps
Request a v2.0 API Key: Contact your Codapay integration support to obtain your global API key and project ID(s).
Update API Endpoint: Switch your base URLs from
/v1.0/to/v2.0/for both sandbox and production environments:Sandbox:
https://sandbox.codapayments.com/airtime/api/restful/v2.0/PaymentProduction:
https://airtime.codapayments.com/airtime/api/restful/v2.0/Payment
Add the
projectIdField: Update yourinitRequestpayload to include theprojectId, which is mandatory in v2.0."initRequest": { "projectId": "YOUR_PROJECT_ID", ... }Retain Existing Fields: All other request fields and flow remain unchanged. You can continue using the same logic for
country,payType,currency,items, andprofile.Test and Go Live: Validate your integration against the v2.0 sandbox environment. Once verified, switch to the production endpoint and begin using the updated flow.
Sample Comparison
v1.0 Sample
v2.0 Sample
Last updated
Was this helpful?