Guides → Setup

Adobe Commerce / Magento

Adobe Commerce and Magento Open Source setup

Install the Open Border payment module on Adobe Commerce or Magento Open Source, configure it in the Admin panel, take a sandbox card payment through native checkout, and switch to live.

Written against
Private Composer release 0.1.2 · native Luma checkout
Who owns what
Magento owns quotes, orders, invoices, credit memos, stock, and customer email. Open Border owns payment, refund, tax quote, and entity state.

Step 1

Before you start

Check your store against the tested matrix before you install. The module is qualified against these combinations only, and CI runs each of them on every release.

Tested matrix
Commerce releasePHPCheckoutDatabase and search
Adobe Commerce / Magento Open Source 2.4.7-p108.2, 8.3Native LumaMariaDB 10.11, OpenSearch 2.19
Adobe Commerce / Magento Open Source 2.4.8-p58.3, 8.4Native LumaMariaDB 11.4, OpenSearch 3

You also need each of the following. Missing any one of them makes the payment method unavailable at checkout rather than failing later, which is deliberate.

  • An Open Border merchant account whose KYB review has been approved, so keys can be issued.
  • A store currency of USD, GBP, EUR, CAD, or AUD. The charge currency selects the Open Border legal entity that acquires the payment; the shipping destination independently drives duty and tax. Neither follows the other.
  • An Open Border HS Code on every product a shopper can buy. Checkout fails closed for a line item without one.
  • Magento cron running every minute. The module schedules its payment reconciliation sweep every five minutes, and that sweep is what stops a delayed or out-of-order callback from stranding an order.
  • HTTPS on the storefront, and a reverse proxy that preserves raw request bodies.
  • Shell access to run bin/magento and composer.

Step 2

Get your test keys

  1. 1 Open the Open Border dashboard on the sandbox rail Sign in and switch the dashboard to test mode.
  2. 2 Copy the secret key It starts with sk_test_. This key goes on your Magento server and nowhere else — never into browser code, source control, shell history, build logs, screenshots, or a support bundle.
  3. 3 Leave the webhook secret for later The whsec_ signing secret is issued when you create the webhook endpoint in the Connect webhooks step, and it is shown once. Create the endpoint after the module is installed so you can copy the exact callback URL the module reports.

Step 3

Install

The module is distributed as a versioned Composer artifact with a checksum. Verify the checksum before you install it — an archive whose checksum does not match the published .sha256 must not be installed.

Verify, register the artifact repository, install, and enable
sha256sum --check openborder-module-payment-0.1.2.zip.sha256

mkdir -p packages/openborder
cp openborder-module-payment-0.1.2.zip packages/openborder/
composer config repositories.openborder artifact "$(pwd)/packages/openborder"
composer require openborder/module-payment:0.1.2

bin/magento module:enable OpenBorder_Payment
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:clean
bin/magento module:status OpenBorder_Payment

The last command should report the module as enabled. On production, wrap composer require, setup:upgrade, DI compilation, and static-content deployment in your normal maintenance-mode and backup procedure.

Step 4

Configure

Go to Stores → Configuration → Sales → Payment Methods → Open Border. Leave the method disabled until keys, the callback, the tax policy, and product HS codes are all in place.

