Create Payments

This guide shows you how to create doTransaction requests for both pre-authorization and single-step payments. You will learn to configure the JSON-RPC parameters and specify transaction-specific details.

Pre-requisites

Before you begin, ensure you have:

  • Access to the server endpoint.
  • Basic understanding of JSON-RPC 2.0 structure.

📘

JSON-RPC 2.0

See Get Started for more details on how the requests are structured and sent.

Create a Pre-Authorization Request

See the example Pre-Authorization request below.

{
    "jsonrpc": "2.0",
    "method": "doTransaction",
    "id": "1696161997899",
    "params": [
        "engine",
        {
            "vuid": "80b458684",
            "tranCode": 3,
            "amount": 100
        }
    ]
}

To create this request, follow the steps below:

  1. First, configure the JSON-RPC parameters:
    1. jsonrpc: Set this to 2.0.
    2. method: Set this to doTransaction.
    3. id: Input the ID of your request here.
  2. Add the params object inputting the payment service used, which in this example isengine.
  3. Now, add the parameters for the method:
    1. vuid: This is the unique transaction identifier the vendor (client) assigns.
    2. amount: The transaction amount in cents.
    3. tranCode: This parameter defines the transaction type. It must be set to 3 for a pre-authorization transaction.

Once the request is ready, it can be sent to the server endpoint.

Create a Pre-Selection Request

See the example Pre-Selection request below.

{
    "jsonrpc": "2.0",
    "method": "doTransaction",
    "id": "123454352",
    "params": [
        "engine",
        {
            "vuid": "44d96006",
            "amount": 100,
            "tranCode": 1
        }
    ]
}

To create this request, follow the steps below:

  1. First, configure the JSON-RPC parameters:
    1. jsonrpc: Set this to 2.0.
    2. method: Set it to doTransaction.
    3. id: Input the ID of your request here.
  2. Add the params object inputting the payment service used, which in this example isengine.
  3. Now, add the parameters for the method:
    1. vuid: This is the unique transaction identifier the vendor (client) assigns.
    2. amount: The transaction amount in cents.
    3. tranCode: This parameter defines the transaction type. It must be set to 1 for a single-step transaction.

Once the request is ready, it can be sent to the server endpoint.

See Also