<div id="integration-guide">

<div class="ig-section">
<div class="ig-section-header">
<div class="ig-section-icon" style="background:#eff6ff;color:#2563eb;"><i class="fas fa-map-signs"></i></div>
<h2>Migrating from B-Gateway</h2>
</div>
<p class="ig-section-desc">This page is for businesses and partners whose systems call <strong>B-Gateway</strong> 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 <a href="/partners/online-payments/migration/bgateway-checkout">B-Gateway migration guide</a>.</p>

```admonition
icon: fas fa-key
title: New credentials
content: B-Gateway authenticates every call with a username and password, and identifies the merchant by <code>Processor</code> and <code>MerchantID</code>. The new platform uses OAuth credentials per merchant store, issued to you through the <a href="/partners/online-payments/register-merchants">registration flow</a> — see <a href="/online-payments/authenticate">Authenticate</a>. If you hold B-Gateway credentials for many merchants, talk to your Teya partner contact about the approach.
```

<!-- Integration options -->
<div class="ig-subsection">
<h3>Choose your integration</h3>
<p>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.</p>

<div style="overflow-x:auto;">
<table class="ig-comparison">
<thead>
<tr><th></th><th>Hosted Checkout</th><th>Embedded Components</th><th>Direct API</th></tr>
</thead>
<tbody>
<tr><td><strong>Customer experience</strong></td><td>Redirected to a Teya payment page and back to your site</td><td>Stays on your page; Teya-hosted card fields sit inside your checkout</td><td>Your own card form</td></tr>
<tr><td><strong>Integration effort</strong></td><td>Lowest: one server call and a redirect</td><td>Medium: one server call plus a component on your page</td><td>High: you build the form, the 3D Secure challenge display and every call</td></tr>
<tr><td><strong>Card data on your systems</strong></td><td>None</td><td>None</td><td>Yes: PCI DSS (SAQ D) obligations stay with you</td></tr>
<tr><td><strong>3D Secure</strong></td><td>Handled for you</td><td>Handled for you</td><td>Run by Teya; you display the challenge. Results from your own MPI are not accepted</td></tr>
<tr><td><strong>Saving cards for subscriptions</strong></td><td>Yes: <code>save_payment_method</code> on the session</td><td>Yes: <code>save_payment_method</code> on the session</td><td>Yes: <code>store_payment_method</code> on the transaction</td></tr>
<tr><td><strong>When to choose it</strong></td><td>You want the least code, or your customers trust a payment-provider page</td><td>You want the checkout to stay on your site, with Apple Pay and currency conversion built in</td><td>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</td></tr>
</tbody>
</table>
</div>

<p>Charging a saved card later, without the customer present (subscriptions, instalments), always uses the direct API with a token: <code>POST /v3/transactions/online</code>. No card data is involved, so it needs no PCI evidence. See <a href="/partners/online-payments/saved-payments/charge">Charge a Saved Payment Method</a>.</p>
</div>

<!-- Mapping -->
<div class="ig-subsection">
<h3>What replaces what</h3>
<p>Operations and fields from the B-Gateway developer documentation, and where each one lives on the new platform.</p>

