#badr_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/1324404725520797820
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello there ๐
This is my code after the upgrade
` /// <inheritdoc />
public Task<PaymentIntent> CreatePaymentIntentAsync(StripePaymentMethodInputModel stripePaymentInput, string connectedAccountId)
{
_logger.LogInformation($"Attempting to create PaymentIntent from {stripePaymentInput}");
RequestOptions requestOptions = new()
{
StripeAccount = connectedAccountId,
ApiKey = _stripeOptions.StripeSecretKey,
};
var createOptions = new PaymentIntentCreateOptions
{
PaymentMethod = stripePaymentInput.PaymentMethodId,
Amount = stripePaymentInput.TotalAmount,
Currency = stripePaymentInput.CurrencyCode,
Confirm = true,
ApplicationFeeAmount = stripePaymentInput.EppServiceChargeTotalAmount,
Description = stripePaymentInput.Description,
Metadata = stripePaymentInput.MetaData,
ConfirmationMethod = "manual",
SetupFutureUsage = "off_session",
PaymentMethodTypes = ["card"],
};
createOptions.AddExpand("latest_charge.balance_transaction");
return new PaymentIntentService().CreateAsync(createOptions, requestOptions);
}
`
Hello
Give me a moment to look
The request ID you shared is for a payment method creation. Can you share the exact PaymentIntent ID you're looking at?
pi_3QcqnyCifgzvNgEl1js30kJX
this is not the exact one .. is it ok to send you the new rquest id ?
I just created new one
req_TkmVSIXX9qEAVt
pi_3QcqnyCifgzvNgEl1js30kJX
I believe this is due to async capture flow - https://docs.stripe.com/payments/payment-intents/asynchronous-capture
https://docs.stripe.com/payments/payment-intents/asynchronous-capture#opt-in-async-capture
Specifying the
capture_method=automatic_asyncparameter is optional because Stripe enables its functionality by default in the latest version of the API.You might need to make additional changes when you opt into asynchronous capture since the API response and some webhooks have different behaviour than with other capture methods.
For all payments, the balance_transaction is null on the following objects. For Connect payments, the transfer and application_fee are also null on the following objects:
- attached Charge object of the API response
- charge.succeeded webhook
- payment_intent.succeeded webhook
Ok perfect that seems did the trick , I added CaptureMethod = "automatic",
and it worked
Perfect ๐
Thanks for the help Hanzo ๐