#samiya_code
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/1346750367861309441
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there, can you tell me where do you want to attach the metadata? On the customer or the payment method?
On the subscription metadata. I am first creating a setup intent and then using a webhook creating subscription having same metadata
function createIntent($stripe, $customer, $data) {
$intent = $stripe->setupIntents->create(
[
'customer' => $customer->id,
'automatic_payment_methods' => ['enabled' => true],
'usage' => 'off_session',
'metadata' => [
'from' => 'paymentElement',
'passbackconversiontrackingid' => $data['rtid'],
'vertical' => $data['vertical'],
'subvertical' => $data['subvertical'],
'ABTest' => $data['ABTest'],
'experiment' => $data['experiment'],
'alternative' => $data['alternative'],
]
]
);
echo json_encode(array(
'type' => 'setup',
'clientSecret' => $intent->client_secret)
);
}
Or maybe you can tell me how and when your application uses this metadata?
When a user lands on the landing page some url parametrs are appending and I am storing that in metadata but now my client has asked to add metadata for virtual cards
Ok, and how and when your application uses this metadata about virtual card?
I am not sure how to use it. The client has raised this question: Create a Meta data in stripe to flag Card_Type:: = ‘Virtual_Card’
I'd recommend reaching out to your client and clarify the requirement.
Can you help me with how to check if the card type is virtual?
Are you having trouble setting the metadata? Or getting the information about the card?
I can fix the metadata issue once I get to know how is physical card and virtual card differentiated in stripe like if there is a different property is response for virtual cards on the basis of which I can I add meta data?
So, to clarify, you're facing issuing getting the information about the card type, right?
On the PaymentMethod object you can find all the information about the card. I don't think you get information about whether this is a virual card or not: https://docs.stripe.com/api/payment_methods/object#payment_method_object-card
Yes this is the issue I dont know how to find the card type
So is there any way where I can find the card type of a payment? I cannot find anything regarding card type in the above doc
As I mentioned, I don't think this information is available.