<h4>Payments and payment actions</h4>
<div style="overflow-x:auto;">
<table class="ig-comparison">
<thead>
<tr><th>B-Gateway</th><th>New platform</th><th>Notes</th></tr>
</thead>
<tbody>
<tr><td><strong>Authentication</strong>: username + password on every call; <code>Processor</code>, <code>MerchantID</code>, <code>TerminalID</code> (1 ecommerce, 2 ecommerce with 3D Secure, 3 recurring, 4 mail/telephone order) in the XML</td><td>OAuth <code>client_id</code> + <code>client_secret</code> per store, exchanged for a short-lived Bearer token; <code>store_id</code> in the request</td><td>See <a href="/online-payments/authenticate">Authenticate</a>. Cache the token for its <code>expires_in</code>.</td></tr>
<tr><td><code>getAuthorization</code>, <code>TransType</code> 1 (purchase), <code>AuthCode</code> empty</td><td>Checkout session <code>POST /v2/checkout/sessions</code>, <code>type: "SALE"</code>, then <a href="/partners/online-payments/hosted-checkout/get-started">Hosted Checkout</a> or the <a href="/partners/online-payments/embedded-components/checkout/get-started">Checkout component</a></td><td>The server sends only the intent: amount, currency, reference. No card number, expiry, CVC or 3D Secure values.</td></tr>
<tr><td><code>getAuthorization</code>, <code>TransType</code> 5 (pre-authorisation)</td><td>Checkout session with <code>type: "PRE_AUTHORISATION"</code></td><td>See <a href="/partners/online-payments/payment-actions">Payment Actions</a>.</td></tr>
<tr><td><code>getAuthorization</code>, <code>TransType</code> 1 with the <code>AuthCode</code> of a pre-authorisation (capture, incl. a lower amount)</td><td><code>POST /v1/transactions/{id}/capture</code> with <code>{"amount": n}</code></td><td>Any amount up to the authorised total, <strong>once</strong> per authorisation; the remainder is released.</td></tr>
<tr><td>Zero-amount <code>TransType</code> 5 to verify a card (recurring set-up)</td><td>Checkout session with <code>type: "ACCOUNT_VERIFICATION"</code>, <code>amount.value: 0</code> and <code>save_payment_method: true</code></td><td>Verifies and saves the card without charging it. Without <code>save_payment_method</code>, nothing is saved.</td></tr>
<tr><td><code>getAuthorization</code>, <code>TransType</code> 3 (refund), referencing the original <code>DateAndTime</code> + <code>RRN</code></td><td><code>POST /v3/refunds</code> with <code>transaction_id</code> and <code>amount</code>, or a refund from the Business Portal</td><td>Same rules: partial and multiple refunds, total ≤ original. The reference is the new-platform <code>transaction_id</code>, not a date and RRN.</td></tr>
<tr><td><code>getAuthorization</code>, <code>TransType</code> 4 (partial reversal, same day)</td><td>No direct equivalent</td><td>To charge less than you authorised, pre-authorise and capture the final amount. Otherwise, refund the difference.</td></tr>
<tr><td><code>cancelAuthorization</code></td><td><code>POST /v3/refunds</code> on the uncaptured payment</td><td>A refund before capture reverses the authorisation. There is no separate cancel and no "open batch" condition.</td></tr>
<tr><td><code>get3DSAuthentication</code>, or your own / a third-party MPI, then <code>CAVV</code>, <code>UCAF</code>, <code>XID</code>, <code>SecurityLevelInd</code> on the authorisation</td><td>Built into Hosted Checkout and the Embedded Components</td><td>Delete the whole 3D Secure flow: <code>MerchantReturnURL</code>, PaRes/CRes handling, the MPI connection. With the direct API, Teya returns a challenge for you to display.</td></tr>
<tr><td>Authorisation without 3D Secure values</td><td>Customer-present payments always go through 3D Secure</td><td>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.</td></tr>
<tr><td><code>ActionCode</code> (<code>000</code> = approved) and the gateway codes <code>904</code>, <code>909</code>, <code>953</code></td><td><code>payment_status</code> (<code>SUCCESS</code> / <code>FAILED</code>) on the session; <code>status</code> + <code>status_reason</code> on direct-API transactions; HTTP status codes for request errors</td><td>No action-code tables. Declines are shown in the checkout and the customer can retry.</td></tr>
<tr><td>Unknown result after a timeout: poll <code>getTransactionList</code></td><td>Retry with the same <code>Idempotency-Key</code>, or look the session up: <code>GET /v2/checkout/sessions/{session_id}</code></td><td>A retry with the same key can't create a second payment. The <code>payment.succeeded.v1</code> webhook confirms every successful payment.</td></tr>
<tr><td>Track1 / Track2 (card read on a device), <code>TerminalID</code> 4 (mail or telephone order), sales keyed into B-Online</td><td>Not part of online payments</td><td>Card-present, telephone and keyed payments are not covered by this migration. Talk to your Teya partner contact before migrating if you use them.</td></tr>
</tbody>
</table>
</div>

<h4>Stored cards and recurring payments</h4>
<div style="overflow-x:auto;">
<table class="ig-comparison">
<thead>
<tr><th>B-Gateway</th><th>New platform</th><th>Notes</th></tr>
</thead>
<tbody>
<tr><td><code>getVirtualCard</code>: card number in, virtual card number (16 digits, <code>9910…</code>) out</td><td><code>save_payment_method: true</code> on the checkout session; the token arrives in the <code>payment.succeeded.v1</code> webhook as <code>token_response.token_id</code></td><td>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 <a href="/partners/online-payments/saved-payments/overview">Card on File</a>.</td></tr>
<tr><td><code>getAuthorization</code> with a virtual card number, without the customer (subscriptions, instalments)</td><td><code>POST /v3/transactions/online</code> with <code>initiator: "MERCHANT"</code> and <code>payment_method.type: "TOKEN"</code> + <code>recurring_payment_type</code></td><td>No 3D Secure, immediate final result. See <a href="/partners/online-payments/saved-payments/charge">Charge a Saved Payment Method</a>.</td></tr>
<tr><td><code>TerminalID</code> 3 (recurring) / sending no CVC and no 3D Secure values</td><td><code>initiator</code> (<code>MERCHANT</code> / <code>CUSTOMER</code>) + <code>recurring_payment_type</code> (<code>RECURRING</code> / <code>INSTALLMENT</code> / <code>CARD_ON_FILE</code>)</td><td>You declare what kind of charge it is. The platform no longer infers it from missing fields.</td></tr>
<tr><td><code>lifecycleID</code> sent back with the virtual card number</td><td>Not sent</td><td>The platform keeps the card scheme's reference to the first payment against the token and attaches it to every later charge.</td></tr>
<tr><td>Virtual card numbers you already hold</td><td>Converted on first use: payment method <code>LEGACY_TOKEN</code> after Teya imports your stored cards</td><td>Customers never re-enter a card. Do this after your one-off payments are live. See <a href="/partners/online-payments/migration/stored-cards">Stored cards &amp; recurring</a>.</td></tr>
<tr><td>Card numbers you store on your own systems (never passed through <code>getVirtualCard</code>)</td><td>No import</td><td>Talk to your Teya partner contact before planning the move. Only values issued by the legacy platform can be converted.</td></tr>
</tbody>
</table>
</div>

