Duplicate Snippet
Embed Snippet on Your Site
Retrieve Card Details from Stripe Checkout One-Time Payments
This snippet ensures that the last four digits and card brand are available in payment confirmations for one-time Stripe Checkout payments. Since Stripe doesn't save the payment method to the customer in these cases (unlike subscriptions), the code retrieves the PaymentIntent directly via the Stripe API to access the card details.
Code Preview
php
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Comments