Sorry, we don't support your browser.  Install a modern browser

Plugin API Quantity Problem

Hi Tebex Team,

I have a suggestion regarding the Plugin API, specifically the payment creation route:

Create payment route:
POST https://plugin.tebex.io/payments

Currently, it seems that the route does not support handling quantities properly. Here is an example of the request payload:

{
  "note": "Test Payment",
  "ign": "TripleZone",
  "price": 100.0,
  "packages": [
    {
      "id": 6335214,
      "quantity": 2
    }
  ]
}

When sending a quantity in the request, the API does not process it correctly. To achieve the desired result of, for example, two packages with the ID 6335214, we need to send the post request twice. This approach is inefficient and problematic, especially when dealing with multiple items with varying quantities.

It would be highly beneficial to have this functionality implemented directly within the Create payment route. Supporting quantities in a single request would streamline the process and enhance the API’s usability.

Thank you for considering this suggestion.

Best regards,
TripleZone

2 years ago