Tokenization

A Token can represent your tokenized Customer, Payment Instrument or Instrument Identifier information.

Generate token

  1. Contact NeoX to register the service.

Check registration status at Account information page
  1. Create bill with enabled neo_TokenCreate field.

The bill created with field neo_TokenCreate = true will return the token (neo_PayToken) after payment success via IPN. The token can be used for the next payment.

How to create a bill?

Next payment

  1. Authentication

Reference to Platform Authentication.

Using scope = payment

  1. Pay by token API

  • URL: https://api.neopay.vn/oapi/v2/payment/payByToken

  • Method: POST

  • Request: Content-Type: application/json

Request Parameter

Parameter
Data type
Required
Description

orderId

String

Y

Order ID

orderInfo

String

Y

Order description

merchantTxnId

String

Y

Merchant's transaction ID (unique)

currency

String

Y

Currency (default VND)

amount

Number

Y

Bill amount

payToken

String

Y

neo_PayToken NeoX returned

Example:

{
    "orderId": "DH123232234",
    "orderInfo": "Thanh toan DH123232234",
    "merchantTxnId": "323123221434",
    "currency": "VND",
    "amount": 100000,
    "payToken": "c9291339613c4e4a80818c87cbedb483"
}

Response Data

Field name
Data type
Description

code

Number

message

String

Response message

data

Object

  • orderId: String

  • merchantTxnId: String

Example:

{
    "code": 99,
    "message": "Order is processing",
    "data": {
        "orderId": "DH12323234234",
        "merchantTxnId": "323123221434"
    }
}

Payment result

Last result of the request will be sent via IPN.

Last updated

Was this helpful?