Skip to Content
Paycose Docs
Receipts

Receipts

The receipt object

A receipt is the record of a paid invoice: a numbered copy of its lines, discounts, addresses and totals, made once when the invoice is paid. Receipts never change.

Attributes

  • idstringRequired

    Unique identifier for the object.

  • objectstringRequired

    String naming the object's type.

  • livemodebooleanRequired

    true when the object exists in live mode, false in test mode.

  • createdtimestampRequired

    Time the object was created, in Unix seconds.

  • updatedtimestampRequired

    Time the object last changed, in Unix seconds.

  • numberstringRequired

    Sequential receipt number assigned when the receipt is created.

  • invoice_idstringRequired

    ID of the paid invoice the receipt records.

  • customer_idstringRequired

    ID of the customer of the paid invoice.

  • customer_namestringRequired

    Customer's name, copied from the invoice.

  • customer_emailstringRequired

    Customer's email address, copied from the invoice.

  • customer_phonestringRequired

    Customer's phone number, copied from the invoice.

  • customer_tax_idsarray of objectsRequired

    The customer's tax IDs, copied from the invoice: each type, value and, for a Thai tax ID, its branch. [] when the customer has none, and on a receipt made before tax IDs were recorded, which the receipt PDF and dashboard fill from the customer as it is now.

    Show child attributes
    • customer_tax_ids.typestringRequired

      Type of the tax ID, as a tax ID type code from GET /tax_id_types.

    • customer_tax_ids.valuestringRequired

      The tax ID number.

    • customer_tax_ids.branchstring

      Branch number of a Thai tax ID, such as 00000 for the head office. Omitted when the tax ID has none.

  • statusenumRequired

    Status of the invoice when the receipt was made. Receipts are made only for paid invoices, so it is paid.

    • draft

      Shared with invoice statuses; a receipt is never made for a draft invoice.

    • open

      Shared with invoice statuses; a receipt is never made for an open invoice.

    • paid

      The invoice was paid. Every receipt carries this status.

    • void

      Shared with invoice statuses; a receipt is never made for a void invoice.

    • uncollectible

      Shared with invoice statuses; a receipt is never made for an uncollectible invoice.

  • addressesarray of objectsRequired

    Addresses copied from the invoice: its billing address first, then its shipping address, each when present.

    Show child attributes
    • addresses.idstringRequired

      Unique identifier for the object.

    • addresses.address_typestringRequired

      Kind of address: billing or shipping.

      • billing

        The address the invoice is billed to.

      • shipping

        The address the order is shipped to.

    • addresses.namestringRequired

      Name of the person or business at the address.

    • addresses.phonestringRequired

      Phone number for the address.

    • addresses.line1stringRequired

      First line of the street address.

    • addresses.line2stringRequired

      Second line of the street address, such as a building or unit.

    • addresses.citystringRequired

      City, district or town.

    • addresses.statestringRequired

      State, province or region.

    • addresses.postal_codestringRequired

      Postal code.

    • addresses.countrystringRequired

      Country of the address, as given (for example TH).

  • line_itemsarray of objectsRequired

    Lines copied from the invoice: the product lines, then the fee lines.

    Show child attributes
    • line_items.idstringRequired

      Unique identifier for the object.

    • line_items.objectstringRequired

      String naming the object's type.

    • line_items.product_idstringRequired

      ID of the product; empty on fee lines.

    • line_items.product_price_idstringRequired

      ID of the price billed; empty on fee lines.

    • line_items.product_reference_idstring

      On fee lines, the hosting provider's ID for the fee's product; absent on product lines.

    • line_items.price_reference_idstring

      On fee lines, the hosting provider's ID for the fee's price; absent on product lines.

    • line_items.sort_orderintegerRequired

      Position of the line among the receipt lines.

    • line_items.typestringRequired

      Kind of line: product or fee.

      • product

        A product billed at one of its prices.

      • fee

        A fee line, added after the product lines; its metadata.application_fee_id names the fee.

    • line_items.descriptionstringRequired

      Text shown for the line, copied from the invoice; on fee lines, the description of the fee.

    • line_items.product_namestringRequired

      Name of the product, or of the fee on fee lines.

    • line_items.product_descriptionstringRequired

      Description of the product; empty on fee lines.

    • line_items.product_imagestringRequired

      URL of the product image; empty when the product has none or it is not known.

    • line_items.product_typestringRequired

      Cadence of the price billed: onetime, recurring or usage-based on product lines, fee on fee lines.

      • onetime

        The price is charged once.

      • recurring

        The price recurs every billing interval.

      • usage-based

        The price is charged by metered usage.

      • fee

        The line is a fee, not a product.

    • line_items.unit_amountintegerRequired

      Price of one unit, in the smallest currency unit. On a fee line, the fee amount.

    • line_items.quantityintegerRequired

      Number of units billed. Fee lines have a quantity of 1.

    • line_items.amount_discountintegerRequired

      Part of the receipt discount allocated to this line, in the smallest currency unit.

    • line_items.amount_subtotalintegerRequired

      unit_amount × quantity, before discount and tax, in the smallest currency unit.

    • line_items.amount_taxintegerRequired

      Tax on this line at all its rates, in the smallest currency unit, including tax already inside inclusive prices.

    • line_items.amount_totalintegerRequired

      Line total, in the smallest currency unit: amount_subtotal minus amount_discount, plus tax that is not inclusive.

    • line_items.currencystringRequired

      Three-letter ISO 4217 currency code, in lowercase.

    • line_items.discountablebooleanRequired

      Whether a coupon discount can apply to this line; false on fee lines.

    • line_items.prorationbooleanRequired

      true when the line is a proration from a subscription change.

    • line_items.period_starttimestampRequiredNullable

      Unix timestamp in seconds.

    • line_items.period_endtimestampRequiredNullable

      Unix timestamp in seconds.

    • line_items.reference_idstringRequired

      The ID of the matching invoice line at the provider that hosted the invoice; for an invoice Paycose billed itself, an internal reference.

    • line_items.metadataobjectRequired

      Key-value pairs you attach to the object for your own use. Paycose never reads or changes them.

    • line_items.taxesarray of objectsRequired

      Tax rates applied to this line, one entry per rate.

      Show child attributes
      • line_items.taxes.idstringRequired

        Unique identifier for the object.

      • line_items.taxes.tax_rate_idstringRequired

        ID of the tax rate.

      • line_items.taxes.taxable_amountintegerRequired

        Amount the rate applies to, in the smallest currency unit. For an inclusive rate this is the line amount without the tax inside it.

      • line_items.taxes.tax_amountintegerRequired

        Tax at this rate, in the smallest currency unit.

      • line_items.taxes.inclusivebooleanRequired

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

  • discountsarray of objectsRequired

    Discounts copied from the invoice.

    Show child attributes
    • discounts.idstringRequired

      Unique identifier for the object.

    • discounts.coupon_idstringRequired

      ID of the coupon that gives the discount.

    • discounts.promotion_code_idstringRequired

      ID of the promotion code the coupon was redeemed through; empty when the coupon was applied directly.

    • discounts.namestringRequired

      Name of the coupon.

    • discounts.amountintegerRequired

      Discount amount, in the smallest currency unit.

  • subtotalintegerRequired

    Subtotal of the invoice before discount and tax, in the smallest currency unit.

  • taxintegerRequired

    Total tax on the invoice, in the smallest currency unit.

  • totalintegerRequired

    Total of the invoice, in the smallest currency unit.

  • amount_shippingintegerRequired

    Shipping amount on the invoice, in the smallest currency unit.

  • amount_discountintegerRequired

    Total discount on the invoice, in the smallest currency unit.

  • amount_paidintegerRequired

    Amount paid, in the smallest currency unit (e.g. 49900 = 499.00 THB).

  • payment_method_idstringRequired

    ID of the invoice's default payment method when the receipt was made; empty when it had none.

  • paid_attimestampRequiredNullable

    Time the invoice was paid, in Unix seconds.

  • currencystringRequired

    Three-letter ISO 4217 currency code, in lowercase.

  • scaling_factorintegerRequired

    Number of smallest currency units in one unit of currency (10 to the power of the currency's decimal places), e.g. 100 for THB. Divide an amount by it to get the value in major units.

  • transfer_dataobjectRequiredNullable

    Not filled on receipts; always null. See transfer_data on the invoice.

    Show child attributes
    • transfer_data.destinationstringRequired

      ID of the connected account (acct_…) the payment is for. A document created before a destination had to be a connected account may still show your own account or a customer ID.

    • transfer_data.balance_idstringRequired

      ID of the balance the payment credits. For a connected-account destination it is your own balance in the document's currency: the payment settles to you and the connected account's share is recorded as owed to it.

  • providerstringRequired

    Name of the payment provider that hosted the paid invoice, such as stripe; empty when Paycose billed it.

  • reference_idstringRequired

    The hosting provider's ID for the paid invoice; empty when Paycose billed it.

  • metadataobjectRequired

    Key-value pairs you attach to the object for your own use. Paycose never reads or changes them.

  • customerobject (customer)NullableExpandable

    The full customer object when you pass expand[]=customer; otherwise absent — use customer_id.