For any question, we are one click away

Contact us

Stored credentials and transactions types

This section describes supported types of stored-credential transactions.

Types of stored credentials

Payment Gateway allows to create and use the following type of stored credentials:

Transaction types

Stored-credential transactions belong to either of the two groups depending on the initiator of a transaction:

The type of a transaction should be passed in the tii parameter of API payment requests. Read more about the tii parameter values here.

Managing stored credentials via API

Below you can find examples of storing and using payment credentials of different types via API:

Common stored credentials

Store a common credential

To store a common credential, run the instantPayment.do request with clientId parameter.

As a result, the order will be registered and payed and the credential will be stored for the client with the initially specified clientId. You can run the getBindigs.do request to make sure that the credential was stored.

Example of the instantPayment.do request:

curl --request POST \
    --url  https://gateway-test.jcc.com.cy/payment/rest/instantPayment.do \
    --header 'content-type: application/x-www-form-urlencoded' \
    --data userName=test_user \
    --data password=test_user_password \
    --data amount=100 \
    --data currency=978 \
    --data description=my_first_order \
    --data orderNumber=1218637308 \
    --data pan=5000001111111115 \
    --data cvc=123 \
    --data expiry=203012 \
    --data cardHolderName="TEST CARDHOLDER" \
    --data clientId=12345 \
    --data language=en \
    --data backUrl=https%3A%2F%2Fmybestmerchantreturnurl.com \
    --data failUrl=https%3A%2F%2Fmybestmerchantreturnurl.com
{
        "errorCode": "0",
        "orderId": "eee72f6e-b980-79c5-92e8-6f4200b1eae0",
        "info": "Your order is proceeded, redirecting...",
        "redirect": "https://www.test.com/payment/merchants/gateway/finish.html?orderId=eee72f6e-b980-79c5-92e8-6f4200b1eae0&lang=en",
        "orderStatus": {
            "expiration": "202612",
            "cardholderName": "TEST CARDHOLDER",
            "depositAmount": 100,
            "currency": "978",
            "approvalCode": "123456",
            "authCode": 2,
            "ErrorCode": "0",
            "ErrorMessage": "Success",
            "OrderStatus": 2,
            "OrderNumber": "2011",
            "Pan": "500000**1115",
            "Amount": 100,
            "Ip": "10.99.50.35"
        }
    }

Pay with a common stored credential

To pay for an order with a common stored credential, use the following flow:

  1. Run the register.do request with clientId parameter → get orderId in response.
  2. Get the list of stored credentials using the getBindigs.do request with the same value of clientId and bindingType=C → get bindingId in response.
  3. Run paymentOrderBinding.do request. Pass the orderId value (received on the step 1) in the mdOrder parameter, pass the received bindingId. Available tii values: F, U.

As a result, the order will be payed using the stored credential with the specified bindingId.

Example of the paymentOrderBinding.do request:

curl --request POST \
  --url https://gateway-test.jcc.com.cy/payment/rest/paymentOrderBinding.do \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data mdOrder=24c3d392-4c60-7f0b-9ff5-b00100b4f820 \
  --data ip=127.0.0.1 \  
  --data cvc=123 \
  --data bindingId=b83317e0-1679-7d85-b375-a63200b4f820 \
  --data userName=test_user \
  --data password=test_user_password \
  --data language=en \
  --data tii=F
{
  "redirect": "https://gateway-test.jcc.com.cy/payment/merchants/pay/finish.html?orderId=24c3d392-4c60-7f0b-9ff5-b00100b4f820&lang=en",
  "info": "Your order is proceeded, redirecting...",
  "errorCode": 0
}

Installment stored credentials

Store an installment credential

To create an installment stored credential, run the instantPayment.do request with clientId parameter. The installments, totalInstallmentAmount, recurringFrequency, and recurringExpiry additional paramenters are required.

As a result, a credential will be stored for the client with the initially specified clientId. You can run the getBindigs.do request to make sure that the credential was stored.

Example of the instantPayment.do request:

