API Card Charging
Endpoint: /v1/services/card_charging?api_key=YOUR_API_KEY
Method: POST
Header: How to generate JWT_TOKEN
{
"X-APPOTAPAY-AUTH": Bearer JWT_TOKEN,
"Content-Type": "application/json"
}
Params
Params | Required | Type | Description |
---|---|---|---|
code | √ | String | Card code is encrypted |
serial | √ | String | Card Serial |
vendor | √ | String | Default is: appota |
partner_code | √ | String | Partner code is provided by AppotaPay |
service_name | √ | String | Partner service name |
transaction_id | √ | String | Unique ID per transaction (5 - 50 char) |
signature | √ | String | Hash params: signature= SHA256(code + serial + vendor + partner_code + service_name + transaction_id + secret_key) Secret key is provided by AppotaPay |
Data result
Params | Type | Description |
---|---|---|
error_code | String | Error Code |
message | String | Error Message |
data | Object | Response data |
data.amount | Integer | Card value |
data.serial | String | Card serial |
data.transaction_id | String | AppotaPay Transaction ID |
data.time | String | Transaction Time |
Example
Response
{
"error_code": "00",
"message": "Transaction success",
"data": {
"amount": 100000,
"serial": "OTA123456789",
"transaction_id": "abc123",
"time": "10:05:01 08/05/2019 GMT+7"
}
}