Search Overlay

Exceptions

The Paysafe APIs allow for certain exceptions to be requested, e.g., invalid credentials, thereby ensuring reliable payment processing.

Click the links below to view our code samples.

apiClient.cardPaymentService().authorize(auth);
apiClient.cardPaymentService().authorize(auth);

Authorization auth =
Authorization.builder()
.merchantRefNum("0f8fad5bd9cb469fa16570867728950e")
.amount(4) //The bank has requested that you process the transaction manually by calling the card
.settleWithAuth(true)
.card()
.cardNum("4111111111111111")
.cvv(123)
.cardExpiry()
.month(2)
.year(2023)
.done()
.done()
.billingDetails()
.zip("M5H 2N2")
.done()
.build();

apiClient.cardPaymentService().authorize(auth);

NetBanxApiClient invalidClient = new NetBanxApiClient("invalid-key", "invalid-code", Environment.TEST, 12345);

Authorization auth =
Authorization.builder()
.id("123456789")
.done()
.build();

invalidClient.cardPaymentService().authorize(auth);

AuthorizationId authId = AuthorizationId.builder().id("errorTest").build();
apiClient.cardPaymentService().getAuth(authId);

Authorization auth =
Authorization.builder()
.merchantRefNum("0f8fad5bd9cb469fa16570867728950e")
.amount(10)
.card()
.cardNum("4111111111111111")
.cvv(123)
.cardExpiry()
.month(2)
.year(2023)
.done()
.done()
.build();

apiClient.cardPaymentService().authorize(auth);

Authorization auth =
Authorization.builder()
.merchantRefNum("0f8fad5bd9cb469fa16570867728950e")
.amount(6)
.settleWithAuth(true)
.card()
.cardNum("4111111111111111")
.cvv(123)
.cardExpiry()
.month(2)
.year(2023)
.done()
.done()
.billingDetails()
.zip("M5H 2N2")
.done()
.build();

apiClient.cardPaymentService().authorize(auth);
On this Page