#rock_webhooks

1 messages · Page 1 of 1 (latest)

supple furnaceBOT
#

👋 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/1402191258511872000

📝 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.

warm lily
#

We have two cards currently that we basically need.

1- primary or defualt
2- Secondary or Backup.

Primary is easy to locate as this is the default payment method, but for the backup-card we just add it and charge it at times of need. There can be more cards from the user attached but we dont use them.

foggy gulch
warm lily
#

But in certain cases, stripe doc says when the card number is updated then the fingerprint is also updated.

Check the attached ss.

foggy gulch
#

ah yes, the fingerprint follows the card number. Let me check if the event returns the previous attribute so you can look up the previous fingerprint, if it changes

warm lily
#

Yes please

foggy gulch
#

thanks for waiting, the payment_method.automatically_updated event does return the previous fingerprint if the card fingerprint changes

#

so at the end of the event body, there should be a parameter called previous_attributes: {} that will inform you what changed

warm lily
#

Can you share some dummy response if you have that can help me for writing my code.

I am unable to locate this previous_attributes.

Also can you tell about the other method? customer.source.updated If we receive something similar here

foggy gulch
#

i don't have a dummy response I can share. Could you share with me what event you're looking at? it would help if you can provide me the event ID

warm lily
foggy gulch
#

The previous_attribute parameter exist only in the event body

#

not on the payment method object itself

warm lily
#

oh okay

#

So the webhook event should contain this

foggy gulch
#

yes

supple furnaceBOT
warm lily
#

Is there a way to look out for that event then? How will the complete response event obj would look in this particular cases.

#

Also can you tell about the other method? customer.source.updated If we receive something similar here

foggy gulch
#

You can setup a webhook that listens for payment_method.automatically_updated and the event will return the payment method object with the updated details + previous_attributes: {} being appended at the bottom of the event body to tell you what changed

#

I'm not understanding your second question, is your Stripe account already receiving customer.source.updated and/or payment_method.automatically_updated events? If you don't mind, could you share with me your Stripe account ID so we can take a look? You can find your account id by logging in to https://dashboard.stripe.com/settings/account . It'll have the prefix acct_

tender marsh
#

hi! I'm taking over this thread. let me know if you have other questions.

warm lily
#

Ok, so for the 1st question, I can surely set this all up and test out once we recieve any such event, but since these events are triggered by stripe when any card is automatically updated and there is no way to do that on test mode.

I want to be a little sure before I set up the webhook for my application here, hence I wanted to have a look if we have any dummy event body here.

#

For the 2nd question, no we dont have these events set up yet, but we are going to set these up as stated in my main question posted.

I wanted to also understand that similar to payment_method.automatically_updated for payment methods, is customer.source.updated also contain previous_attributes entity?

Given that we have both legacy and new users and this can be affected.

#

Also I have a test account, not prod so not sure if that will anyhow help

tender marsh
#

Unfortunately we can't test that event in test mode, but I'll share that feedback with the product team.
in the meantime, the payment_method.automatically_updated will contain a payment_method in the payload, so you could trigged any event that has a payment_method in the payload to test this temporarely.

#

is customer.source.updated also contain previous_attributes entity?
yes, all *.updated events should contain a previous_attributes

warm lily
#

Ok greate thanks

#

One last question just to be more clear

tender marsh
warm lily
#

These two events will only come when cards are automatically upated by stripe and not manually by admins or any such cases

warm lily
tender marsh
#

perfect, thanks!

#

These two events will only come when cards are automatically upated by stripe and not manually by admins or any such cases
yes that's correct. if you update a card (like change its metadata), then you will receive a different event: payment_method.updated.