account_invoices


We utilize a system of invoices. Invoices are created for all subscriptions at the beginning of the billing period, typically monthly. Invoices have a creation date and due date in which they will be paid. Attempts to pay invoices generation transactions. Regardless of what is being billed be a subscription or one time purchase it will always generate an invoice.


Available HTTP and Response Types
GET POST | JSON

3 Methods


  • GET
    https://api.pagely.com/ v1 / account_invoices /all

    Available To Reseller Account

    Description

    curl -H “X-API-KEY:<KEY>” https://api.pagely.com/v1/account_invoices/all?limit=1

    Sample Response

    {"result":2,"count":1,"limit":1,"offset":0,"objects":[{"id":"11111","account_id":"2222","domain_id":"3333","subscription_id":"4444","purchase_id":"0","active":"1","status":"2","re_status":"0","af_status":"0","title":"Pro Hosting - domain: domain.com","body":"Invoice for Managed WordPress Hosting.Regarding domain: domain.com","amount":"35.00","balance":"0.00","re_profit":"15.55","af_profit":"0.00","paid":"1","paid_profile_id":"4444","date_paid":"0","failed_attempts":"0","date_last_failed":"0","date_due":"1345100400","date_added":"1345168060","date_updated":"1345168072","uid":"qeEnwKZI8KGTcDPBrslEKqSEFKxK0hl3wSW8w4At","re_uid":null,"af_uid":null}]}

      Optional Params

      account_id int invoices for a specific account
      date_due_post string
      date_due_pre string
      domain_id int invoices for a specific site
      failed bool 0
      failed_attempts int
      inc_purchase bool include purchase info per invoice
      inc_subscription bool include subscription info per invoice
      limit int 25
      offset int 0
      order_by string id
      order_dir string DESC
      paid bool 0
      reseller_id int invoices for all accounts
  • GET
    https://api.pagely.com/ v1 / account_invoices /single

    Available To Reseller Account

    Description

    Get a single account invoice

    curl -H “X-API-KEY:<key>” https://api.pagely.com/v1/account_invoices/single?id=76854

    Sample Response

    {"id":"76854","account_id":"1111","domain_id":"2222","subscription_id":"0","purchase_id":"127","active":"1","status":"2","re_status":"0","af_status":"0","title":"FTP Access - domain: domain.com","body":"Page.ly invoice for FTP Access.Regarding domain: domain.com","amount":"5.00","balance":"0.00","re_profit":"-0.50","af_profit":"0.00","paid":"1","paid_profile_id":"5400","date_paid":"0","failed_attempts":"0","date_last_failed":"0","date_due":"1345273200","date_added":"1345337696","date_updated":"1345337738","uid":"gQaIeiZ6gUKnHTcGel6Glp8sngbYx2UIZ6lV2Bcf","re_uid":null,"af_uid":null}

      Required Params

      id int
  • POST
    https://api.pagely.com/ v1 / account_invoices /action

    Available To Reseller

    Description

    Charge an invoice

    Sample Response


      Required Params

      action string charge
      id int

      Optional Params

      profile_id int billing profile to use