#willsantiago.

1 messages · Page 1 of 1 (latest)

plucky dragonBOT
#

Hello! 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.

hushed linden
#

Hello

#

You want to use Webhooks here

robust wing
#

Yes,
I'm already using a WebHook, I'll explain my question better

#

For example, my app works with buying coins, when I buy a package of coins by card I am immediately notified if it was successful, if so, the function to add coins for the user is called and adds the coins for them. However, for bank slips it doesn't work, because it can take up to 3 days for the payment to appear on the stripe, with my webhook, can I simply change these functions, so that every time there is a payment with success status there it adds the coins? You won't have any errors in the future by checking this directly from webhooks

hushed linden
#

Your app logic controls when you add coins.

#

So yes.

robust wing
#

I'm checking realtime webhook with socketio

hushed linden
#

You would wait to receive a payment_intent.succeeded Event

#

When that happens, you know the payment is successful and you can then trigger you logic to add coins.

robust wing
#

I understand. Because I had two logics, one that checked whether the card status after payment was successful, which doesn't use webhooks and the other one that uses webhooks, I'll just keep the one with webhooks then. I thought it wouldn't work very well for that, but it looks like it. Thank you very much

#

One last thing

#

This array that shows in webhooks, can I modify the part that shows the payment type? Because the card and the bank slip are showing, can I leave only the bank slip if it is paid with a bank slip and only the card if it is paid with a card or can I not change this?

#

"payment_method_types": [
"card",
"boleto"
],
"processing": null,
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
},
"livemode": false,
"pending_webhooks": 1,
"request": {
"id": null,
"idempotency_key": null
},
"type": "payment_intent.succeeded"
}

hushed linden
#

No you can't change that if you are offering both options at checkout time

#

If you want, you could update the PaymentIntent to set metadata on it after confirmation happens.

#

Then you can set your own arbitrary string to indicate what happened

#

And that will be carried through in the Webhook as well

robust wing
#

I understand. See you later. Thank you very much