Migrating from B-Gateway
This page is for businesses and partners whose systems call B-Gateway directly (the Borgun payment gateway web service, SOAP/XML; also written BGateway, known in Iceland as Greiðslugátt), and are moving to the new Teya ecommerce platform. It lists the integration options and maps every B-Gateway operation and field to its replacement. For the step-by-step migration, see the B-Gateway migration guide.
Processor and MerchantID. The new platform uses OAuth credentials per merchant store, issued to you through the registration flow — see Authenticate. If you hold B-Gateway credentials for many merchants, talk to your Teya partner contact about the approach.
Choose your integration
On B-Gateway your own systems collect the card number (or hold a virtual card number) and send it to Teya in one call, with 3D Secure values if you run 3D Secure yourself; the same call serves payments with and without the customer. On the new platform the two are separate. When the customer is paying, Teya collects the card and runs 3D Secure for you, either on a Teya page or inside your own checkout page, and your servers only describe the payment and receive the result. When the customer is not there, your server charges a card they saved earlier, as a merchant-initiated payment.
| Hosted Checkout | Embedded Components | Direct API | |
|---|---|---|---|
| Customer experience | Redirected to a Teya payment page and back to your site | Stays on your page; Teya-hosted card fields sit inside your checkout | Your own card form |
| Integration effort | Lowest: one server call and a redirect | Medium: one server call plus a component on your page | High: you build the form, the 3D Secure challenge display and every call |
| Card data on your systems | None | None | Yes: PCI DSS (SAQ D) obligations stay with you |
| 3D Secure | Handled for you | Handled for you | Run by Teya; you display the challenge. Results from your own MPI are not accepted |
| Saving cards for subscriptions | Yes: save_payment_method on the session | Yes: save_payment_method on the session | Yes: store_payment_method on the transaction |
| When to choose it | You want the least code, or your customers trust a payment-provider page | You want the checkout to stay on your site, with Apple Pay and currency conversion built in | You want to keep your own card form and the PCI DSS obligations that come with it; check with Teya first, especially if you run your own or a third-party MPI today |
Charging a saved card later, without the customer present (subscriptions, instalments), always uses the direct API with a token: POST /v3/transactions/online. No card data is involved, so it needs no PCI evidence. See Charge a Saved Payment Method.
What replaces what
Operations and fields from the B-Gateway developer documentation, and where each one lives on the new platform.
Payments and payment actions
| B-Gateway | New platform | Notes |
|---|---|---|
Authentication: username + password on every call; Processor, MerchantID, TerminalID (1 ecommerce, 2 ecommerce with 3D Secure, 3 recurring, 4 mail/telephone order) in the XML | OAuth client_id + client_secret per store, exchanged for a short-lived Bearer token; store_id in the request | See Authenticate. Cache the token for its expires_in. |
getAuthorization, TransType 1 (purchase), AuthCode empty | Checkout session POST /v2/checkout/sessions, type: "SALE", then Hosted Checkout or the Checkout component | The server sends only the intent: amount, currency, reference. No card number, expiry, CVC or 3D Secure values. |
getAuthorization, TransType 5 (pre-authorisation) | Checkout session with type: "PRE_AUTHORISATION" | See Payment Actions. |
getAuthorization, TransType 1 with the AuthCode of a pre-authorisation (capture, incl. a lower amount) | POST /v1/transactions/{id}/capture with {"amount": n} | Any amount up to the authorised total, once per authorisation; the remainder is released. |
Zero-amount TransType 5 to verify a card (recurring set-up) | Checkout session with type: "ACCOUNT_VERIFICATION", amount.value: 0 and save_payment_method: true | Verifies and saves the card without charging it. Without save_payment_method, nothing is saved. |
getAuthorization, TransType 3 (refund), referencing the original DateAndTime + RRN | POST /v3/refunds with transaction_id and amount, or a refund from the Business Portal | Same rules: partial and multiple refunds, total ≤ original. The reference is the new-platform transaction_id, not a date and RRN. |
getAuthorization, TransType 4 (partial reversal, same day) | No direct equivalent | To charge less than you authorised, pre-authorise and capture the final amount. Otherwise, refund the difference. |
cancelAuthorization | POST /v3/refunds on the uncaptured payment | A refund before capture reverses the authorisation. There is no separate cancel and no "open batch" condition. |
get3DSAuthentication, or your own / a third-party MPI, then CAVV, UCAF, XID, SecurityLevelInd on the authorisation | Built into Hosted Checkout and the Embedded Components | Delete the whole 3D Secure flow: MerchantReturnURL, PaRes/CRes handling, the MPI connection. With the direct API, Teya returns a challenge for you to display. |
| Authorisation without 3D Secure values | Customer-present payments always go through 3D Secure | Payments without the customer are made on a saved card, declared as merchant-initiated (below). Sort your call sites into the two kinds first; see the guide. |
ActionCode (000 = approved) and the gateway codes 904, 909, 953 | payment_status (SUCCESS / FAILED) on the session; status + status_reason on direct-API transactions; HTTP status codes for request errors | No action-code tables. Declines are shown in the checkout and the customer can retry. |
Unknown result after a timeout: poll getTransactionList | Retry with the same Idempotency-Key, or look the session up: GET /v2/checkout/sessions/{session_id} | A retry with the same key can't create a second payment. The payment.succeeded.v1 webhook confirms every successful payment. |
Track1 / Track2 (card read on a device), TerminalID 4 (mail or telephone order), sales keyed into B-Online | Not part of online payments | Card-present, telephone and keyed payments are not covered by this migration. Talk to your Teya partner contact before migrating if you use them. |
Stored cards and recurring payments
| B-Gateway | New platform | Notes |
|---|---|---|
getVirtualCard: card number in, virtual card number (16 digits, 9910…) out | save_payment_method: true on the checkout session; the token arrives in the payment.succeeded.v1 webhook as token_response.token_id | The card is saved inside the customer's payment or a zero-amount verification. No separate call, and no card number on your side. See Card on File. |
getAuthorization with a virtual card number, without the customer (subscriptions, instalments) | POST /v3/transactions/online with initiator: "MERCHANT" and payment_method.type: "TOKEN" + recurring_payment_type | No 3D Secure, immediate final result. See Charge a Saved Payment Method. |
TerminalID 3 (recurring) / sending no CVC and no 3D Secure values | initiator (MERCHANT / CUSTOMER) + recurring_payment_type (RECURRING / INSTALLMENT / CARD_ON_FILE) | You declare what kind of charge it is. The platform no longer infers it from missing fields. |
lifecycleID sent back with the virtual card number | Not sent | The platform keeps the card scheme's reference to the first payment against the token and attaches it to every later charge. |
| Virtual card numbers you already hold | Converted on first use: payment method LEGACY_TOKEN after Teya imports your stored cards | Customers never re-enter a card. Do this after your one-off payments are live. See Stored cards & recurring. |
Card numbers you store on your own systems (never passed through getVirtualCard) | No import | Talk to your Teya partner contact before planning the move. Only values issued by the legacy platform can be converted. |
Batches, reporting and other operations
| B-Gateway | New platform | Notes |
|---|---|---|
Batches: Batch and Transaction numbers in every response; automatic close at midnight GMT; newBatch to close earlier | No batches | Settlement is automatic. Delete batch handling; key your records on transaction_id. |
| Batch authorisations and processing results (many transactions in one request) | No batches | Charge each saved card with its own POST /v3/transactions/online request. Contact Teya support if your volumes make this a concern. |
getTransactionList | One payment: GET /v2/checkout/sessions/{session_id}. All payments: the Business Portal | Store the transaction_id from the webhook against each order. |
| Settlement list, batches and transactions in settlement, chargebacks; disputed and fraud transaction lists | The Business Portal | Settlement itself is unchanged: same merchant account, same payout timing and statements. |
Other features: sendDetailData (invoice detail), passenger itinerary data, Dynamic Descriptors (MerchantName, MerchantCity, …) | Depends on your case | Contact Teya support with your specific case before migrating, so we can check it with you. Order lines can be sent with the session as line_items. |
| Receipts (none on B-Gateway) | POST /v1/transactions/{id}/receipts | New: emails a Teya-generated receipt. See Payment Actions. |
| B-Online for refunds and cancellations | The Business Portal and the Teya app, for payments taken on the new platform | Payments taken on B-Gateway before you switch are refunded in B-Online, as today. |
Fields and formats
| B-Gateway | New platform | Notes |
|---|---|---|
TrAmount: two implied decimals for every currency, including ISK (100 ISK = 10000); TrCurrencyExponent on 3D Secure requests | amount.value: an integer in minor units per ISO 4217. ISK has no subunit (100 ISK = 100; €54.43 = 5443) | If you charge in ISK, divide B-Gateway amounts by 100: the most likely silent bug in an ISK migration. Other currencies are unchanged (€49.90 is 4990 on both). |
TrCurrency: ISO numeric (352, 978) | amount.currency: ISO alphabetic ("ISK", "EUR") | Lookup change. |
RRN: exactly 12 characters, your reference | merchant_reference (free-form) + optional metadata | Write the legacy RRN or order number into metadata during the transition if your back office keys on it. |
DateAndTime | Not sent | Teya timestamps payments server-side. |
PAN, ExpDate, CVC2 | Not sent | Entered by the customer on the Teya page or in the Teya-hosted fields. |
Version (1000), XML request and response | JSON over HTTPS (REST) | There is no server-side SDK; plain HTTPS on the server, the JavaScript SDK in the browser for Embedded Components. |
Next steps
- B-Gateway migration guide - Step-by-step migration to Embedded Components (Hosted Checkout as an alternative)
- Stored cards & recurring - Move your saved cards after your one-off payments are live
- Migration overview - All migration paths and guides
- Testing - Test cards and integration checklist
- API Reference - Full API endpoint documentation