// Set your secret key: remember to change this to your live secret key in production
String apiKey = "sk_test_BQokikJOvBiI2HlWgH4olfQ2";
Client client=null;
// Create order:
Endpoint ep = configService.getEndpoint();
client = new Client(ep, apiKey);
Builder chargeModel = new Order.Builder orderModel = new Order.Builder().amount(amount).currency(currency).description(description).refNum
ber(ref_number).sourceType("qr");
Order order = client.order().create(orderModel);
// keep order id in session for used in KPAY UI SDK
setOrder_id(order.getId());