API Migration Guide: Transitioning to API Gateway

Overview

This document provides the necessary steps to migrate your existing integration to our new API. The transition is straightforward, as the new version maintains 100% feature parity with the old API's. While the data structures and logic remain identical, this migration involves a shift to our new infrastructure and updated endpoints.

1. Prerequisites (Action Required)

Before you can begin updating your endpoints, you must register your application in our new environment:
📱
Partner's Portal Registration
Access to the new API is managed through our Partner's Portal. You will need to create an account and register your integration there to obtain new credentials.
Register here →
📖
Onboarding Guide
For a step-by-step walkthrough on how to register and set up your new integration, please visit our documentation.
View Onboarding Documentation →

2. What is Changing?

The core data logic remains the same, but the integration workflow and authentication process have been updated as follows:

A Merchant Authorization Workflow

To connect with a merchant, you must now follow these steps within the Partner Portal:
1.
Share Approval Link
After creating your integration, you will receive a unique share link. You must send this link to the merchant for their formal approval.
2.
Merchant Approval
The merchant must approve the integration through the link before you can proceed to generate credentials.

B Credential Management

1.
Once the merchant has approved the integration, navigate to the Merchants tab in the portal.
2.
Generate Merchant Credentials
You can then generate the Merchant Client ID and Merchant Client Secret.
âš ī¸
Important
The Merchant Secret is displayed only once. Ensure you store it securely immediately.

C Updated Authentication (Token Generation)

The new API uses a multi-layer security approach to generate session access:
1.
Bearer Token
Use your Partner Client ID and Partner Secret to request a Bearer Token.
2.
Session ID
Generate a Session ID by providing the Merchant ID, Merchant Secret, and the Bearer Token obtained in the previous step.

D Endpoint Mapping

All legacy endpoints must be pointed to the new Base URL:
While request and response schemas remain identical to the previous version, you must update the specific paths. A detailed mapping table for all endpoints is provided in the following section of this guide.
💡
Note
Please verify the request formats in the documentation, as there may be subtle differences between the APIs.

3. API Mapping Table

Below is a detailed list of the legacy APIs and their corresponding endpoints in the new API Gateway. Please ensure you update both the Base URL and the specific path for each request.

A. Transaction API Mapping

â„šī¸
The integration type in the Partner's portal must be Account management.

B. Transaction API → API Gateway - Ecommerce

Old APIsNew APIs
Transaction APIAPI Gateway - Ecommerce
Create Payment ButtonCreate Payment Button
Create Payment LinkCreate Payment Link
LanguagesList of Languages
List Payment ButtonsList of Payment Buttons
List Payment LinksList of Payment Links
Payment Button DetailsPayment Button Details
Payment Link DetailsReceive Payment Link Details by code
Delete Payment ButtonDelete Payment Button
Delete Payment LinkDelete Payment Link
Settlement DataSettlement Data
Edit Payment ButtonUpdate details of Payment Button
Edit Payment LinkEdit Payment Link details
Create Payment RequestCreate Payment Request
Send Payment Request reminderSend Payment Request reminder
List Payment RequestsList Payment Requests
Payment Request DetailsPayment Request Details
â„šī¸
The integration type in the Partner's portal must be Ecommerce.

C. Devices API → API Gateway – POS

Old APIsNew APIs
Devices APIAPI Gateway - POS
List DevicesGet Terminals
List TransactionsGet All Transactions
Device DetailsGet Terminals Details
Receipt DetailsGet Terminal Receipt By Payment Reference
List Device TransactionsGet Terminal Transactions by Id
RefundTerminal Refund
â„šī¸
The integration type in the Partner's portal must be Cash Register.

Final Checklist for Developers

✓
Replace your legacy Base URL with https://api-gateway.mypos.com/.
✓
Update the endpoint paths as shown in the tables above.
✓
Important: Double-check the request body parameters for each "New API" endpoint in our official documentation, as minor schema updates may have been applied.