We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, is this options savePaymentMethodFor: 'customer' for tracking customers. Whit this option I get error on payment. If customer is created on createOrder API (https://merchant.revolut.com/api/orders) is available in customers endpoint ('https://merchant.revolut.com/api/1.0/customers')
this is code for checkout
`
RevolutCheckout(publicId, revolutEnv).then(function (instance) { instance.payWithPopup({ name: user.name, email: user.email, phone: user.phone, upsellBanner: false, savePaymentMethodFor: 'customer', shippingAddress: { countryCode: user.code, region: user.country, city: user.city, streetLine1: user.address, postcode: user.zip_code }, billingAddress: { countryCode: user.code, region: user.country, city: user.city, streetLine1: user.address, postcode: user.zip_code }, onSuccess() { setPaymentLoading(true); sendOrder(paymentIdVal); }, onError(message) { setCreateOrderLoading(false); handleOpenNotification("error", "Greška prilikom plaćanja!", ""); }, onCancel(){ setCreateOrderLoading(false); }, }); });
and this is code for create order
const customerObj = { full_name: name, email: email, phone: phone, }; const response = await fetch( `${urlRevolutApi}/orders`, { method: 'POST', headers: { Authorization: `Bearer ${REVOLUT_MERCHANT_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ amount, currency, merchant_order_ext_ref: orderNo, customer: customerObject, }), } );
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, is this options savePaymentMethodFor: 'customer' for tracking customers. Whit this option I get error on payment. If customer is created on createOrder API (https://merchant.revolut.com/api/orders) is available in customers endpoint ('https://merchant.revolut.com/api/1.0/customers')
this is code for checkout
`
`
and this is code for create order
`
`
The text was updated successfully, but these errors were encountered: