Skip to content

Bill

Bill object description and API calls for work with user's bills.


Bill object

{
    "order_id": 63602,
    "created": "2012-03-05 11:55:03",
    "sum": 150.0,
    "status": "created",
    "positions": ["The subscription fee for the services of Account W3"],
    "link": "http://bill.navixy.com/xK1QEYK"
}
  • order_id - int. Unique bill id.
  • created - date/time. When the bill created.
  • sum - float. A bill sum in default currency of the panel.
  • status - enum. Bill order status. Can be one of:
    • created – but not settled.
    • settled.
    • canceled.
  • positions - string array. List of position names. Usually contains one element for a bill.
  • link - string. URL to order.

API actions

API path: /bill.

create

Creates a new bill for the user.

required sub-user rights: payment_create.

parameters

name description type
payer Some payer description. string
sum A bill sum in default currency of the panel. double

example

curl -X POST 'https://api.navixy.com/v2/bill/create' \
    -H 'Content-Type: application/json' \ 
    -d '{"hash": "22eac1c27af4be7b9d04da2ce1af111b", "payer": "Jon Doe", "sum": 100.0}'

response

{
    "success": true,
    "value": 6421
}
  • value - int. Created bill id.

errors

  • 222 – Plugin not found - when plugin 29 not available for user.

list

Shows list of bills with their parameters in array.

required sub-user rights: payment_create.

parameters

name description type
limit Optional. A maximum number of bills in list. Maximum and default is 10 000. int
offset Optional. Get bills starting from offset. Default 0. int

examples

curl -X POST 'https://api.navixy.com/v2/bill/list' \
    -H 'Content-Type: application/json' \ 
    -d '{"hash": "22eac1c27af4be7b9d04da2ce1af111b"}'
https://api.navixy.com/v2/bill/list?hash=a6aa75587e5c59c32d347da438505fc3

response

{
    "success": true,
    "count": 7,
    "bills": [{
      "order_id": 63602,
      "created": "2012-03-05 11:55:03",
      "sum": 150.0,
      "status": "created",
      "positions": ["The subscription fee for the services of Account W3"],
      "link": "http://bill.navixy.com/xK1QEYK"
    }]
}
  • count - int. Total number of bills.
  • bills - array of objects. A list of bill objects.

If bill created using /bill/create call then positions will contain exactly one element.

For Standalone version base part of link may be changed by billing.orders.baseUrl config option.

errors

  • 222 – Plugin not found - when plugin 29 not available for user.

Last update: May 27, 2021