#mathers_webhooks
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/1227043132655407235
๐ 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.
- mathers_webhooks, 24 minutes ago, 13 messages
Hi, can you share the event id where you're not seeing the metadata? What event type are you listenting? I assume you've set the metadata on the PaymentIntent object, is that right?
evt_1P1I4ZJApK0ZwDoKiZIk4jRf
so with a normal webhook listing on an event type of PaymentIntent object i can get my meta data but for balance.available event type i cant get my metadata
so my ideal scenario or rather what i want to achieve is when a payment is successful e.g paymentIntent object i update my database and when the charge for this specific payment intent is successful and has reflected in the balance(hence balance.available object) i can make transfers
That is expected. In gerenal, the metadata is not transferred within two separate objects.
I think you're likely looking for this, https://docs.stripe.com/api/transfers/create#create_transfer-source_transaction. When you create the transfer, you can pass in the source transaction.
'You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available'
true
how can i get the charge id from the payment intent payment being successful
๐ Taking over this thread
After the payment intent is made successfully, payment_intent.succeeded will be sent. You will be able to find the Charge ID in latest_charge parameter: https://docs.stripe.com/api/payment_intents/object#payment_intent_object-latest_charge
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so on the paymentIntent object the status attribute is succeeded correct?
because i am ready using the source transaction
and i got this error (Status 400) (Request req_9l3w7EvrMf2jZC) Transfers using this transaction as a source must not exceed the source amount of $22.00. (There is already a transfer using this source, amounting to $22.00.)
if the paymentIntent status attribute works as expected i do not need to use a webhook correct?
so on the paymentIntent object the status attribute is succeeded correct?
Yes.
and i got this error (Status 400) (Request req_9l3w7EvrMf2jZC) Transfers using this transaction as a source must not exceed the source amount of $22.00. (There is already a transfer using this source, amounting to $22.00.)
This error meant that you have done a transfer with this charge previously, but you attempted to transfer again. Checking what the previous request was .
if the paymentIntent status attribute works as expected i do not need to use a webhook correct?
What are you trying to achieve here?
i am trying to make sure that if the transaction is successful using the webhook and checking paymentIntent Object i can then make my transfers and also not to stumble on the error above
The problem with this error was not due to whether the Payment Intent was succeeded.
In https://dashboard.stripe.com/logs/req_p610vN0tG0Fp1P, the transfer was succeeded with source_transaction: "ch_3P0cdVJApK0ZwDoK1SWc7EWG"
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
ch_3P0cdVJApK0ZwDoK1SWc7EWG was charged with USD 22.00 and the transfer was on the full charge amount in this request
However, your system attempted to transfer again in https://dashboard.stripe.com/logs/req_9l3w7EvrMf2jZC on the same ch_3P0cdVJApK0ZwDoK1SWc7EWG which the balance on this charge didn't have any fund at this point
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
ok i understand
final question
do you advise i should use the webhook and listen on payment intent status to listen and update my database or just use my payment intent returned from the redirect url after payment
Thanks for waiting! Discord is busy and will take time to reply
I'd recommend using both. After getting redirected to your URL, your system should retrieve the Payment Intent to get the latest status. For some reason that the customer's internet is disconnected, Webhook events can be used as a backup to get the latest status
awesome thank you