#wolfgupta_api
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/1346330477824442482
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
hello! If you want to generate just the PaymentMethod using the Stripe publishable key and Stripe Elements, it is possible. I suggest looking into what we call the deferred Intent flow - you can take a look at this guide, and follow it till the step that creates a PaymentMethod : https://docs.stripe.com/payments/finalize-payments-on-the-server-legacy
i don't know if you specifically want tok_, or pm_ objects are fine too
Hello there,
thanks for quick response. The third party asked for (tok_) that is generated using their publishable key.
okay, that's kinda unusual since tokens are really old and are considered as deprecated at this point.
if you want to create tokens, then I would suggest using the Card Element instead. Let me see if we still have the relevant docs for this
https://docs.corp.stripe.com/payments/card-element - this is an example for the Card Element, but you would use https://docs.stripe.com/js/tokens/create_token?type=cardElement when the customer presses the button on your site instead
Previously, our integration did not involve any payment processing on our side. The frontend simply generated a card token (tok_...) using the third-party’s Stripe publishable key via the Create Card Token API. This token was sent to the third-party processor, and they handled everything, including payments and customer management.
Now, we want to introduce a mechanism to save the card details (e.g., last4, expiry, and a reusable identifier like paymentMethodId) on our end, so we can securely reuse them for future payments. However, the challenge is that the third-party requires a tok_... token for every transaction, which must be generated using their publishable key.
We’re looking for guidance on how to securely store card details on our side and re-generate these tokens (tok_...) as needed for transactions, all while maintaining PCI compliance.
I understand, so using the Card Element, alongside with https://docs.stripe.com/js/tokens/create_token?type=cardElement like what I mentioned, would achieve what you want. You would still be PCI compliant (with SAQ A).
great