#willsantiago.
1 messages · Page 1 of 1 (latest)
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.
- willsantiago., 3 days ago, 5 messages
- willsantiago., 3 days ago, 3 messages
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
I'm checking realtime webhook with socketio
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.
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"
}
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
I understand. See you later. Thank you very much