question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot checkout with coupons using Mollie payment since 1.9 (Mollie Orders API)

See original GitHub issue

Describe the bug The new Mollie plugin introduced in Vendure 1.9 cannot create payment intents if a coupon is applied due to a VAT mismatch.

@martijnvdbrug

To Reproduce Steps to reproduce the behavior:

  1. Use the Mollie 1.9 plugin
  2. Apply a coupon code to the order, e.g. 50%
  3. Attempt to create a Mollie payment intent using the corresponding mutation
  4. Creation will fail as the Orders API expects a different VAT than what is supplied

Expected behavior Payment intent creation should work fine and applied coupons should be included the way Mollie expects them to: https://docs.mollie.com/orders/handling-discounts#discounts-and-vouchers

Environment (please complete the following information):

  • @vendure/core version: 1.9 and up
  • NodeJS 16
  • Database (mysql/postgres etc): postgres

Additional context Example server output:

error 12/17/22, 11:45 PM - [Vendure Server] Order line 1 is invalid. VAT amount is off. Expected VAT amount to be €1.76 (€11.00 × (19.00% / 119.00%)), got €3.51
ApiError: Order line 1 is invalid. VAT amount is off. Expected VAT amount to be €1.76 (€11.00 × (19.00% / 119.00%)), got €3.51
    at Function.createFromResponse (/home/node/app/node_modules/@mollie/api-client/dist/mollie.cjs.js:355:12)
    at throwApiError (/home/node/app/node_modules/@mollie/api-client/dist/mollie.cjs.js:754:22)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)```

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
michaelbromleycommented, Dec 22, 2022

@martijnvdbrug yeah, these rounding & tax issues are really horrible to deal with!

I think your solution is reasonable. Are there any implications to having a discrepancy in the unit price between Vendure and Mollie? E.g. when creating a refund for part of an order line (e.g. refunding 1 out of 3 of ProductA), does Mollie expect the unit price of a refunded line to be specified?

1reaction
martijnvdbrugcommented, Dec 18, 2022

@michaelbromley you can assign this to me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling discounts — API documentation — Mollie
Using the Orders API you can pass the full details of your customers' orders to Mollie. Of course, in some cases you might...
Read more >
Mollie Payment in cobination with discount voucher error
Several people reported an error when checking out and using a voucher with a discount code. The mollie software returns an error:.
Read more >
Issues · vendure-ecommerce/vendure - GitHub
programmatically creates a single fulfillment for multiple orders will ... Cannot checkout with coupons using Mollie payment since 1.9 (Mollie Orders API) ...
Read more >
Connecting with Mollie - BigCommerce Support
Using a single Mollie account, you can quickly start accepting payments through all the major global and local payment methods, allowing you to...
Read more >
Mollie payment gateway help & documentation - Event Espresso
Installation. This payment gateway is a plugin for WordPress and can be installed through your WP dashboard (WP-admin). Download the latest version of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found