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
}
Categories:
eCommerce API V1
Categories
Search results