You are on page 1of 2

Digital Pay API Documentation

Get http://86.51.177.170/v1/machine_token/{device_serial}

The http://86.51.177.170/v1/machine_token/{device_serial} this API will be


used to get terminal and machine tokens.
The {device_serial} : represent terminal serial code.
This API return machine token by pathing {device_serial} in header.

Get http://86.51.177.170/v1/checkout

The http://86.51.177.170/v1/checkout API is used to initiate a transaction, such


as a purchase or refund. If the API call is successful and the server returns a 201 or
200 HTTP status code, the transaction has been successfully initiated:
• “device_token”: machine token that returned from
http://86.51.177.170/v1/machine_token/ {device_serial}.
• “Code": This field contains a string representing the code associated with the
transaction. The code can be used to track the transaction or identify the transaction in
the system.
• “transaction_type”: This field contains a string representing the type of transaction
being performed, such as purchase or refund. This field is important to specify the
nature of the transaction.
• “command_identifier”: This field contains a string representing the unique identifier for
the command being executed. This field can be used to track the specific command that
is being executed in the transaction.
• “items”: This field is an array of objects representing the items being purchased or
refunded. Each object in the array contains the name of the item being purchased, the
quantity being purchased or refunded, and the amount of the item.
• “name”: This field contains a string representing the name of the item being purchased
or refunded.
• “quantity”: This field contains an integer representing the quantity of the item being
purchased or refunded.
• “amount”: This field contains a number representing the amount of the item being
purchased or refunded.
• “amount”: This field contains a number representing the total amount of the
transaction.

Get http://86.51.177.170/v1/status/{code}

To check the status of a transaction, you would then use the


http://86.51.177.170/v1/status/{code} API, where {code} is the code of Order
code that was returned by the http://86.51.177.170/v1/checkout API.

The /v1/status/{code} API returns a JSON response with the following fields:

• “Status”: This field contains a string representing the current status of the
transaction associated with the provided {code}. This can be used to
determine whether the transaction has been completed, is in progress, or
has failed, for example.
• “terminal_serial”: This field contains a string representing the serial
number of the terminal used to initiate the transaction. This can be used to
track the terminal used to initiate the transaction.
• “machine_token”: This field contains a string representing the token or
identifier of the machine used to initiate the transaction. This can be used
to track the machine used to initiate the transaction.

After calling the http://86.51.177.170/v1/checkout API, must request on


http://86.51.177.170/v1/status/{code} API, periodically every 30 seconds.

You might also like