#zulqi.
1 messages · Page 1 of 1 (latest)
Hi, let me help you with this.
❤️
Could you please share the PaymentIntent ID pi_xxx?
where can i get this? dashbord? or in the code?
Either. When you generate the PaymentIntent it will contain the pi_xxx
i have not generated any PaymentIntent, in tutorial i am following from youtube guy just added following code snippet in program.cs file:
app.MapPost("create-payment-intent", async (HttpRequest req, PaymentIntentService service) =>
{
var options = new PaymentIntentCreateOptions
{
Amount = 10,
Currency = "eur",
AutomaticPaymentMethods = new()
{
Enabled = true
}
};
var paymentIntent = await service.CreateAsync(options);
return Results.Ok(new { clientSecret = paymentIntent.ClientSecret });
});
This code creates a PaymentIntent object. It will have an ID, could you please share it with me?