#mathers_webhooks

1 messages ยท Page 1 of 1 (latest)

hollow oasisBOT
#

๐Ÿ‘‹ 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.

mossy cipherBOT
#

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.

steel mauve
#

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?

quartz crystal
#

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

steel mauve
#

That is expected. In gerenal, the metadata is not transferred within two separate objects.

mossy cipherBOT
steel mauve
#

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'

quartz crystal
soft cave
#

๐Ÿ‘‹ Taking over this thread

quartz crystal
#

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?

soft cave
#

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?

quartz crystal
soft cave
#

The problem with this error was not due to whether the Payment Intent was succeeded.

#

ch_3P0cdVJApK0ZwDoK1SWc7EWG was charged with USD 22.00 and the transfer was on the full charge amount in this request

quartz crystal
#

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

soft cave
#

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

quartz crystal
#

awesome thank you