Checkout
The following is an API endpoint to create an Order.
Used to checkout.
As for development, use the following Reference Number
Reference Number
Your unique Transaction ID
Headers
- Name
Authorization
- Type
- uuid
- Description
API Key (provided by BANGJEFF or retrieve from our Reseller Portal).
- Name
Content-Type
- Type
- application/json
- Description
Content type application/json
Body
- Name
code
- Type
- string
- Description
Please refer to Get Product Variants
- Name
referenceNumber
- Type
- string
- Description
Your unique Transaction ID
- Name
qty
- Type
- number
- Description
Quantity. Default 1 (optional).
- Name
inputs
- Type
- Array<{ name: string; value: string }>
- Description
Topup destination.
Please refer to Get Product Detail for more information
- Name
inputs.name
- Type
- string
- Description
Topup destination name.
Please refer to Get Product Detail for more information
- Name
inputs.value
- Type
- string
- Description
Topup destination value.
Please refer to Get Product Detail for more information
Payload
{
"code": "MLBB_ID_8",
"referenceNumber": "TESTING-001",
"qty": 1,
"inputs": [
{
"name": "id",
"value": "12345678"
}
]
}
Request
Example
POST
/api/v3/checkoutcurl -X POST "https://sandbox-api.bangjeff.com/api/v3/checkout" \
-H "Authorization: {{api_key}}" \
-H "Content-Type: application/json" \
-d '{
"code": "MLBB_ID_8",
"referenceNumber": "TESTING-001",
"qty": 1,
"inputs": [
{
"name": "id",
"value": "12345678"
},
{
"name": "server",
"value": "1234"
}
]
}'
Response
Example
{
"error": false,
"code": 200,
"message": "string",
"data": {
"invoiceNumber": "string",
"nickname": "string",
"inputs": "string",
"qty": 0,
"amount": 0,
"totalAmount": 0,
"status": "SUCCESS" | "PROCESSING" | "REFUNDED",
"description": "string"
}
}