#ohdeedeeoh
1 messages · Page 1 of 1 (latest)
Hello ohdeedeeoh, we'll be with you shortly! 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.
• ohdeedeeoh, 1 hour ago, 3 messages
• ohdeedeeoh, 4 hours ago, 7 messages
• ohdeedeeoh, 4 hours ago, 16 messages
• oh-subscription-timestamps, 5 hours ago, 19 messages
• ohdeedeeoh, 22 hours ago, 12 messages
• ohdeedeeoh, 1 day ago, 2 messages
https://stripe.com/docs/connect/separate-charges-and-transfers I believe you should use separate charges and transfers for your use case
Yes that's the doc I'm referring to
https://stripe.com/docs/connect/separate-charges-and-transfers#collecting-fees
OK, can you share with me the invoice ID?
The payment intent to create a charge to prepare for payout pi_3O5Gx0DtqoNbg2qI0Z69JhY4
I don't see any request to confirm this payment. How did your customer pay?
The invoice paid from customer
in_1O5GwwDtqoNbg2qIFL1UTPbc
Along with its payment intent pi_3O5GwuDtqoNbg2qI0kKuAycN
This paymentIntent was paid pi_3O5GwuDtqoNbg2qI0kKuAycN, but not pi_3O5Gx0DtqoNbg2qI0Z69JhY4
You see a customer first paid 200, and then I the platform create a payment intent according to the doc to create a so called charge to perpare the transfer to different creators express account
Ah, I see the confusion now
Yes, pi_3O5Gx0DtqoNbg2qI0Z69JhY4 not paid is to create a so called charge to prepare the so called transfer to pay out creators according to the doc
Are you using checkout sessions
So I don't need to create a new payment intent?
Yes I am
const session = await stripe.checkout.sessions.create({
billing_address_collection: 'auto',
customer: cstmr.id,
line_items: [
{
price_data: {
currency: 'USD',
product: product.id,
// product_data: {
// name: product.name,
// },
...(mode === 'subscription' && {
recurring: {
interval,
interval_count: 1,
},
}),
unit_amount_decimal: amntInCent,
},
// For metered billing, do not pass quantity
quantity: 1,
},
],
...(mode === 'payment' && {
invoice_creation: {
enabled: true,
invoice_data: {
metadata: invoiceMetadata,
},
},
}),
...(mode === 'subscription' && {
subscription_data: {
metadata: subscriptionSessionMetadata,
},
}),
metadata: checkoutSessionMetadata,
mode,
success_url: `url,
cancel_url: `url`,
});
I'm using that to either subscription or one time payment
no you don't need to create a new paymentIntent
Okay, just using that customer paid payment intent to initiate the transfer? In the doc, it doesn't specify source, do I need to do that since it's already paid
And I could call the transfer_group anything I want, there's also an invoice property, do I need to link the invoice id associated with it?
transfer_group is only for payment_intent, and you can set when creating a checkout session https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-transfer_group
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yup, you can name transfer_group whatever you want
Got it, I should be really using the payment_intent.succeed instead of invoice.paid.
I just logged the payment_intent customer paid with, it doesn't specify the source do I need to add that to the payment intent?
is this payment_intent paid with a payment_method or source?
payment method from a checkout session
that explains why you don't see source on the payment_intent because it was paid using a payment_method
Got it, thank you, sorry too many questions, what's the different between payment intent and an invoice?
And I'm confused about the order, the webhook event tells me, payment intent finished before an invoice paid. shouldn't it be the other way around?
the sequence of webhook event arrivals is not guaranteed to follow the event created time.
So in subscription mode, stripe checkout would create a subscription, and that subscription will create an invoice for your customer to pay when they checkout.
In payment mode, stripe checkout create a payment_intent instead.
Makes sense, I just looked an one time payment, an intent was created and completed and then an invoice created with link to that intent and completed, shouldn't the intent wait invoice paid to mark it succeeded?
So I need to actually do the instant payout in invoice instead, since that's the last one, and get the intent associated with it, or I could just do instant payout right after the intent is marked succeeded?
https://stripe.com/docs/payouts/instant-payouts instant payouts is a separate topic.
I'm not talking about that
So what do you mean by "instant payout" ?
Nevermind the wording, please ignore
I just looked an one time payment, an intent was created and completed and then an invoice created with link to that intent and completed, shouldn't the intent wait invoice paid to mark it succeeded?
So I need to actually do the instant transfers in invoice instead, since that's the last one, and get the intent associated with it, or I could just do instant transfers right after the intent is marked succeeded?
I think you mean transfer to connected account?
Yes transfer, that's the term
Ok, then you should read https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability
I actually read that
So which part of the content you need more clarification?
It doesn't tell me when I should do the transfer, does the source the key to wait for the invoice finish, does it has to wait for it to funded onto the platform first?
By default, a transfer request fails when the amount exceeds the platform’s available account balance. You can instead validate the transfer amount against its associated charge by specifying that charge as the transfer’s source_transaction. In that case, the transfer request automatically succeeds but isn’t executed until the funds from that charge are available in the platform account.
I believe this part already answered your question.
So it's really up to you, you can wait for the funds to be available and then initiatie a transfer, or you can initiate a transfer when the payment succeeds
Got it, so it doesn't matter, when I do the transfer when intent succeeded or invoice succeeded? I see the one time payment for example, an intent was created and completed and then an invoice created with link to that intent and completed
when the payment succeeds
Does it mean the payment intent succeeds or the afterwards invoice paid?
In your case, payment_intent,succeeded and invoice paid happens at the same time so you can choose either one
The only thing is that the transfer will deduct your Stripe accont's balance, and transfer will fail if your account doesn't have enough balance, and that's where source_transaction param comes in which allows you to create a transfer regardless of your account available balance
Thank you for the explanation, the part I'm confused is payment_intent is happening at the same time as the invoice.
I have one last question, for my subscriptions and invoice created from checkout session, all the property with type date , the values of them are always the literally the epochtime , i.e. 1970 Tue, do you know what might been the issue, but the stripe web. dashboard display it correctly, when inpecting the json, they are still 19070 Tue
The Dashboard display the epoch timestamp in a human-readable format, but the time value is the same.
I'm not talking about the format, the value from dashboard and from json are different
https://dashboard.stripe.com/test/events/evt_1O5FRgDtqoNbg2qIistlDXaH
You see this subscription for example sub_1O5FRdDtqoNbg2qIYbE92gbn the created property is 1698272457, when you converted to Date object it's Tue Jan 20 1970 07:44:32 GMT-0800 (Pacific Standard Time) But when you go back to the UI, the created ans start date is actually correct
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.