#Zeel Darji - checkout
1 messages · Page 1 of 1 (latest)
Hi! You can add multiple items to a Checkout Session, and this will create one PaymentIntent. Then you can refund the PaymentIntent for the full amount or for a lower amount.
@frosty kite , Do I need to add multiple items in line_items or in payment_intent_data?
Multiple items in line_items https://stripe.com/docs/api/checkout/sessions/create?lang=curl#create_checkout_session-line_items
Thanks @frosty kite .
One more thing @frosty kite , We are having multiparty payments. application_fee_amount will deduct from customer/connect or platform owner?
When using application_fee_amount, the fee is what the platform keeps, and the remaining amount is for the connected account.
Suppose payment is of $20. The application fee is $2 and $18 is credited to the connected account.
At the refund time deduction will be the same as above?
$2 will cut from platform owner & $18 wil cut from connected account.
right?
Yes you can do that, but the Stripe fee won't be refunded.
Are you using Direct Charges or Destination Charges?
const checkoutSession = await stripeObject().checkout.sessions.create({
payment_method_types: paymentMethodTypes,
success_url: paymentSuccessUrl,
cancel_url: paymentCancelUrl,
mode: 'payment',
customer: stripeCustomerId ?? undefined,
metadata: { connectId, customerId, sessionId },
payment_intent_data: {
metadata: { connectId, customerId, sessionId },
application_fee_amount: commission,
setup_future_usage: "on_session",
on_behalf_of: .stripeAccountId,
transfer_data: {
destination: stripeAccountId,
},
receipt_email: email,
},
allow_promotion_codes: true,
line_items: [{
name,
amount,
currency,
description,
quantity: 1
},
],
});
That's a destination charge. You can learn more about how refunds work here: https://stripe.com/docs/connect/destination-charges#issuing-refunds
Destination charges @frosty kite