Closed mdwt closed 3 years ago
Hi,
I'm getting this error when trying to create a payment with the API:
Error: Response for preflight has invalid HTTP status code 405.
I'm using the example code as-is with my test API key
Node v12.16.3 "@mollie/api-client": "^3.4.0",
const mollieClient = createMollieClient({apiKey: 'test_whKhP4Kp2pyGaCMgtQexncbcc4decC'}); try { const payment: Payment = await mollieClient.payments.create({ amount: { currency: 'EUR', value: '10.00', }, description: 'My first payment', redirectUrl: 'https://webshop.example.org/order/12345/', webhookUrl: 'https://webshop.example.org/payments/webhook/', metadata: { order_id: '12345', }, }); console.log(payment); } catch (error) { console.warn(error); }
Hi Meiring,
This sounds like your traffic might be routed somehow. On what machine are you testing this? Is this your local machine, or a server?
Hi,
I'm getting this error when trying to create a payment with the API:
Error: Response for preflight has invalid HTTP status code 405.
I'm using the example code as-is with my test API key
Node v12.16.3 "@mollie/api-client": "^3.4.0",