#ajay bhalke-card-last4
1 messages · Page 1 of 1 (latest)
Hey! If you're using Checkout you'll instead want to look at the Payment Method object: https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-last4
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
but this is for client side right?
I have already developed using session
so there no any chance get it?
Are you working with a particular object? The Checkout Session object?
Ok, great! You can expand the payment_intent field to retrieve the full Payment Intent (https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_intent), and then expand the payment_method object on the Payment Intent object (https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Are you using one of our libraries? I can share some sample code
my code looks like below
$session = $this->stripe->checkout->sessions->create([
'success_url' => $base_app_url.'/payment/receive/status?session_id={CHECKOUT_SESSION_ID}',
'cancel_url' => $base_app_url.'/subscription-cancel',
'line_items' => [
[
'price' => 'price_xxx',
'quantity' => 1,
],
],
'mode' => 'subscription',
]);
and please share code
It will be very helpful
You'll need to retrieve the Checkout Session object (with the ID) and expand a few fields:
stripe->checkout->sessions->retrieve('cs_test_xxx', [
'expand' => ['payment_intent.payment_method']
]);
Then the returned object will include the full Payment Method object used, which includes the last4 field: https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-last4
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
thank you
my checkout session dont show google pay and apple pay button
what can be issue?
settings are ON for both
Do you have an active card in either your Apple or Google wallet?
I have setup stripe fake card (4242424242424242) in chrome settings cards
I can see payment request button on client side using stripe.js
but I want it in checkout session
You need to manage them here: https://pay.google.com/
Also, you'll need to add a real card. We'll swap it for a dummy token when in test mode: https://stripe.com/docs/apple-pay#testing-apple-pay
only real cards works?
not stripe testing cards?
Yes, but as I said we don't actually use the real card data – we swap them out
ok thank you
Np!
I have added that file into our website main domain and subdomain for Apple Pay button
location /.well-known
and after that added domain in stripe too
but how can I know that its verified?
You don't need to add a Apple Pay domain if you're using Checkout
sure
but for client side button I am looking for
Ah, with the Payment Request Button?
yes
my Google Pay button is visible but not Apple Pay
I am not sure if I added it wrong in wallet or stripe not verified it
If you were able to add the domain in the Dashboard, it would be verified during that flow
oh thats great
thanks for all help
Np!