to select ↑↓ to navigate
ERPNext

ERPNext

Open in ChatGPT
Ask ChatGPT about this page
Open in Claude
Ask Claude about this page

Receiving Payments

Receiving Payments

Three primary ways customers pay you via Mollie. Each is suited to a different scenario.

A. Payment Request on an emailed invoice

The most common pattern for B2B. You email a Sales Invoice; the email includes a payment link; the customer clicks to pay.

  1. Open the Sales Invoice → click Create Payment Request.

  2. ERPNext creates a Payment Request linked to the Sales Invoice.

  3. Click Get Payment URL on the Payment Request. ERPNext returns a URL like:

    https://<your-site>/api/method/mollie_integration.mollie.api.pay?doctype=Payment Request&docname=PR-00001

  4. Use Email from the Payment Request form (or paste the URL into any email / message). The link is persistent — it doesn't expire, doesn't get stale, and always reflects the current outstanding amount.

  5. When the customer clicks, our pay endpoint creates the Mollie payment on the fly using the invoice's current outstanding amount, then redirects them to Mollie's checkout.

  6. After payment, Mollie webhooks our endpoint; we create the Payment Entry and mark the invoice paid.

Why this is the default mode. Customers ignore emails for weeks sometimes. With Create on Click, the URL still works two months later — the payment is created at click time. Compare Create Immediately mode below.

B. QR code on a printed invoice

Same flow as A, but the URL is embedded as a QR code on the printed invoice.

  1. On the Sales Invoice, look for the QR-code section in the print format (Mollie integration adds a print-format snippet you can include).
  2. Print and send the paper invoice; the QR code goes on it.
  3. Customer scans, lands on the Mollie checkout via the same pay endpoint.

Useful for B2C in industries where paper invoices are still common (legal services, healthcare, some retail).

C. Web Shop checkout (immediate payment)

For ERPNext Web Shop, customers want to pay immediately at checkout, not after an email round-trip. Set Payment URL Type to Create Immediately in Mollie Settings:

  1. Customer fills the cart and clicks Checkout.
  2. ERPNext creates the Sales Order + Payment Request.
  3. The integration calls Mollie's API right away to create a payment.
  4. Mollie returns a checkout URL like https://checkout.mollie.com/pay/xxx.
  5. Customer is redirected immediately.
  6. After payment, the webhook arrives and the Sales Order / Sales Invoice transitions to Paid.

Trade-off: the Mollie checkout URL expires after a short window (typically a few hours). For cart checkout that's fine — customers pay right away. For emailed invoices, use Create on Click (mode A).

How the Payment Entry gets created

Regardless of which entry mode you use, the end state is the same:

  1. Customer completes Mollie checkout.
  2. Mollie POSTs to your webhook endpoint with the payment status.
  3. The integration validates the webhook signature.
  4. On paid status, the integration creates an ERPNext Payment Entry referencing the Sales Invoice (or Sales Order → Sales Invoice → Payment Entry chain).
  5. The Sales Invoice's outstanding amount updates; status moves to Paid once fully covered.

You don't manually create the Payment Entry. The integration does it on receipt of a valid webhook.

What you'll see in the Mollie dashboard

Every payment in your Mollie dashboard maps to one ERPNext Payment Entry via the Mollie payment ID (tr_xxxxx). The ID is stored on the Payment Entry's custom field, so you can pivot from either side:

  • From ERPNext — open the Payment Entry → see Mollie ID → search it in the Mollie dashboard for the full payment-method details.
  • From Mollie — copy the payment ID → search Payment Entry by ID → see the Sales Invoice it paid.

When the webhook doesn't arrive

The most common production issue. Causes:

  • Webhook URL unreachable. Mollie can't POST to your site — usually a firewall / SSL issue. Mollie's dashboard shows webhook delivery attempts under Developers → Logs.
  • Webhook signature mismatch. Almost always means the Webhook Secret in Mollie Settings doesn't match what Mollie has. Re-save Mollie Settings to regenerate, then update the URL in Mollie's dashboard.
  • ERPNext error during webhook handling. Check Integration Request List for the webhook receipt — there's usually a clear traceback.

Recovery: Mollie retries failed webhooks for up to 24 hours. If the issue is fixed within that window, the payment auto-reconciles. After 24 hours, you'll need to manually create the Payment Entry referencing the Mollie payment ID.

Last updated 3 days ago
Was this helpful?
Thanks!