Skip to Content
Paycose Docs
Quotes

Quotes

The billing_table object

A billing document laid out as a table: its lines with their discount, tax and total, and the document's totals. GET /quotes/{id}/table returns a quote's. Amounts are in the currency's smallest unit (for example 49900 = 499.00 THB).

Attributes

  • objectstringRequired

    The type of document the table was built from: quote for a quote's table.

  • numberstringRequired

    The document's number.

  • currencystringRequired

    Three-letter ISO 4217 currency code of the document, in lowercase.

  • scaling_factorintegerRequired

    Number of smallest units in one unit of the currency, for example 100 for THB. Divide an amount by it to get major units.

  • statusstringRequired

    The document's status, as the document itself shows it.

  • line_itemsarray of objectsRequired

    The document's lines, in order.

    Show child attributes
    • line_items.descriptionstringRequired

      The line's product name, else its description.

    • line_items.quantityintegerRequired

      Number of units.

    • line_items.unit_amountintegerRequired

      Price of one unit.

    • line_items.subtotalintegerRequired

      The line's amount before discount and tax.

    • line_items.discount_amountintegerRequired

      Discount on the line.

    • line_items.tax_amountintegerRequired

      Tax on the line.

    • line_items.totalintegerRequired

      The line's total: subtotal less discount_amount, plus any tax added on top of the price.

    • line_items.taxesarray of objectsRequired

      The line's taxes, one entry per tax, named after its tax rate.

      Show child attributes
      • line_items.taxes.display_namestringRequired

        The tax's name; empty when the document does not record it.

      • line_items.taxes.percentagenumberRequired

        The tax rate, in percent; 0 when the document does not record it.

      • line_items.taxes.amountintegerRequired

        Amount of the tax.

      • line_items.taxes.inclusivebooleanRequired

        true when the tax is already included in the price; false when it is added on top of it.

  • summaryobjectRequired

    The document's totals.

    Show child attributes
    • summary.subtotalintegerRequired

      The document's subtotal, before discount and before tax added on top of the price.

    • summary.total_discountintegerRequired

      Sum of the document's discounts.

    • summary.total_taxintegerRequired

      Sum of taxes.

    • summary.total_feeintegerRequired

      Sum of fees.

    • summary.shippingintegerRequired
    • summary.totalintegerRequired

      The document's total.

    • summary.taxesarray of objectsRequired

      The lines' taxes summed by name, rate and whether they are included in the price, in the order first seen.

      Show child attributes
      • summary.taxes.display_namestringRequired

        The tax's name; empty when the document does not record it.

      • summary.taxes.percentagenumberRequired

        The tax rate, in percent; 0 when the document does not record it.

      • summary.taxes.amountintegerRequired

        Amount of the tax.

      • summary.taxes.inclusivebooleanRequired

        true when the tax is already included in the price; false when it is added on top of it.

    • summary.feesarray of objectsRequired

      The document's fees.

      Show child attributes
      • summary.fees.display_namestringRequired

        The fee's name.

      • summary.fees.amountintegerRequired

        The fee's amount: fixed_amount when set, else percentage of the document's base amount.

      • summary.fees.percentagenumberNullable

        The fee's rate, in percent; omitted for a fixed fee.

      • summary.fees.fixed_amountintegerNullable

        The fee's fixed amount; omitted for a percentage fee.

    • summary.discountobjectRequiredNullable

      The document's coupon discount: on a quote's table, the names of its discounts joined by commas and their total; null when there is none.

      Show child attributes
      • summary.discount.namestringRequired

        The coupon's name.

      • summary.discount.amountintegerRequired

        Amount of the discount.

      • summary.discount.percentagenumberNullable

        The coupon's percent off; omitted when it takes no percentage off.

      • summary.discount.fixed_amountintegerNullable

        The coupon's amount off; omitted when it takes no fixed amount off.

    • summary.amount_creditedintegerRequired

      For an invoice, what its credit notes credited; 0 on a quote's table.

    • summary.amount_paidintegerRequired

      For an invoice, what has been paid on it; 0 on a quote's table.

    • summary.amount_remainingintegerRequired

      For an invoice, what is still due on it; 0 on a quote's table.

    • summary.amount_withholdingintegerRequired

      Thai withholding tax the customer deducts from the document; 0 without one.

    • summary.withholding_rateintegerRequired

      The withholding percent (1, 2, 3 or 5); 0 without withholding.

    • summary.credit_notesarray of objectsRequired

      For an invoice, the credit notes issued on it; [] on a quote's table.

      Show child attributes
      • summary.credit_notes.idstringRequired

        ID of the credit note.

      • summary.credit_notes.numberstringRequired

        The credit note's number.

      • summary.credit_notes.amountintegerRequired

        The credit note's total.

      • summary.credit_notes.statusstringRequired

        The credit note's status.

    • summary.invoiceobjectNullable

      For a credit note, the invoice it credits; omitted on a quote's table.

      Show child attributes
      • summary.invoice.idstringRequired

        ID of the invoice.

      • summary.invoice.numberstringRequired

        The invoice's number.

      • summary.invoice.totalintegerRequired

        amount_paid + amount_remaining + amount_credited.

      • summary.invoice.amount_creditedintegerRequired

        What the invoice's credit notes credited; canceled ones are left out.

      • summary.invoice.amount_paidintegerRequired

        What has been paid on the invoice.

      • summary.invoice.amount_remainingintegerRequired

        What is still due on the invoice.