#stupendouspineapple_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/1289181018456068248
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Here is the code which creates the checkout session
List<SessionLineItemOptions> lineItems =
[
new SessionLineItemOptions
{
Name = "Redacted",
Amount = (long)bill.TotalAmount_Pence,
Currency = "gbp",
Quantity = 1
},
];
Stripe.Checkout.SessionService service = new();
SessionCreateOptions sessionOptions = new()
{
PaymentMethodTypes = ["card"],
LineItems = lineItems,
SuccessUrl = request.SuccessUrl,
CancelUrl = request.CancelUrl,
Metadata = request.Metadata,
PaymentIntentData = new SessionPaymentIntentDataOptions
{
Metadata = request.Metadata,
ApplicationFeeAmount = (long)bill.TotalApplicationFeeIncludingTax_Pence,
CaptureMethod = "manual"
},
ClientReferenceId = request.UserId.ToString(),
CustomerEmail = request.Email,
};
RequestOptions requestOptions = new()
{
StripeAccount = request.HostUserStripeAccountId
};
Stripe.Checkout.Session session = await service.CreateAsync(sessionOptions, requestOptions);
Here is the code which captures the partial amount
StripeConfiguration.ApiKey = APIConfig.Instance.StripeSecretKey;
PaymentIntentService service = new();
PaymentIntentCaptureOptions paymentIntentCaptureOptions = new()
{
AmountToCapture = (long)bill.TotalAmount_Pence,
ApplicationFeeAmount = (long)bill.TotalApplicationFeeIncludingTax_Pence
};
RequestOptions requestOptions = new()
{
StripeAccount = connectedStripeAccountId
};
PaymentIntent captureResponse = await service.CaptureAsync(paymentIntentId, paymentIntentCaptureOptions, requestOptions);
Sorry, unclear what the ask is here? What you describe is how auth and partial capture works. How that is represented on the customer's bank statement is not something we can control
the full amount was charged to the customer's bank account
I don't see what you describe here on any of the Stripe objects for the related payment. The only Charge is for 364 relating to the partial capture you did: https://dashboard.stripe.com/events/evt_3Q087xB12PqLvwp919mZnutU
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
The rest of the original 1000 auth is released/refunded
Thanks for the clarification. I would expect the charge to appear as pending on the bank account, and then only the 346 actually be taken. The customer instead said they were charged 1000 and had to wait several days for the 654 refund to be returned to them
Depends what they mean by 'charged' I guess. How that is ultimately represented to the customer is down to the issuer/bank. But yes the auth will 'hold' the 1000 funds until capture/released
The auth will generally decrement their available balance so it may appear as a payment
But that's just how auth/holds work
Thank you for your help. So that I can fully understand: the Stripe fees are then based only on the amount actually paid?
Correct, yes. The fees are calculated/deducated based on the captured amount
Okay, I can now explain this to my client! Thanks