#cashiersprit_docs

1 messages · Page 1 of 1 (latest)

fallow pawnBOT
errant minnowBOT
#

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.

fallow pawnBOT
#

👋 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.

cerulean crescent
#

Hi! the details are all easily available in the ConfirmationToken.

warped perch
#

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

cerulean crescent
warped perch
#

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.

#

I found create/update/confirm payment intent have diff parameters, especially confirm payment intent, it accepts less parameters

cerulean crescent
#

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.

warped perch
#

can we pass application_fee_amount for subscription's first invoice?

cerulean crescent
cerulean crescent
#

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

warped perch
cerulean crescent
#

correct there really is no way, and you can not update the PaymentIntent from the Invoice

warped perch
#

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?

cerulean crescent
#

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

warped perch
#

even I dynamically generate product, it only has statement_descriptor , no statement_descriptor_suffix either

fallow pawnBOT
tacit junco
#

Correct, yes. It's an absolute. You can't use a suffix

warped perch
#

why confirm payment intent cannot pass statement_descriptor and statement_descriptor_suffix?

#

is there a way you can accept the two when confirm PI?

tacit junco
warped perch
#

in subscription, we can only confirm PI once, cannot do anything else

warped perch
tacit junco
#

Sounds like valid feedback to share with the team: https://support.stripe.com/contact/email

warped perch
#

thanks, I will submit the feedback. thank you for your always great supports!