Server-Side Implementation

Vaulting SRCAnchorIcon

Your customer's SRC card selection can be saved to your Vault and reused for future transactions, just like a credit card.

Collect device data from the client and include the deviceDataFromTheClient in the transaction.

  1. Java
PaymentMethodRequest request = new PaymentMethodRequest()
  .customerId("131866")
  .paymentMethodNonce(nonceFromTheClient);

Result<? extends PaymentMethod> result = gateway.paymentMethod().create(request);

You can also save the customer's SRC card to your Vault at the same time as your transaction by using Transaction: Sale with Options.StoreInVault or Options.StoreInVaultOnSuccess .

Creating transactionsAnchorIcon

Creating a SRC transaction is the same as creating any other transaction with a nonce:

  1. Java
TransactionRequest request = new TransactionRequest()
    .amount(new BigDecimal("10.00"))
    .paymentMethodNonce(nonceFromTheClient)
    .deviceData(deviceDataFromTheClient)
    .options()
    .submitForSettlement(true)
    .done();

Result<transaction> result = gateway.transaction().sale(request);
if (result.isSuccess()) {
    // See result.getTarget() for details
} else {
    // Handle errors
}