Java Libraries

Accepting credit card payments with Java

The following example uses PinPayments Java by Jiakuan Wang:

@Inject
private ChargesApi chargesApi;

public final void myBusinessMethod() {
  final ChargeResponse chargeResponse = chargesApi.create(ImmutableCharge.builder()
    .email("roland@pinpayments.com")
    .currency("AUD")
    .description("test charge")
    .amount(400)
    .ipAddress("203.192.1.172")
    .capture(String.valueOf(capture))
    .card(ImmutableCard.builder()
      .number("5520000000000000")
      .expiryMonth("05")
      .expiryYear("2018")
      .cvc("123")
      .name("Roland Robot")
      .addressLine1("42 Sevenoaks St")
      .addressLine2("")
      .addressCity("Lathlain")
      .addressPostcode("6454")
      .addressState("WA")
      .addressCountry("Australia")
      .build())
    .metadata(ImmutableMap.of("OrderNumber", "123456", "CustomerName", "Roland Robot"))
    .build());
  assertThat(chargeResponse.response().token()).isNotBlank();
}

Java libraries compatible with Pin Payments:

Pin Payments is owned and operated by
Southern Payment Systems Pty Ltd
ABN: 46 154 451 582
Level 1, 34 Queen St,
Melbourne VIC 3000

Privacy Policy Terms Security Status

Australia