Get Product Variants

The following is an API endpoint to get information about our Product Variants.

Used to get information of our product variants.

Endpoint

/api/v4/variant

Headers

  • Name
    X-Client-Id
    Type
    uuid
    Description

    API Key (provided by BANGJEFF or retrieve from our Reseller Portal).

    Please refer to Authentication for detail

  • Name
    X-Request-Time
    Type
    YYYY-MM-DDTHH:mm:ssZ
    Description

    Request Time should be ISO 8601 and will be used to generate Signature.

    Please refer to Authentication for detail

  • Name
    X-Signature
    Type
    string
    Description

    Signature Generated using SHA-256 algorithm.

    Please refer to Authentication for detail

  • Name
    Content-Type
    Type
    application/json
    Description

    Content type application/json

Body

  • Name
    region
    Type
    string
    Description

    Please refer to Available Region

  • Name
    productCode
    Type
    string
    Description

    Product Code from BANGJEFF

    Please refer to Get Products

Request

Example

POST
/api/v4/balance
curl --location --request POST 'https://sandbox-api.bangjeff.com/api/v4/variant' \
  --header 'X-Client-Id: {{api_key}}' \
  --header 'X-Request-Time: {{request_time}}' \
  --header 'X-Signature: {{signature}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "region": "ID",
    "productCode": "MLBB"
  }'

Response

Example

{
  "rc": "00", // Check Response Code List
  "message": "Success", // Check Response Message List
  "data": [
    {
      "code": "MLBB_ID_5",
      "name": "5 (5+0) Diamonds",
      "status": "ACTIVE", // ACTIVE, INACTIVE
      "price": {
        "currency": "IDR",
        "value": 1423
      },
      "duration": 0 // (Minutes) 0 = instant, 1 = 1 minutes
    },
    {
      "code": "MLBB_ID_10",
      "name": "10 (9+1) Diamonds",
      "status": "INACTIVE",
      "price": {
        "currency": "IDR",
        "value": 2885
      },
      "duration": 10
    }
  ]
}