Gift Cards

Get all gift cards

GET https://plugin.tebex.io/gift-cards

Return an array of all gift cards on your account.

Headers

NameTypeDescription

X-Tebex-Secret

string

The secret key of a server.

{
  "data": [
    {
      "id": 38,
      "code": "165261930219",
      "balance": {
        "starting": "25.00",
        "remaining": "12.60",
        "currency": "GBP"
      },
      "note": "Created for player ABC",
      "void": false
    }
  ]
}

Retrieve a gift card

GET https://plugin.tebex.io/gift-cards/{id}

Retrieve a gift card by ID.

Path Parameters

NameTypeDescription

id

string

The ID of a gift card.

Headers

NameTypeDescription

X-Tebex-Secret

string

The secret key of a server.

{
  "data": {
    "id": 23,
    "code": "094104746161",
    "balance": {
      "starting": "20.00",
      "remaining": "12.00",
      "currency": "GBP"
    },
    "note": "",
    "void": false
  }
}

Lookup a gift card by code

GET https://plugin.tebex.io/gift-cards/lookup/{code}

Retrieve a gift card by its code.

Path Parameters

NameTypeDescription

code

string

The code of a gift card.

Headers

NameTypeDescription

X-Tebex-Secret

string

The secret key of a server.

{
  "data": {
    "id": 23,
    "code": "094104746161",
    "balance": {
      "starting": "20.00",
      "remaining": "12.00",
      "currency": "GBP"
    },
    "note": "",
    "void": false
  }
}

Create a gift card

POST https://plugin.tebex.io/gift-cards

Create a gift card of a specified amount.

Headers

NameTypeDescription

X-Tebex-Secret

string

The secret key of a server.

Request Body

NameTypeDescription

expires_at

string

The gift card's expiry date in the format yyyy-mm-dd hh:mm:ss.

note

string

The note that will be stored against the gift card.

amount

number

The currency value of the gift card should have upon creation.

{
  "data": {
    "id": 40,
    "code": "094006746161",
    "balance": {
      "starting": "60.00",
      "remaining": "60.00",
      "currency": "GBP"
    },
    "note": "My note",
    "void": false
  }
}

Void a gift card

DELETE https://plugin.tebex.io/gift-cards/{id}

Void a gift card to prevent it from being used.

Path Parameters

NameTypeDescription

id

string

The ID of the gift card.

Headers

NameTypeDescription

X-Tebex-Secret

string

The secret key of a server.

{
  "data": {
    "id": 23,
    "code": "094104746161",
    "balance": {
      "starting": "20.00",
      "remaining": "12.00",
      "currency": "GBP"
    },
    "note": "",
    "void": true
  }
}

Top-up a gift card

PUT https://plugin.tebex.io/gift-cards/{id}

Top-up (Add more credit) to an existing gift card.

Path Parameters

NameTypeDescription

id

string

The ID of the gift card.

Headers

NameTypeDescription

X-Tebex-Secret

string

The secret key of a server.

Request Body

NameTypeDescription

amount

string

The currency value the gift card should have added to it.

{
  "data": {
    "id": 40,
    "code": "094006746161",
    "balance": {
      "starting": "10.00",
      "remaining": "40.00",
      "currency": "GBP"
    },
    "note": "",
    "void": false
  }
}

Last updated