final Calendar cal = Calendar.getInstance();
final HmacSHA256Signer signer = new HmacSHA256Signer(ISSUER, null,
SIGNING_KEY.getBytes());
// Configure JSON token
final JsonToken token = new JsonToken(signer);
token.setAudience("Google");
token.setParam("typ", "google/payments/inapp/item/v1");
token.setIssuedAt(new Instant(cal.getTimeInMillis()));
token.setExpiration(new Instant(cal.getTimeInMillis() + 60000L));
// Configure request object
final JsonObject request = new JsonObject();
request.addProperty("name", "Battle Disks");
request.addProperty("description", description);
request.addProperty("price", cost);
request.addProperty("currencyCode", "USD");
request.addProperty("sellerData", user);
final JsonObject payload = token.getPayloadAsJsonObject();
payload.add("request", request);
return token;
} finally {
step.close();