<h4>Batches, reporting and other operations</h4>
<div style="overflow-x:auto;">
<table class="ig-comparison">
<thead>
<tr><th>B-Gateway</th><th>New platform</th><th>Notes</th></tr>
</thead>
<tbody>
<tr><td>Batches: <code>Batch</code> and <code>Transaction</code> numbers in every response; automatic close at midnight GMT; <code>newBatch</code> to close earlier</td><td>No batches</td><td>Settlement is automatic. Delete batch handling; key your records on <code>transaction_id</code>.</td></tr>
<tr><td>Batch authorisations and processing results (many transactions in one request)</td><td>No batches</td><td>Charge each saved card with its own <code>POST /v3/transactions/online</code> request. Contact Teya support if your volumes make this a concern.</td></tr>
<tr><td><code>getTransactionList</code></td><td>One payment: <code>GET /v2/checkout/sessions/{session_id}</code>. All payments: the Business Portal</td><td>Store the <code>transaction_id</code> from the webhook against each order.</td></tr>
<tr><td>Settlement list, batches and transactions in settlement, chargebacks; disputed and fraud transaction lists</td><td>The Business Portal</td><td>Settlement itself is unchanged: same merchant account, same payout timing and statements.</td></tr>
<tr><td>Other features: <code>sendDetailData</code> (invoice detail), passenger itinerary data, Dynamic Descriptors (<code>MerchantName</code>, <code>MerchantCity</code>, …)</td><td>Depends on your case</td><td>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 <code>line_items</code>.</td></tr>
<tr><td>Receipts (none on B-Gateway)</td><td><code>POST /v1/transactions/{id}/receipts</code></td><td>New: emails a Teya-generated receipt. See <a href="/partners/online-payments/payment-actions">Payment Actions</a>.</td></tr>
<tr><td>B-Online for refunds and cancellations</td><td>The Business Portal and the Teya app, for payments taken on the new platform</td><td>Payments taken on B-Gateway before you switch are refunded in B-Online, as today.</td></tr>
</tbody>
</table>
</div>

<h4>Fields and formats</h4>
<div style="overflow-x:auto;">
<table class="ig-comparison">
<thead>
<tr><th>B-Gateway</th><th>New platform</th><th>Notes</th></tr>
</thead>
<tbody>
<tr><td><code>TrAmount</code>: two implied decimals for every currency, <strong>including ISK</strong> (100 ISK = <code>10000</code>); <code>TrCurrencyExponent</code> on 3D Secure requests</td><td><code>amount.value</code>: an integer in minor units per ISO 4217. ISK has no subunit (100 ISK = <code>100</code>; €54.43 = <code>5443</code>)</td><td>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 <code>4990</code> on both).</td></tr>
<tr><td><code>TrCurrency</code>: ISO numeric (<code>352</code>, <code>978</code>)</td><td><code>amount.currency</code>: ISO alphabetic (<code>"ISK"</code>, <code>"EUR"</code>)</td><td>Lookup change.</td></tr>
<tr><td><code>RRN</code>: exactly 12 characters, your reference</td><td><code>merchant_reference</code> (free-form) + optional <code>metadata</code></td><td>Write the legacy RRN or order number into <code>metadata</code> during the transition if your back office keys on it.</td></tr>
<tr><td><code>DateAndTime</code></td><td>Not sent</td><td>Teya timestamps payments server-side.</td></tr>
<tr><td><code>PAN</code>, <code>ExpDate</code>, <code>CVC2</code></td><td>Not sent</td><td>Entered by the customer on the Teya page or in the Teya-hosted fields.</td></tr>
<tr><td><code>Version</code> (<code>1000</code>), XML request and response</td><td>JSON over HTTPS (REST)</td><td>There is no server-side SDK; plain HTTPS on the server, the JavaScript SDK in the browser for Embedded Components.</td></tr>
</tbody>
</table>
</div>
</div>

<!-- Next steps -->
<div class="ig-subsection">
<h3>Next steps</h3>
<ul>
<li><a href="/partners/online-payments/migration/bgateway-checkout">B-Gateway migration guide</a> - Step-by-step migration to Embedded Components (Hosted Checkout as an alternative)</li>
<li><a href="/partners/online-payments/migration/stored-cards">Stored cards &amp; recurring</a> - Move your saved cards after your one-off payments are live</li>
<li><a href="/partners/online-payments/migration/overview">Migration overview</a> - All migration paths and guides</li>
<li><a href="/partners/online-payments/testing">Testing</a> - Test cards and integration checklist</li>
<li><a href="/apis/online-payments/apis">API Reference</a> - Full API endpoint documentation</li>
</ul>
</div>

</div>
</div>
