#nad_api

1 messages ¡ Page 1 of 1 (latest)

crisp prismBOT
#

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

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

cunning abyss
#

im writing in nodejs

#

from my payment method attached webhook this is the sort of payload im receiving

Event | Metadata: {"0":{"id":"evt_1P3UmxEsfXIpkIMPVYjBC4aP","object":"event","api_version":"2023-10-16","cr
eated":1712631119,"data":{"object":{"id":"pm_1P3UmxEsfXIpkIMPzyIaodGD","object":"payment_method","au_becs_
debit":{"bsb_number":"000000","fingerprint":"qvUDG5Do7JTirMbm","last4":"3456"},"billing_details":{"address
":{"city":null,"country":null,"line1":null,"line2":null,"postal_code":null,"state":null},"email":"sally@gm
ail.com","name":"Sally Smith","phone":null},"created":1712631119,"customer":"cus_PnNzZYReauiQEj","livemode
":false,"metadata":{},"type":"au_becs_debit"}},"livemode":false,"pending_webhooks":0,"request":{"id":"req_
TFzzKE7YMFsSM0","idempotency_key":"0da8e201-db8c-4d7d-81df-28dd4c68e43d"},"type":"payment_method.attached"
},"level":"debug","message":"Event","timestamp":"2024-04-09T02:52:00.212Z"}
#

i basically, want to freeload on this event, and if the payment method type=au_becs_debit i also want to pull the mandate and store the mandate url in my db so customer can always access without me having to keep calling stripe api

urban heartBOT
olive badger
cunning abyss
#

oh ok, so i have to save the setup intent id in my db and when the payment method comes back i can pull the setup intent object and find the mandate data

#

cool thanks

olive badger
urban heartBOT
cunning abyss
#

ahh yes thats a much cleaner solution. but how can i link a payment method attached to a setup intent succeeded?

#

sorry if im asking too many questions

#

ahh nvm

#

i see it in the object. theres a key for payment method in. the setup intent succeeded