#nad_api
1 messages ¡ Page 1 of 1 (latest)
đ 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.
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
The mandate is available on the Setup Intent object, not Payment Method object: https://docs.stripe.com/api/setup_intents/object#setup_intent_object-mandate
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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
Yes! Alternatively, you can listen to setup_intent.succeeded event that the mandate will be available in the event: https://dashboard.stripe.com/test/events/evt_1P3UmxEsfXIpkIMPyOW7oiSc
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.