#ratan_card-product-codes
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/1460290463058890853
📝 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.
Hello, can you point me to the specific field you are looking at that is not populated? I'm not aware of "product code" for cards, are you talking about funding type (credit vs debit vs prepaid)?
Hello @fickle pelican
https://docs.stripe.com/card-product-codes#product-codes
this field
Ah gotcha, it looks like that field is specific to taking Terminal payments. Are you taking Terminal payments? If so, can you send me the ID of a payment or payment method that is missing that product code?
on sandbox I'm not getting this:
here is the response
<PaymentMethod payment_method id=pm_1SonjFLriIQWhD0DBRMcd8BQ at 0x1269245e0> JSON: {
"allow_redisplay": "unspecified",
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": null,
"phone": null,
"tax_id": null
},
"card": {
"brand": "visa",
"checks": {
"address_line1_check": null,
"address_postal_code_check": null,
"cvc_check": "unchecked"
},
"country": "US",
"display_brand": "visa",
"exp_month": 1,
"exp_year": 2027,
"fingerprint": "plYhRaQh4DefgGJ3",
"funding": "credit",
"generated_from": null,
"last4": "0072",
"networks": {
"available": [
"visa"
],
"preferred": null
},
"regulated_status": "unregulated",
"three_d_secure_usage": {
"supported": true
},
"wallet": null
},
"created": 1768234349,
"customer": null,
"customer_account": null,
"id": "pm_1SonjFLriIQWhD0DBRMcd8BQ",
"livemode": false,
"metadata": {},
"object": "payment_method",
"type": "card"
}
Ah there we go, that isn't a Terminal payment (a Terminal is a physical card reader that a customer puts their card into in person to make a payment)
Checking whether non-Terminal payments support this field
okay
Ah it looks like there are only a couple of test cards that populate this field:
https://docs.stripe.com/card-product-codes#testing
Can you try again with one of those numbers? When I do that I can see that field
let me check
Checked all cards; not getting product codes in these cards as well:
Here is the response:
<PaymentMethod payment_method id=pm_1SooCGLriIQWhD0DRA9rsgdQ at 0x126d2e900> JSON: { "allow_redisplay": "unspecified", "billing_details": { "address": { "city": null, "country": null, "line1": null, "line2": null, "postal_code": null, "state": null }, "email": null, "name": null, "phone": null, "tax_id": null }, "card": { "brand": "mastercard", "checks": { "address_line1_check": null, "address_postal_code_check": null, "cvc_check": "unchecked" }, "country": "AU", "display_brand": "mastercard", "exp_month": 1, "exp_year": 2027, "fingerprint": "LsCDwJQ2tnpAIx2d", "funding": "credit", "generated_from": null, "last4": "0015", "networks": { "available": [ "mastercard" ], "preferred": null }, "regulated_status": "unregulated", "three_d_secure_usage": { "supported": true }, "wallet": null }, "created": 1768236148, "customer": null, "customer_account": null, "id": "pm_1SooCGLriIQWhD0DRA9rsgdQ", "livemode": false, "metadata": {}, "object": "payment_method", "type": "card" }
And get we get product codes in all the card payment method api's response ??
It looks like you just created that payment directly, but the doc you linked to says that that is not expected to work:
After successfully confirming a PaymentIntent, the brand_product field also includes the product code in the payment_method_details for the corresponding charge in the API response for card_present payments (using Terminal).
The brand_product field might be null if the product code hasn’t been collected yet (for example, when creating a card) or the product codes for the particular card network aren’t supported. We currently support Visa and Mastercard product codes only.
If you confirm a payment intent with that card, the field should start to show up
not getting even after method confirmation:
Hi 👋
I'm taking over as my colleague needed to go. I think there has been some confusion. The brand_product property only exists on the card_present property on the Charge object.
Are you collecting cards using a Stripe terminal?
No, Using stripe payment method API's
The payment method does not expose this property. The doc you linked to clearly mentions is is on the card_present property of the Charge object. This will only be populated once you confirm a payment intent with a card collected using a STripe terminal
what should I do to get this field in payment method api's ?
You can't
It doesn't exist there
You can review the Payment Method's card property to see what data is available
You can get brand and display_brand but not product cde
There may be a feature you can request that would give you access to this data but you would need to write in to Support here https://support.stripe.com/contact. I can't help with that