#anay-208_code

1 messages ยท Page 1 of 1 (latest)

next oasisBOT
#

๐Ÿ‘‹ 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/1222208427007410187

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

latent islandBOT
#

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.

fierce verge
#
    payment_method_options: {
      card: {
        mandate_options: {
          reference: uuidv4(),
          amount_type: "maximum",
          amount: 50000,
          start_date: Math.floor(new Date().getTime() / 1000),
          end_date: Math.floor(new Date().getTime() / 1000) + 30 * 24 * 60 * 60, // 1 month from now
          interval: "sporadic",
          supported_types: ["india"],
        },
      },
    },
latent islandBOT
stark orbit
#

Hello

#

You are asking how you can test if a mandate was not properly set up?

fierce verge
stark orbit
#

Where are you seeing that exactly?

fierce verge
#

I'm seeing when I'm trying to retreive the latest_charge of a intent to get the mandate id

  
return stripe.charges.retrieve(id);
stark orbit
#

Can you provide the Charge ID?

next oasisBOT
fierce verge
stark orbit
#

Thanks, looking

delicate dune
#

๐Ÿ‘‹ Stepping in for my teammate while we look into this!

#

If you retrieve ch_3OwoZJSBaY8pfsc519yIkbx3 separately (versus looking at the object included in the charge.succeeded payload), do you see the mandate there?

delicate dune
fierce verge
#

a moment

fierce verge
fierce verge
delicate dune
#

Right, that's what I mean.

#

The call you make above is different/separate from inspecting the Charge object that is returned in the charge.succeeded event

fierce verge
#

So do I get the charge.succeeded from paymentIntent?

#

In one of my other intent, where I used my own card which had mandates enabled, the payment_method_details.card.mandate actually had a mandate id.

delicate dune
#

charge.succeeded is an event that is emitted and sent to your webhook endpoint when a charge succeeds. at that point in time, a mandate ID may not be available so, if that's the case, the mandate is null when you receive that event.

If you make a call to stripe.charges.retrieve(ch_3OwoZJSBaY8pfsc519yIkbx3); now, is payment_method_details.card.mandate still null?

fierce verge
#

Yup, its still null.

And I don't have an webhook set as of now to get the mandate.

#

However, with a different charge id where I used my own card, the payment_method_details.card.mandate has a mandate id

#

My flow of the program actually is that:

  • User processes the payment, which also creates a mandate
  • Upon processing, either I should get an mandate id or payment should fail
  • Store the mandate id + payment_method in database for charging in future
delicate dune
#

Hm, I see. Can you clarify what you mean by "charge id where id where I used my own charge" ?

fierce verge
next oasisBOT
delicate dune
#

Got it. This will need to be a longer investigation. We won't be able to find an answer in real time so we'll need to move over to email.

#

Could you reach out to our support team and let them know you were chatting with developer support on Discord: https://support.stripe.com/contact/

In your message, please include a link to this thread, a summary of the issue with missing mandate IDs, and include the Charge ID you mentioned above

#

Please reply here when you've opened up the case so I can find it

fierce verge
#

Sure

fierce verge
delicate dune
#

Thanks!

#

I've got it and will follow up over email

fierce verge
#

Alright, Thank you

#

Also, another thing(related to discord server)

gaunt hornet
#

Ah, thanks for the heads up! Looks like Discord changed something. ๐Ÿ˜…

fierce verge
#

I guess the url should be updated