#cashiersprit_docs
1 messages · Page 1 of 1 (latest)
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.
- cashiersprit_docs, 5 days ago, 5 messages
- cashiersprit_docs, 6 days ago, 53 messages
👋 Welcome to your new thread!
⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1252208927337086976
📝 Have more to share? Add details, code, screenshots, videos, etc. below.
Hi! the details are all easily available in the ConfirmationToken.
you new payflow
const intent = await stripe.paymentIntents.create({
confirm: true,
amount: 1099,
currency: 'usd',
// In the latest version of the API, specifying the `automatic_payment_methods` parameter is optional because Stripe enables its functionality by default.
automatic_payment_methods: {enabled: true},
confirmation_token: req.body.confirmationTokenId, // the ConfirmationToken ID sent by your client
});
it is too quick and we need to extract payment_method before confirm to get card's country, since in old way payment intent can get payment method, payment method has card country. now we cannot
as it says in the guide you linked, the optional step before step 5
Information about the customer’s payment details is available by looking at the ConfirmationToken you created.
the card country is in https://docs.stripe.com/api/confirmation_tokens/object#confirmation_token_object-payment_method_preview-card for example.
gosh, you are my hero!! it seems work, but I need to test my code. thank you so much!!
I have another issue. we want to do similiar thing for subscription by https://docs.stripe.com/payments/finalize-payments-on-the-server?platform=web&type=subscription#create-and-submit-payment
the code is great
const subscription = await stripe.subscriptions.create({
customer: customerId,
items: [{
price: priceId,
}],
payment_behavior: 'default_incomplete',
payment_settings: { save_default_payment_method: 'on_subscription' },
expand: ['latest_invoice.payment_intent']
});
// Confirm intent with collected payment method
const {status, clientSecret} = await stripe.paymentIntents.confirm(
subscription.latest_invoice.payment_intent.id,
{
confirmation_token: confirmationTokenId,
}
);
it immidiately confirm subscription.latest_invoice.payment_intent. however, how can we pass statement_descriptor and statement_descriptor_suffix ? which is not in confirm payment intent's api https://docs.stripe.com/api/payment_intents/confirm#confirm_payment_intent-payment_method ?
Build an integration where you render the Payment Element before you create a PaymentIntent or SetupIntent, then confirm the Intent from your server.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I found create/update/confirm payment intent have diff parameters, especially confirm payment intent, it accepts less parameters
AFAIK you can't, the statement descriptor for the first invoice of a subscription is always set directly. On future invoices you can change it by listening to webhooks but not for the first invoice since it is immediately finalized.
can we pass application_fee_amount for subscription's first invoice?
Note you can control the descriptor by setting one on the Product : https://docs.stripe.com/api/products/create#create_product-statement_descriptor
you can't set an explicit amount, that's only allowed for individual payments. Subscriptions use a percentage because recurring payments can differ month-to-month based on e.g extra invoice items/proration that might happen
this is not enough for us. we want dynamic statement_descriptor and statement_descriptor_suffix, each subscription have diff two statement_descriptor and statement_descriptor_suffix. there is really no way to set? can we do update payment_intent before confirm payment_intent for first invoice? for set statement_descriptor and statement_descriptor_suffix to payment intent?
correct there really is no way, and you can not update the PaymentIntent from the Invoice
why confirm payment intent cannot pass statement_descriptor and statement_descriptor_suffix, can you update the source code to accept the two properties? I cannot see any block
if update payment intent can accept statement_descriptor and statement_descriptor_suffix, confirm payment intent could also accept them?
it's just a known quirk/pain point in our API today
generally the workaround here is to use the Product-level statement descriptor I referred to above
even I dynamically generate product, it only has statement_descriptor , no statement_descriptor_suffix either
Correct, yes. It's an absolute. You can't use a suffix
why confirm payment intent cannot pass statement_descriptor and statement_descriptor_suffix?
is there a way you can accept the two when confirm PI?
No, that's not supported today: https://docs.stripe.com/api/payment_intents/confirm
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
in subscription, we can only confirm PI once, cannot do anything else
cool cool. I just think it should be able to, since it is just text only, no involving accounting/amount/calculation
Sounds like valid feedback to share with the team: https://support.stripe.com/contact/email
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
thanks, I will submit the feedback. thank you for your always great supports!