Payments

get
Get all payments

https://plugin.tebex.io/payments
Retrieve the latest payments (up to a maximum of 100) made on your webstore.
Request
Response
Headers
X-Tebex-Secret
required
string
The secret key of a server.
Query Parameters
limit
optional
number
Limit the amount of payments returned.
200: OK
[
{
"id": 1,
"amount": "4.99",
"date": "2016-01-27T15:40:19+0000",
"currency": {
"iso_4217": "GBP",
"symbol": "£"
},
"player": {
"id": 1,
"name": "Notch",
"uuid": "365bfa21803249ee9b634fe890c9d43f"
}
},
{
"id": 2,
"amount": "9.99",
"date": "2016-01-18T11:37:38+0000",
"currency": {
"iso_4217": "GBP",
"symbol": "£"
},
"player": {
"id": 2,
"name": "7n",
"uuid": "ef01f2da1b284ad6ba8ba2aaf4432e22"
}
}
]

get
Retrieve a payment

https://plugin.tebex.io/payments/{transaction}
Retrieve a payment made on your webstore by transaction ID.
Request
Response
Path Parameters
transaction
required
string
The transaction ID of a payment.
Headers
X-Tebex-Secret
required
string
The secret key of a server.
200: OK
{
"id": 1,
"amount": "4.99",
"status": "Complete",
"date": "2016-01-27T15:40:19+0000",
"currency": {
"iso_4217": "GBP",
"symbol": "£"
},
"player": {
"id": 1,
"name": "Notch",
"uuid": "365bfa21803249ee9b634fe890c9d43f"
},
"packages": [
{
"id": 100001,
"name": "Test Package"
},
{
"id": 100002,
"name": "Test Package 2"
}
]
}

get
Get the required payment fields for a package

https://plugin.tebex.io/payments/fields/{package}
Returns an array of fields (custom variables, etc) required to be entered for a manual payment to be created for a package.
Request
Response
Path Parameters
package
required
string
The ID of a package.
Headers
X-Tebex-Secret
required
string
The secret key of a server.
200: OK
[
{
"name": "price",
"value": "Custom Price",
"type": "numeric"
},
{
"name": "server",
"description": "Select a server to run commands on",
"type": "dropdown",
"options": [
{
"label": "Test Store",
"value": 7
},
{
"label": "Empty Server",
"value": 21
}
]
},
{
"name": "uname",
"description": "uname",
"type": "username",
"options": false
},
{
"name": "global",
"description": "Global level",
"type": "numeric",
"options": false
}
]

post
Create a payment

https://plugin.tebex.io/payments
Create a manual payment in the same way as is possible from the control panel. One or more packages should be added to the payment, and the package commands will be processed in the same way as would be for a standard manual payment.
Request
Response
Headers
X-Tebex-Secret
required
string
The secret key of a server.
Body Parameters
note
optional
string
A note to assign to the payment.
packages[][options]
required
object
An object of key => value pairs for the required option fields (as retrieved from the /fields endpoint).
packages[][id]
required
number
The ID of the package.
packages
required
array
Array of packages to add to the payment.
price
required
integer
The price of the payment.
ign
required
string
The username of the user to apply the payment to.
204: No Content

put
Update a payment

https://plugin.tebex.io/payments/{transaction}
Update a payment.
Request
Response
Path Parameters
transaction
required
string
The transaction ID of the payment.
Headers
X-Tebex-Secret
required
string
The secret key of a server.
Body Parameters
username
optional
string
The username that the payment should be applied to.
status
optional
string
The status of the payment, either 'complete', 'chargeback' or 'refund'.
204: No Content

post
Create a payment note

https://plugin.tebex.io/payments/{transaction}/note
Create a note against a payment.
Request
Response
Path Parameters
transaction
required
string
The transaction ID of the payment.
Headers
X-Tebex-Secret
required
string
The secret key of a server.
Body Parameters
note
optional
string
The note to add against the payment.
201: Created