Skip to navigation

Hosted Payments

Hosted payments are the fastest way to launch with Mint. Mint owns the buyer checkout page; your server creates the payment and sends the buyer there.

Instead of embedding the React SDK, you create a payment on your backend and send the buyer to the payment_url returned by Mint.

How it works

  1. Your backend creates a payment with Mint.
  2. Mint returns a payment object. When hosted payments are configured, it includes payment_url.
  3. Your app redirects the buyer to payment_url.
  4. Mint returns the buyer to your optional return_url once the payment settles.
  5. Your server fulfils the order after a verified payment.paid webhook.

Redirect the buyer

After your backend creates a payment, send the URL to the browser and redirect there. Never expose your Mint secret key while doing this.

const response = await fetch('/api/payments', { method: 'POST' });
const { data: payment } = await response.json();
if (!payment.payment_url) {
throw new Error('Hosted payments are not configured for this checkout');
}
window.location.assign(payment.payment_url);

Return to your app

Pass an absolute HTTPS return_url when you create the payment if you want Mint to send the buyer back to a specific page after settlement. Use it for buyer experience only: redirects can be interrupted or revisited, so they are not proof of payment.

Use Webhooks to update your order, deliver goods, or unlock access.

Pending settlement and refunds

For fee-protected payments, Mint may receive the buyer’s funds before it can complete settlement. The hosted page shows the pending state while Mint retries; the buyer should not send another payment.

If the settlement window ends, the page shows refund recovery instead. A refund can remain pending until its eligibility time and balance are checked. An available refund offers a claim action; it is not a completed payment or an already-paid refund.

Your backend receives payment.deferred, payment.refund_pending, and payment.refundable for these transitions. The payment API also exposes status_message, refundable_at, and refund_claim_url. Use current payment data when reopening recovery, and fulfil only after payment.paid.