Plugin API
HomeGitHub
  • Welcome
  • Rate Limits
  • Authentication
  • Error Handling
  • Official Plugins
  • RPC
  • Endpoints
    • Information
    • Command Queue
    • Listing
    • Packages
    • Community Goals
    • Payments
    • Checkout
    • Gift Cards
    • Coupons
    • Bans
    • Sales
    • Player Lookup
    • Customer Purchases
Powered by GitBook
On this page
  • Get all gift cards
  • Retrieve a gift card
  • Lookup a gift card by code
  • Create a gift card
  • Void a gift card
  • Top-up a gift card

Was this helpful?

  1. Endpoints

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.

{
  "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

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.

{
  "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

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.

{
  "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

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.

{
  "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

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.

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

Last updated 1 year ago

Was this helpful?