#0xTypedef
1 messages · Page 1 of 1 (latest)
const session = await ctx.stripe.checkout.sessions.create(
{
mode: "payment",
payment_method_types: ["card"],
line_items: [
{
price_data: {
unit_amount: priceAmount * 100,
currency: "USD",
},
quantity: 1,
},
],
metadata: {
stripeId: user.stripeId,
},
payment_intent_data: { application_fee_amount: 10 },
success_url: `${input.callbackUrl}?session={CHECKOUT_SESSION_ID}`,
cancel_url: input.callbackUrl,
},
{
stripeAccount: user.stripeId,
},
);
Hi there, as the error message suggest, you need to specify a product or product_data inside the price_data hash
i cant just set the price amount alone?
also can I get an express account's payout value via api?
What do you mean by payout value? do you mean account's balance? https://stripe.com/docs/api/balance#balance
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I don't know what you mean by payout value. If you are looking for API to list payouts, here it's https://stripe.com/docs/api/payouts/list#list_payouts
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
my users have this dashboard
i wanna retrieve total earnings
mb ithought it was called payouts
That's balance
Sure, you can use this API to retrieve balance (https://stripe.com/docs/api/balance/balance_retrieve#retrieve_balance)
Also remember to specify a stripe_account in the request.
By specifying a stripe_account, you are telling Stripe that you want to make an API call on behalf of a connected account. You can refer to this doc to learn more about making API request for connected account (https://stripe.com/docs/connect/authentication)
aigh stripe_account field