#Currency Conversion

1 messages ยท Page 1 of 1 (latest)

gentle token
#

Does mollie nodejs npm package handle currency conversion?

#

this is how i create the payment link

 const payment = await mollieClient.payments.create({
    method: PaymentMethod[paymentMethod.id],
    amount: {
      currency,
      value: `${hasDecimal(price) ? price : `${price}.00`}`,
    },
    customerId: userData.mollieCustomerId,
    sequenceType: SequenceType.oneoff,
    description: name,
    webhookUrl: config.testing
      ? mollie_test_WebhookURL
      : mollie_live_WebhookURL,
    redirectUrl: config.testing
      ? mollie_test_RedirectURL
      : mollie_live_RedirectURL,
    metadata: {
      product_name: name,
      order_identifier: generateProductID(),
      product_id: productId,
      customer_name: `${decodedToken.firstName} ${decodedToken.lastName}`,
      customer_email: decodedToken.email,
      pterodactyl_user_id: userData.pterodactylUserId,
      nest_id: `${nestId}`,
      egg: `${eggId}`,
      node: `${node}`,
      memory: `${memory}`,
      disk: `${disk}`,
      cpu: `${cpu}`,
    },
  });
  return {
    paymentLink: payment.getCheckoutUrl(),
    failed: false,
  };

lets say a customer clicks blik to pay and i have the currency by default in eur on my website

currently getting this error: The currency is not supported by this payment method

delicate sequoia
#

Hi there!
You tell us what currency we should charge in. In the end, if needed, we do conversion towards your balance currency.

So an example: If you create a USD payment, but your balance is in EUR, then we do conversion to EUR

#

currently getting this error: The currency is not supported by this payment method

Thats correct. Some methods do only support a specific currency.

gentle token
#

Thats correct. Some methods do only support a specific currency.

Ok, so to automatically change my currency from EUR to a supported currency, does the npm package have that feature?

delicate sequoia
#

No, we do not support that at all.

You are in the lead of the amount (and currency) you want to charge to your consumer. We do not change that ๐Ÿ™‚

tropic falcon
delicate sequoia
#

Yes, we do not support that ๐Ÿ™‚

tropic falcon
#

alrighty

#

maybe a cool suggestion

delicate sequoia
#

Always welcome to create a feature request! However, like I said: the merchant is in charge of what currency and amount we have to charge. Otherwise you get bookkeeping nightmares ๐Ÿ™‚

#

So I do not see it build in the near future

tropic falcon
#

alrighty