Migrating from RPG
This guide is for partners and merchants who are currently integrated with RPG (Borgun Payment API) and are moving to the new Teya ecommerce stack. It walks through the integration options available and maps each RPG capability to its replacement.
Choose your integration
There are two ways to take payments on the new stack: Embedded Components and direct API integration. We highly recommend Embedded Components.
| Embedded Components (highly recommended) | Direct API | |
|---|---|---|
| Integration effort | Medium — drop pre-built UI components into your checkout page | High — you build the payment UI and orchestrate every call yourself |
| Look and feel | Seamlessly blends into your website, with customisable styling | Fully yours to build |
| 3D Secure | Handled for you | Handled for you on the transaction flow |
| Fraud protection | Enhanced fraud protection built in — the components collect device and behaviour signals that strengthen risk decisions on every payment | Standard fraud checks only |
With Embedded Components you keep full control of your checkout page while the components handle card capture, 3D Secure and Apple Pay for you. See the Embedded Components overview to explore what they look like.
Use the direct API only where components have no equivalent, such as collecting merchant-initiated payments on stored cards.
What replaces what
The table below covers the RPG operations documented in the RPG API reference and where each one lives on the new stack.
| RPG capability | RPG endpoints | New integration |
|---|---|---|
| Authentication | HTTP Basic with a private key | Authenticate — OAuth client credentials, issued per store, exchanged for a bearer access token. |
| Card payments (incl. 3D Secure) | POST /api/paymentPOST /api/mpi/v2/enrollmentPOST /api/mpi/v2/validation |
Embedded checkout or card components — 3D Secure is handled for you, with no separate enrollment or validation calls. |
| Tokenisation | POST /api/token/singlePOST /api/token/multi |
Card on File — save a customer's payment method during a payment or with a zero-amount account verification. |
| Apple Pay | POST /api/payment with a wallet token |
Embedded Apple Pay component — Apple Pay support without hosting your own wallet integration. |
| MIT / collection payments | POST /api/payment with a multi-use token |
Charge a Saved Payment Method — a merchant-initiated transaction on a stored card via the direct API. |
| Refunds, captures & cancellations | PUT /api/payment/{id}/refundPUT /api/payment/{id}/capturePUT /api/payment/{id}/cancel |
Payment Actions — capture with POST /v1/transactions/{id}/capture and refund with POST /v3/refunds. There is no separate cancel: a refund on an uncaptured payment reverses the authorisation, replacing the RPG cancel. |
| Payment notifications | GET /api/events/{eventId} |
Webhooks — signed notifications pushed to your platform in real time. |
Next steps
- RPG → Embedded Components guide - Step-by-step migration of a direct RPG integration
- Migration overview - All migration paths and guides
- SDK initialization - Set up the embedded components SDK
- Testing - Test cards and integration checklist
- API Reference - Full API endpoint documentation