Gift Cards

Get all gift cards

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

Return an array of all gift cards on your account.

Headers

Name
Type
Description

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

Name
Type
Description

id

string

The ID of a gift card.

Headers

Name
Type
Description

X-Tebex-Secret

string

The secret key of a server.

Lookup a gift card by code

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

Retrieve a gift card by its code.

Path Parameters

Name
Type
Description

code

string

The code of a gift card.

Headers

Name
Type
Description

X-Tebex-Secret

string

The secret key of a server.

Create a gift card

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

Create a gift card of a specified amount.

Headers

Name
Type
Description

X-Tebex-Secret

string

The secret key of a server.

Request Body

Name
Type
Description

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.

Void a gift card

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

Void a gift card to prevent it from being used.

Path Parameters

Name
Type
Description

id

string

The ID of the gift card.

Headers

Name
Type
Description

X-Tebex-Secret

string

The secret key of a server.

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

Name
Type
Description

id

string

The ID of the gift card.

Headers

Name
Type
Description

X-Tebex-Secret

string

The secret key of a server.

Request Body

Name
Type
Description

amount

string

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

Last updated

Was this helpful?