API reference

Tutor LMS

The Orboni for Tutor LMS plugin adds “Crypto” to Tutor LMS’s own checkout, with no code. The student presses Pay now, picks a coin on Orboni’s payment page and pays from any wallet or exchange. The money goes to the wallets you set in the dashboard, and once the payment is final on the chain the order is marked paid by itself and the student is enrolled.

It is a payment method for Tutor LMS’s own eCommerce, set up beside PayPal under Payment Methods, and works with the free Tutor LMS 3.0 or later; Pro is not needed. It needs WordPress 6.5 and PHP 7.4 or later. A site that sells its courses through WooCommerce or Easy Digital Downloads uses Orboni for WooCommerce or Orboni for Easy Digital Downloads instead. Its source is open, under the GPL like WordPress itself: orboni/orboni-for-tutor-lms on GitHub.

Set it up

  1. 1Download orboni-for-tutor-lms.zip. In WordPress, go to Plugins → Add New Plugin → Upload Plugin, choose the file, install it and activate it. Tutor LMS must be active, with Tutor LMS → Settings → Monetization set to Tutor LMS itself.
  2. 2In the Orboni dashboard, set the wallets you want to be paid to under Wallets, then copy a secret key under Developers → API keys — a test key (sk_test_…) first.
  3. 3In WordPress, open Tutor LMS → Settings → Payment Methods, open “Crypto (USDT, USDC, BTC and more)” and paste the key.
  4. 4Under Developers → Webhooks, add an endpoint at the Webhook URL the method shows, with its Copy button (https://your-site.com/wp-json/tutor/v1/ecommerce-webhook/orboni), with every event or at least the checkout.session.* ones, and paste its signing secret (whsec_…) into the method. Switch the method on and press Save Changes.
  5. 5Buy a course as a student, and on its payment page, signed in to the dashboard, press Simulate payment: the order turns Paid and the student is enrolled. Then swap in your live key and the live endpoint’s secret.

How orders move

The plugin reads the payment back from Orboni before it changes an order, and the order follows the payment as it is now — whether the webhook, the student’s return or a scheduled check comes first, twice or out of order.

PaymentOrboni saysThe order
Paid in fullcomplete, paidPaid: Tutor LMS completes the order and enrols the student
On the chain, not final yetprocessingPayment Pending, until it is final
Part paidpartially_paidPending, with how much came; the payment page asks the student for the rest
Held for your reviewheldPending, with the reason; accept it in the dashboard and the order is paid
Ran out with nothing paidexpired, unpaidUnpaid: the student can pay it again from their order history
Ran out part paidexpired, partially_paidPending, with what arrived: settle it with the student
Money that paid it left the chainpayment_reversedBack to Pending, the enrolment paused until the dashboard shows it paid again
More came after it was paidextra_receivedA line with the total; the order stays paid

A paid order is never taken back by anything else, and an order you cancelled is never paid by a late payment: a line says it arrived. Each change is written in the order’s history: the coin, the network, the amount and the session. Without a webhook the order still moves: the plugin reads the payment when the student comes back from the payment page, ten minutes after the page opens, and again after it runs out. A student who comes back before the payment is final is told it is on its way.

Good to know

  • Your site’s currency, as set in Tutor LMS: US dollars, euros, pounds, yen or any other currency a checkout session takes (Currencies in the API reference). The payment page shows the order’s total in it, and Orboni turns it into dollars at the rate of the day (the European Central Bank’s, or the market’s for a currency the ECB does not publish); the student pays that in the coin they pick. With a currency that is not on the list Crypto is not offered at checkout, and the payment settings say so.
  • The least is worth $1.00. A smaller order is refused when the student presses Pay now, with a sentence saying it is below the minimum for a crypto payment; in another currency than dollars Orboni checks the total’s worth.
  • A student who goes back and presses Pay again gets the same payment page while it has more than five minutes left, never a second session for the same order and amount. The payment page’s back link closes it and brings the student back to the checkout for that order, to pay again or another way.
  • An order that grew after the student was sent to pay is left Pending when the payment completes, not paid.
  • Refunds: the money is in your wallet, so send it back from there and record the refund in the dashboard. Then refund the order in Tutor LMS (Orders → the order → Refund), which can also take the enrolment away; the plugin writes in its history where the money goes back from.
  • Courses and bundles bought once: the method does not take Tutor LMS’s subscriptions.
  • Several sites can share one Orboni project: each adds its own endpoint and acts only on its own orders.
  • On a site with plain permalinks Tutor’s Webhook URL does not answer; the payment settings show the address to use instead.
  • Set “Debug log” to “Requests and webhooks too” to see every request in PHP’s error log (wp-content/debug.log with WP_DEBUG_LOG), in lines starting with “Orboni for Tutor LMS:”. Errors are logged either way; keys and signing secrets never are.

What the plugin sends

Each order makes a checkout session through POST /v1/checkout/sessions, with an idempotency key of the site, the order, the amount and its currency, and the try, so a retry never makes a second one.

amountinteger
The order’s total, tax included, in the currency’s smallest unit: cents, or whole yen.
currencystring
The site’s currency, in lower case: usd, eur, jpy…
descriptionstring
The courses’ titles, as “Watercolour basics, Figure drawing”, cut at 250 characters.
detailsstring
The order’s number and your site’s name: “Order #1042 at Northwind Academy”.
client_reference_idstring
The Tutor LMS order’s id.
metadataobject
tutor_order_id, and tutor_site — a short hash of the site’s address, so two sites on one project never act on each other’s events.
customer_emailstring
The student’s billing email, where Orboni sends the receipt when your project sends receipts.
localestring
The student’s language in WordPress.
success_url, cancel_urlstring
Addresses of your site with the order and a key of its own: the first reads the payment and goes on to Tutor’s order confirmation; the second closes the payment page and returns to the checkout for the order.

No address, phone number or other student data is sent. A paid order keeps the session’s id as its transaction id, so a payment in the dashboard, an export or a webhook leads to its order by client_reference_id, and the order to its payment by the transaction id.

This page as Markdown, for a program or an AI assistant: /docs/tutor-lms.md. Something missing or unclear? Write to us from the dashboard’s Help & Support.