curl --request POST \
    --url  https://gateway-test.jcc.com.cy/payment/rest/instantPayment.do \
    --header 'content-type: application/x-www-form-urlencoded' \
    --data userName=test_user \
    --data password=test_user_password \
    --data amount=100 \
    --data currency=978 \
    --data description=my_first_order \
    --data orderNumber=1218637308 \
    --data pan=5000001111111115 \
    --data cvc=123 \
    --data expiry=203012 \
    --data cardHolderName="TEST CARDHOLDER" \
    --data clientId=12345 \
    --data 'jsonParams={"installments": "3", "totalInstallmentAmount": "900000", "recurringFrequency": "3", "recurringExpiry":"20261231"}' \
    --data language=en \
    --data backUrl=https%3A%2F%2Fmybestmerchantreturnurl.com \
    --data failUrl=https%3A%2F%2Fmybestmerchantreturnurl.com
{
        "errorCode": "0",
        "orderId": "eee72f6e-b980-79c5-92e8-6f4200b1eae0",
        "info": "Your order is proceeded, redirecting...",
        "redirect": "https://www.test.com/payment/merchants/gateway/finish.html?orderId=eee72f6e-b980-79c5-92e8-6f4200b1eae0&lang=en",
        "orderStatus": {
            "expiration": "202612",
            "cardholderName": "TEST CARDHOLDER",
            "depositAmount": 100,
            "currency": "978",
            "approvalCode": "123456",
            "authCode": 2,
            "ErrorCode": "0",
            "ErrorMessage": "Success",
            "OrderStatus": 2,
            "OrderNumber": "2011",
            "Pan": "500000**1115",
            "Amount": 100,
            "Ip": "10.99.50.35"
        }
    }

Pay with an installment stored credential

To pay for an order with an installment stored credential, use the following flow:

  1. Get the list of stored credentials using the getBindigs.do request with bindingType=I → get bindingId in response.
  2. Run installmentPayment.do request with the received bindingId.

As a result, the order will be payed using the stored credential with the specified bindingId.

Example of the installmentPayment.do request:

curl --request POST \
  --url https://gateway-test.jcc.com.cy/payment/installmentPayment.do \
  --header 'Content-Type: application/json' \
  --data '{
  "userName": "test_user",
  "password": "test_user_password",
  "orderNumber": "UAF-203974-DE-12",
  "language": "EN",
  "bindingId": "8aa4fa8b-4d8a-76ca-b314-7bcc00b4f820",
  "amount": 12300,
  "currency": "978",
  "description" : "Test description",
  "additionalParameters": {
    "firstParamName": "firstParamValue",
    "secondParamName": "secondParamValue"
  }
 }'
{
  "errorCode": 0,
  "errorMessage": "Success",
  "orderId": "0e441115-f3bc-711c-8827-2fdc00b4f820",
  "orderStatus": {
    "errorCode": "0",
    "orderNumber": "7033",
    "orderStatus": 2,
    "actionCode": 0,
    "actionCodeDescription": "",
    "amount": 12300,
    "currency": "978",
    "date": 1618340470944,
    "orderDescription": "Test description",
    "merchantOrderParams": [
      {
        "name": "firstParamName",
        "value": "firstParamValue"
      },
      {
        "name": "secondParamName",
        "value": "secondParamValue"
      }
    ],
    "transactionAttributes": [],
    "attributes": [
      {
        "name": "mdOrder",
        "value": "0e441115-f3bc-711c-8827-2fdc00b4f820"
      }
    ],
    "cardAuthInfo": {
      "maskedPan": "400000**1118",
      "expiration": "203012",
      "cardholderName": "TEST CARDHOLDER",
      "approvalCode": "123456",
      "paymentSystem": "VISA",
      "product": "visa-product",
      "secureAuthInfo": {
        "eci": 7
      },
      "pan": "400000**1118"
    },
    "bindingInfo": {
      "clientId": "test-client",
      "bindingId": "8aa4fa8b-4d8a-76ca-b314-7bcc00b4f820"
    },
    "authDateTime": 1618340471076,
    "authRefNum": "111111111111",
    "paymentAmountInfo": {
      "paymentState": "DEPOSITED",
      "approvedAmount": 12300,
      "depositedAmount": 12300,
      "refundedAmount": 0,
      "totalAmount": 12300
    },
    "bankInfo": {
      "bankName": "ES TEST BANK",
      "bankCountryCode": "ES",
      "bankCountryName": "Spain"
    },
    "chargeback": false,
    "operations": [
      {
        "amount": 12300,
        "cardHolder": "TEST CARDHOLDER",
        "authCode": "123456"
      }
    ]
  },
  "error": false
}
Categories:
eCommerce API V1
Categories
Search results