#alex1984
1 messages · Page 1 of 1 (latest)
Yeah you can
Just add on the additional fee to the total
What integration path are you following?
c#
Ok. Are you using Elements, Checkout, etc?
windows Form
Windows form? What's that?
no just the normal api
There's multiple integration paths with our api. What guide are you following?
using Stripe.Checkout;
using Stripe;
Ok so Checkout?
// Create a new HttpClient to communicate with the Stripe API
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + stripeApiKey);
var content = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("amount", "100"),
new KeyValuePair<string, string>("currency", "USD"),
new KeyValuePair<string, string>("description", "Test payment"),
new KeyValuePair<string, string>("source", "tok_visa"), // Replace this with the actual token for the payment method you want to use
});
var response = client.PostAsync("https://api.stripe.com/v1/charges", content).Result;
var responseContent = response.Content.ReadAsStringAsync().Result;
var charge = JsonConvert.DeserializeObject<dynamic>(responseContent);
MessageBox.Show("Charge id: " + charge.id + Environment.NewLine +
"Amount: " + charge.amount / 100 + " " + charge.currency + Environment.NewLine +
"Status: " + charge.status, "Payment Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
yes
it is a check out
like POS
is just a test
Can you link the guide you are following
im not folling any guide just the docs of stripe
if you have a lik to a guide that will be help full
We always recommend people start here: https://stripe.com/docs/payments/accept-a-payment
But to add a fee, you can just add to the total
No problem