VendexApp Docs
  • Overview
  • DEVELOPER
    • Cloud API for App
      • Client authentication
      • User
      • Account
      • Transaction
      • Vending machine
      • Payment gateway
    • Cloud API for Sale Point
      • Client authentication
      • Account
      • Transaction
      • Sale point
    • QR Code format
    • Real Time Communication (RTC) API
      • Transaction
Powered by GitBook
On this page
  • Making a payment
  • Authorize payment
  • Cancel previous payment authorization
  • Conducting a refund
  • Set transaction signature
  • Get transaction signature
  • Cancel transaction signature

Was this helpful?

  1. DEVELOPER
  2. Cloud API for App

Transaction

Making a payment

POST https://api.vendex.app/api/transaction/payment/

API call from a sender to make a payment. Transaction signature given in the API will determine who the recipient is.

Headers

Name
Type
Description

Api-Client-Token

string

Client token obtained from client authentication method.

Api-User-Token

string

User token obtained from user login.

Content-Type

string

Content-type need to be set as application/json

{
    "status": "success",
    "detail": "Payment successful",
    "data": {
        "transaction_id": 1029,
        "recipient_name": "John Doe",
        "amount": "500.00",
        "currency_code": "USD",
        "created": "2020-09-09T07:14:39.660639Z",
        "description": "Payment Pizza hut - Airport, Vegas.",
    }
}

Example of POST data (JSON)

{
    "amount": 100.00,
    "currency_code": "USD",
    "transaction_signature": "9ef4e5f81dacd2b844c28a7e674cd13961e821c9b559a08b926c736fc5aaffa2"
}

Authorize payment

POST https://api.vendex.app/api/transaction/authorize/

This method is to allow merchant to charge account. When user scan a QR with type "sale_point", app will give authorization to the merchant so that it can charge later with any amount (limited to account balance and charge limit). It can be used for a vending, taxi or any suitable application. Transaction signature is required for this call.

Headers

Name
Type
Description

Api-Client-Token

string

Client token obtained from client authentication method.

Api-User-Token

string

User token obtained from user login.

Content-Type

string

Content type need to be set as application/json

{
    "status": "success",
    "detail": "Payment authorization successful"
}

Example of POST data(JSON)

{
    "transaction_signature": "9ef4e5f81dacd2b844c28a7e674cd13961e821c9b559a08b926c736fc5aaffa2"
}

Cancel previous payment authorization

GET https://api.vendex.app/api/transaction/authorize_cancel/

This method is to cancel all open authorization.

Headers

Name
Type
Description

Api-Client-Token

string

Client token obtained from client authentication method

Api-User-Token

string

User token obtained from user login

{
    "status": "success",
    "detail": "Cancel payment authorization successful"
}

Conducting a refund

POST https://api.vendex.app/api/transaction/refund/

To conduct refund on previous transaction. Refund amount can be partial or full. One transaction can have multiple refunds as long as the total refund amount is no greater than the original transaction amount.

Headers

Name
Type
Description

Api-Client-Token

string

Client token obtained from client authentication method.

Api-User-Token

string

User token obtained from user login.

Content-Type

string

Content-type need to be set as application/json.

{
    "status": "success",
    "detail": "Refund successful"
}

Example of POST data (JSON)

{
    "amount": 50.00,
    "currency_code": "USD",
    "transaction_signature": "9ef4e5f81dacd2b844c28a7e674cd13961e821c9b559a08b926c736fc5aaffa2"
    "description": "Customer refund."
}

Set transaction signature

POST https://api.vendex.app/api/signature/set/

To set signature with the payment request amount. If signature is not set, sender has the capability to enter amount when making a payment.

Headers

Name
Type
Description

Api-Client-Token

string

Client token obtained from client authentication method.

Api-User-Token

string

User token obtained from user login.

Content-Type

string

Content-type need to be set as application/json

{
    "status": "success",
    "detail": "Set transaction signature successful"
    "data": {
        "recipient_name": "John Doe",
        "amount": "500.00",
        "currency_code": "USD",
        "description": "Payment Pizza hut - Airport, Vegas.",
        "amount_required": false,
        "transaction_signature": "9ef4e5f81dacd2b844c28a7e674cd13961e821c9b559a08b926c736fc5aaffa2",
        "recipient_profile_image_url": "https://nxpay-uploaded-media.s3.ap-south-1.amazonaws.com/upload/9c900a41-9027-4218-9737-f91db6cf4f53.png"
    }
}

Example of POST data (JSON)

{
    "amount": 500.00,
    "currency_code": "USD",
    "description": "Payment Pizza hut - Airport, Vegas."
}

Get transaction signature

GET https://api.vendex.app/api/signature/get/?account_number=1234567812345678

To get transaction signature before making a transaction. Result can include amount if it is set by the recipient.

Query Parameters

Name
Type
Description

account_number

integer

Account number can retrieved from QR code/Barcode

Headers

Name
Type
Description

Api-Client-Token

string

Client token obtained from client authentication method.

Api-User-Token

string

User token obtained from user login method.

// Amount known
{
    "status": "success",
    "detail": "Transaction signature obtained successful",
    "data": {
        "recipient_name": "John Doe",
        "amount": 500.00,
        "currency_code": "USD"
        "description": "Payment Pizza hut - Airport, Vegas.",
        "amount_required": false,
        "authorization_required": false,
        "transaction_signature": "9ef4e5f81dacd2b844c28a7e674cd13961e821c9b559a08b926c736fc5aaffa2",
        "recipient_profile_image_url": "https://nxpay-uploaded-media.s3.ap-south-1.amazonaws.com/upload/9c900a41-9027-4218-9737-f91db6cf4f53.png"
    }
}

// Amount unknown
{
    "status": "success",
    "detail": "Transaction signature obtained successful",
    "data": {
        "recipient_name": "John Doe",
        "amount": 0.00,
        "currency_code": "USD"
        "description": "",
        "amount_required": true,
        "authorization_required": false,
        "transaction_signature": "9ef4e5f81dacd2b844c28a7e674cd13961e821c9b559a08b926c736fc5aaffa2",
        "recipient_profile_image_url": "https://nxpay-uploaded-media.s3.ap-south-1.amazonaws.com/upload/9c900a41-9027-4218-9737-f91db6cf4f53.png"
    }
}

// Amount unknown for merchant
{
    "status": "success",
    "detail": "Transaction signature obtained successful",
    "data": {
        "recipient_name": "Nexlytics vending 001",
        "amount": 0.00,
        "currency_code": "USD"
        "description": "",
        "amount_required": true,
        "authorization_required": true,
        "transaction_signature": "9ef4e5f81dacd2b844c28a7e674cd13961e821c9b559a08b926c736fc5aaffa2",
        "recipient_profile_image_url": "https://nxpay-uploaded-media.s3.ap-south-1.amazonaws.com/upload/9c900a41-9027-4218-9737-f91db6cf4f53.png"
    }
}

Cancel transaction signature

GET https://api.vendex.app/api/signature/cancel/

To cancel signature where signature is set while request a payment.

Headers

Name
Type
Description

Api-Client-Token

string

Client token obtained from client authentication method.

Api-User-Token

string

User token obtained from user login method.

{
    "status": "success",
    "detail": "Cancel transaction signature successful"
}
PreviousAccountNextVending machine

Last updated 4 years ago

Was this helpful?