Admin fields
FieldWhat it doesSet it to
Enabled Offers Open Border as a payment method at checkout. No while you configure. Yes only after a sandbox payment has succeeded.
Sandbox mode Selects the rail. Sandbox is pinned to https://api-demo.openborderpayments.com; live is pinned to https://api.openborderpayments.com. Enabled (the default) while testing. The origin is not configurable — an Admin user cannot redirect payment traffic elsewhere.
Payment action Authorize and Capture takes the money at checkout. Authorize Only holds the funds for a later full capture or void decision. Authorize and Capture unless your fulfilment policy needs the later decision. Partial capture is rejected either way.
Secret key Authenticates every server-side Open Border call for the selected rail. Magento encrypts it and marks it sensitive, so app:config:dump will not export it. The sk_test_ key for sandbox, and a separate sk_live_ key for live. Never the same value.
Webhook secret Verifies the signature on each inbound callback for the selected rail. The whsec_ value from the matching rail’s webhook endpoint. Set it after the Connect webhooks step.
Tax quote policy Either request an Open Border quote for duty and tax, or require that Magento tax is zero and charge merchandise plus shipping only. The Open Border quote policy in almost every case. The zero-tax policy is only valid when Magento tax is intentionally zero — a cart carrying non-zero tax is rejected under it.
Open Border HS Code Per-product tariff classification, set on the product rather than in this settings screen. It is snapshotted onto the order line before payment. A valid HS code on every sellable product. Checkout fails closed without it.

For pipeline deployments, set the secrets from the command line instead of typing them into Admin. Each rail has its own pair, and they never cross.

Set the credentials as sensitive configuration
bin/magento config:sensitive:set payment/openborder/test_secret_key
bin/magento config:sensitive:set payment/openborder/test_webhook_secret
bin/magento config:sensitive:set payment/openborder/live_secret_key
bin/magento config:sensitive:set payment/openborder/live_webhook_secret

Step 5

Connect webhooks

Callbacks are how Magento learns about a payment outcome that arrives after checkout — a completed authentication, an asynchronous capture, a refund result. Create one endpoint per rail in the Open Border dashboard and subscribe each to the payment-intent and refund events.

Callback URLs — register the one matching each rail
https://store.example/openborder/webhook/index/rail/test
https://store.example/openborder/webhook/index/rail/live

Copy each endpoint’s one-time whsec_ signing secret into the matching rail’s webhook-secret field. Then confirm the delivery path can actually reach the module:

  • The callback verifies the raw request body against the OpenBorder-Webhook-Id, OpenBorder-Webhook-Timestamp, and OpenBorder-Webhook-Signature headers. A reverse proxy that rewrites the body or strips any of the three will cause every delivery to be rejected.
  • A five-minute replay window applies, so the server clock must be synchronised.
  • The event mode must match the endpoint rail. A live event delivered to the test endpoint is refused.
  • Delivery IDs are deduplicated atomically, so a duplicate delivery is safe and answers success without reprocessing.
  • Limit request bodies to 256 KiB at the edge as well as in PHP.

Step 6

Run a test payment

Enable the method with sandbox mode on, then run all three of these on the storefront. A single successful payment is not enough evidence to go live — the decline and authentication paths are where a misconfiguration actually shows up.

  1. 1 Successful payment Add a product that has an HS code, check out with card 4242 4242 4242 4242, any future expiry, and any CVC. The order is placed, the payment transaction closes, and Magento invoices it under the Authorize and Capture action.
  2. 2 Authentication challenge Repeat with card 4000 0027 6000 3184. The 3DS challenge appears; completing it lands on the order confirmation. Abandoning it must leave the order unplaced — a later checkout then supersedes the stale attempt rather than charging twice.
  3. 3 Decline Repeat with card 4000 0000 0000 0002. The shopper sees an actionable checkout error, no order is placed, and a deliberate retry with a different card starts a new attempt.
  4. 4 Callback delivery Send a test event from the dashboard and confirm a success response in the delivery log. Replay the same delivery and confirm it also succeeds without reprocessing.
  5. 5 Check the logs are clean Confirm the module’s log lines contain only event names, Magento identifiers, the rail, an HTTP status, and stable error codes — no API key, webhook secret, payment method, client secret, raw provider response, callback body, customer address, or card data.

Then reconcile against the Open Border dashboard: the payment intent there should show the same amount, currency, entity, and merchant reference as the Magento order. The reserved Magento increment ID is the merchant reference, and it is immutable.

What each Open Border state does to a Magento order
Open Border stateMagento behaviour
requires_actionThe quote stays active. No order is placed and nothing is marked paid until the shopper completes authentication and status is reconciled.
authorizedThe order is placed with an open authorization. A later full invoice capture or a void is its own idempotent operation.
succeeded / capturedThe payment transaction closes and Magento’s own capture and invoicing workflow takes over.
failedAn actionable checkout error. A new card may start a new attempt once the failed one is terminal.
canceledAn unpaid order is cancelled while Magento still permits cancellation.
unknown outcomeNo second charge is created. The attempt is preserved for same-key replay, callback delivery, cron reconciliation, or manual review.

Step 7

Go live

Going live is a separate configuration, not a switch on the sandbox one. Work through this list in order.

  1. 1 Issue live credentials Get an sk_live_ secret key from the dashboard in live mode, and create a live webhook endpoint at the /rail/live callback URL with its own whsec_ secret. Reusing a sandbox value is refused, not silently accepted.
  2. 2 Turn sandbox mode off The live API origin is pinned and not configurable. Identifiers created on the test rail stay stamped to it, so nothing you tested with becomes live data.
  3. 3 Confirm every sellable product has an HS code A missing code makes the method unavailable for that cart. Check the products you actually expect to sell, not just the one you tested with.
  4. 4 Confirm cron is running every minute Without it the five-minute reconciliation sweep never fires, and a delayed callback can leave an order unresolved with no repair path.
  5. 5 Confirm the store currency and payment action The currency must be one of the five supported, and the payment action must match your fulfilment policy. Partial capture stays rejected.
  6. 6 Take one small real payment and refund it Confirm the order, the invoice, the callback delivery, and the refund all behave as they did in sandbox before you open the method to shoppers.
  7. 7 Enable the method Only now set Enabled to yes on the live configuration. Watch the first live orders reconcile before advertising the payment method.

Step 8

Troubleshooting

Symptoms and what to do
SymptomWhat to do
The payment method does not appear at checkoutConfirm the module and the payment method are both enabled, the cart currency and country are supported, the selected rail’s keys carry the right prefix, and every product in the cart has an HS code.
The cart is rejected because of taxUse an Open Border quote whose total matches the Magento total exactly. Only use the zero-tax policy when Magento tax is genuinely zero.
Authentication never finishesConfirm the browser can reach the payment processor and that https://js.stripe.com/v3/ is not blocked by a content-security policy or an ad blocker. Never paste a client secret into a log or a support message.
The payment outcome is unknownDo not start a new attempt. Run Magento cron, check callback delivery, and let the existing attempt reconcile. A second attempt is how an unknown outcome becomes a double charge.
The payment captured but no order existsDo not retry the cart. Find the attempt flagged payment_order_missing, confirm the reserved order ID, and explicitly recover or refund that payment before clearing the quote. The module waits five minutes before raising this so a normal capture-before-order race can settle first.
Callbacks are rejectedVerify the exact rail-specific whsec_ value, that the raw body and all three Open Border headers survive your proxy, that the route is HTTPS, and that server time is synchronised.
A capture is rejectedOnly an authorized intent can be captured, and the invoice must be for the full authorized amount.
A refund stays pendingThat is correct until the signed refund callback records a terminal result. Leave the credit memo pending and verify that the refund events are being delivered.

Step 9

Upgrade and remove

To upgrade: verify the new artifact’s checksum, move the version through Composer, then rerun setup:upgrade, DI compilation, static-content deployment, and a cache clean. Never roll back across an undocumented schema boundary.

Disabling the payment method stops new checkouts but keeps reconciliation working. Disabling the whole module also stops its callback route and its cron, so only do that once every non-terminal payment attempt and refund has been resolved — otherwise an in-flight payment loses its repair path.

Remove the module while preserving Magento order and payment audit fields
bin/magento module:disable OpenBorder_Payment
composer remove openborder/module-payment
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:clean