#greenlane-otavio_webhooks
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/1296430529394118718
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Which field(s) specifically are you referencing?
OK, and you expect to find that field in the setup_intent.succeeded event?
Yes, in this event
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
at the event it returns to me
You'd need to expand the payment_method field from the event. It's not included in the event payload by default
but at the Java API it returns some informations:
"brand": "visa",
"checks": {
"address_line1_check": null,
"address_postal_code_check": null,
"cvc_check": "pass"
},
"country": "US",
"description": null,
"display_brand": "visa",
"exp_month": 10,
"exp_year": 2025,
"fingerprint": "5HEtFZvMGkYtkqh2",
"funding": "credit",
"generated_from": null,
"iin": null,
"issuer": null,
"last4": "4242",
"networks": {
"available": [
"visa"
],
"preferred": null
},
"three_d_secure_usage": {
"supported": true
},
"wallet": null
}
What API call is that from?
it cames from the Java SDK, let me check the method exacly, one second
fun getPaymentMethodById(paymentMethodId: String): PaymentMethod {
return try {
logger.info("Retrieving payment method with ID: $paymentMethodId")
val paymentMethod = PaymentMethod.retrieve(paymentMethodId)
logger.info("Payment method found: ${paymentMethod.id}")
paymentMethod
} catch (e: Exception) {
logger.error("Failed to retrieve payment method with ID: $paymentMethodId", e)
throw BaseException("Failed to retrieve payment method with ID: $paymentMethodId")
}
}
It cames from the: PaymentMethod.retrieve(paymentMethodId)
Yeah so you're retrieving the full Payment Method object. The object in the event is a Setup Intent, and those fields aren't included in that: https://docs.stripe.com/api/setup_intents/object
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So you need to make the API call to retrieve the issuer/card details
No, the code you just shared is the code you need
You'd need to call that inside your webhook hander that receives the setup_intent.* events. There'll be a payment_method field in that event payload you can use: https://docs.stripe.com/api/setup_intents/object#setup_intent_object-payment_method
Issuing is something completely different