Call Us (315) 599-0765

Pay Invoice

// Set your secret key: remember to change this to your live secret key in production
// See your keys here:
Stripe.apiKey = “sk_test_qZuzqOULznBjRSvBX0QvuyL1”;

// Token is created using Checkout or Elements!
// Get the payment token ID submitted by the form:
String token = request.getParameter(“stripeToken”);

// Charge the user’s card:
Map<String, Object> params = new HashMap<String, Object>();
params.put(“amount”, 999);
params.put(“currency”, “usd”);
params.put(“description”, “Example charge”);
params.put(“source”, token);

Charge charge = Charge.create(params);