Craft Commerce
The Orboni gateway adds crypto to Craft Commerce’s checkout. The buyer chooses it as the payment method and pays on Orboni’s payment page, picking a coin and paying from any wallet or exchange. The money goes to the wallets you set in the dashboard, and the order is completed and paid once the payment is final — on the buyer’s return or by the webhook, whichever comes first.
It is a payment gateway for Craft CMS 5 with Commerce 5, tested end to end on Craft 5.12 with Commerce 5.7. It is free, and its source is open, under the MIT licence: orboni/craft-commerce-orboni on GitHub. Install it from the Plugin Store in your control panel (search for Orboni), or with Composer:
composer require orboni/craft-commerce-orboni
php craft plugin/install commerce-orboniSet it up
- 1In the Orboni dashboard, set the wallets you want to be paid to under Wallets, and copy a secret key under Developers → API keys — a test key (
sk_test_…) first. Put it in your.envasORBONI_SECRET_KEY. - 2In Craft, open Commerce → System Settings → Gateways, press New gateway and choose Orboni. Name it (say, “Crypto (USDT, USDC, BTC and more)”), and enter
$ORBONI_SECRET_KEYas the Secret key. Save. - 3The gateway now shows its Webhook address. In the Orboni dashboard, under Developers → Webhooks, add an endpoint at it with the
checkout.session.*events, put its signing secret (whsec_…) in.envasORBONI_WEBHOOK_SECRET, and enter$ORBONI_WEBHOOK_SECRETas the Webhook signing secret. Save. - 4Place an order with it, and on its payment page, signed in to the dashboard, press Simulate payment: the order is completed and paid. Then swap in your live key (
sk_live_…) and the live endpoint’s secret. The key decides test or live at Orboni.
ORBONI_SECRET_KEY=sk_test_…
ORBONI_WEBHOOK_SECRET=whsec_…Keep both values in environment variables: Craft writes gateway settings into the project config, which is usually committed to git. Your checkout templates need nothing special: Orboni is an off-site gateway, so the usual commerce/payments/pay form with the gateway selected sends the buyer to the payment page, and its redirect and cancelUrl say where the buyer lands afterwards.
How orders move
The gateway reads the payment back from Orboni before it records anything, so a webhook sent twice, late or out of order changes nothing. What happened is written in the order’s transactions.
| Payment | Orboni says | In Commerce |
|---|---|---|
| Paid in full | complete, paid | The order completed and paid, a transaction naming the coin and the session — on the buyer’s return or by the webhook, whichever comes first |
| On the chain, not final yet | processing | The order completed, unpaid; paid once final |
| Held for your review | held | The order completed, unpaid; accept it in the dashboard and it is paid |
| Part paid | partially_paid | Still a cart; the payment page asks the buyer for the rest |
| Back before paying | open, unpaid | Still a cart, the buyer back at checkout with a message; paying again opens the same page |
| Ran out unpaid | expired | Still a cart |
| Money that paid it left the chain | payment_reversed | A failed transaction saying not to ship until the dashboard shows it paid again |
A cart changed after its page opened gets a new page for the new total, and the old one is closed, so it can no longer be paid. Without the webhook a payment is still recorded once the buyer comes back; a buyer who pays and closes the tab needs it, so set it up all the same.
Good to know
- The currency: the order’s payment currency — US dollars, euros, pounds, yen or any other currency a checkout session takes (Currencies in the API reference). The payment page shows the total in it, and the buyer pays its worth in the coin they pick. The gateway is offered only in one of them.
- The least is worth $1.00. Below it Orboni refuses, and the buyer is told so and chooses another way to pay.
- Refunds: the money is in your wallet, so send it back from there, then refund the transaction in Commerce: it is recorded in Orboni, and nothing moves by itself.
- Several Craft sites can share one Orboni project: each adds its own endpoint and acts only on its own orders.
- Orboni’s errors are shown to the buyer as “Orboni: …” and written to Craft’s log under commerce-orboni; keys and secrets never are.
What the gateway sends
Each payment makes a checkout session through POST /v1/checkout/sessions, with an idempotency key of the site and the transaction, so a retry never makes a second one.
- amountinteger
- The order’s outstanding amount in its payment currency, in the currency’s smallest unit: cents, or whole yen.
- currencystring
- The order’s payment currency, in lower case: usd, eur, jpy…
- descriptionstring
- The order’s lines, as Commerce describes them, with their quantities; cut at 250 characters.
- detailsstring
- The order’s short number and your site’s name: “Order 571bb94 at Example Store”.
- client_reference_idstring
- Commerce’s id of the order: “42”.
- metadataobject
- craft_order_id, craft_order_number, craft_transaction_hash and craft_site — a key made from your Craft install’s own CRAFT_SECURITY_KEY, so two sites on one project never act on each other’s events.
- customer_emailstring
- The order’s email, where Orboni sends the receipt when your project sends receipts.
- localestring
- The order’s language, as en-US.
- success_url, cancel_urlstring
- Commerce’s own complete-payment address for the transaction, which reads the payment back; and the order’s cancel address.
No address, phone number or other buyer data is sent. A payment in the dashboard, an export or a webhook leads to its order by client_reference_id and the order number in its metadata, and an order to its payment by the session id on its transactions.
This page as Markdown, for a program or an AI assistant: /docs/craft-commerce.md. Something missing or unclear? Write to us from the dashboard’s Help & Support.