#marco-troisi-trilo_code
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1313466649038426152
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- marco-troisi-trilo_code, 3 days ago, 6 messages
Hi there!
Can you share the ID (req_xxx) of the failing API request?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
Thanks for sharing, checking...
When you create the Express Checkout Element, you need to pass the onBehalfOf
https://docs.stripe.com/js/elements_object/create_without_intent#stripe_elements_no_intent-options-onBehalfOf
I'm using the React version though. My elements object is created like this:
`import {,
useElements
} from "@stripe/react-stripe-js";
const elements = useElements();`
You can pass options with react too:
https://docs.stripe.com/elements/express-checkout-element/accept-a-payment?client=react#set-up-elements
You need to do something like this:
function App() {
const options = {
mode: 'payment',
amount: 1099,
currency: 'usd',
// Customizable with appearance API.
appearance: {/*...*/},
};
return (
<Elements stripe={stripePromise} options={options}>
<CheckoutPage />
</Elements>
);
};
so it should be passed as one of those options?
If I do that, I get a typescript error saying that there's no such property
I think you can ignore that Typescript error (for example using @ts-ignore)
hi! I'm taking over this thread. let me know if you have other questions