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
idstringRequiredUnique identifier for the object.
objectstringRequiredString naming the object's type.
livemodebooleanRequiredtruewhen the object exists in live mode,falsein test mode.createdtimestampRequiredTime the object was created, in Unix seconds.
updatedtimestampRequiredTime the object last changed, in Unix seconds.
numberstringRequiredSequential receipt number assigned when the receipt is created.
invoice_idstringRequiredID of the paid invoice the receipt records.
customer_idstringRequiredID of the customer of the paid invoice.
customer_namestringRequiredCustomer's name, copied from the invoice.
customer_emailstringRequiredCustomer's email address, copied from the invoice.
customer_phonestringRequiredCustomer's phone number, copied from the invoice.
customer_tax_idsarray of objectsRequiredThe customer's tax IDs, copied from the invoice: each
type,valueand, for a Thai tax ID, itsbranch.[]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.typestringRequiredType of the tax ID, as a tax ID type code from
GET /tax_id_types.customer_tax_ids.valuestringRequiredThe tax ID number.
customer_tax_ids.branchstringBranch number of a Thai tax ID, such as
00000for the head office. Omitted when the tax ID has none.
statusenumRequiredStatus of the invoice when the receipt was made. Receipts are made only for paid invoices, so it is
paid.draftShared with invoice statuses; a receipt is never made for a draft invoice.
openShared with invoice statuses; a receipt is never made for an open invoice.
paidThe invoice was paid. Every receipt carries this status.
voidShared with invoice statuses; a receipt is never made for a void invoice.
uncollectibleShared with invoice statuses; a receipt is never made for an uncollectible invoice.
addressesarray of objectsRequiredAddresses copied from the invoice: its billing address first, then its shipping address, each when present.
Show child attributes
addresses.idstringRequiredUnique identifier for the object.
addresses.address_typestringRequiredKind of address:
billingorshipping.billingThe address the invoice is billed to.
shippingThe address the order is shipped to.
addresses.namestringRequiredName of the person or business at the address.
addresses.phonestringRequiredPhone number for the address.
addresses.line1stringRequiredFirst line of the street address.
addresses.line2stringRequiredSecond line of the street address, such as a building or unit.
addresses.citystringRequiredCity, district or town.
addresses.statestringRequiredState, province or region.
addresses.postal_codestringRequiredPostal code.
addresses.countrystringRequiredCountry of the address, as given (for example
TH).
line_itemsarray of objectsRequiredLines copied from the invoice: the product lines, then the fee lines.
Show child attributes
line_items.idstringRequiredUnique identifier for the object.
line_items.objectstringRequiredString naming the object's type.
line_items.product_idstringRequiredID of the product; empty on fee lines.
line_items.product_price_idstringRequiredID of the price billed; empty on fee lines.
line_items.product_reference_idstringOn fee lines, the hosting provider's ID for the fee's product; absent on product lines.
line_items.price_reference_idstringOn fee lines, the hosting provider's ID for the fee's price; absent on product lines.
line_items.sort_orderintegerRequiredPosition of the line among the receipt lines.
line_items.typestringRequiredKind of line:
productorfee.productA product billed at one of its prices.
feeA fee line, added after the product lines; its
metadata.application_fee_idnames the fee.
line_items.descriptionstringRequiredText shown for the line, copied from the invoice; on fee lines, the description of the fee.
line_items.product_namestringRequiredName of the product, or of the fee on fee lines.
line_items.product_descriptionstringRequiredDescription of the product; empty on fee lines.
line_items.product_imagestringRequiredURL of the product image; empty when the product has none or it is not known.
line_items.product_typestringRequiredCadence of the price billed:
onetime,recurringorusage-basedon product lines,feeon fee lines.onetimeThe price is charged once.
recurringThe price recurs every billing interval.
usage-basedThe price is charged by metered usage.
feeThe line is a fee, not a product.
line_items.unit_amountintegerRequiredPrice of one unit, in the smallest currency unit. On a fee line, the fee amount.
line_items.quantityintegerRequiredNumber of units billed. Fee lines have a quantity of
1.line_items.amount_discountintegerRequiredPart of the receipt discount allocated to this line, in the smallest currency unit.
line_items.amount_subtotalintegerRequiredunit_amount×quantity, before discount and tax, in the smallest currency unit.line_items.amount_taxintegerRequiredTax on this line at all its rates, in the smallest currency unit, including tax already inside inclusive prices.
line_items.amount_totalintegerRequiredLine total, in the smallest currency unit:
amount_subtotalminusamount_discount, plus tax that is not inclusive.line_items.currencystringRequiredThree-letter ISO 4217 currency code, in lowercase.
line_items.discountablebooleanRequiredWhether a coupon discount can apply to this line;
falseon fee lines.line_items.prorationbooleanRequiredtruewhen the line is a proration from a subscription change.line_items.period_starttimestampRequiredNullableUnix timestamp in seconds.
line_items.period_endtimestampRequiredNullableUnix timestamp in seconds.
line_items.reference_idstringRequiredThe ID of the matching invoice line at the provider that hosted the invoice; for an invoice Paycose billed itself, an internal reference.
line_items.metadataobjectRequiredKey-value pairs you attach to the object for your own use. Paycose never reads or changes them.
line_items.taxesarray of objectsRequiredTax rates applied to this line, one entry per rate.
Show child attributes
line_items.taxes.idstringRequiredUnique identifier for the object.
line_items.taxes.tax_rate_idstringRequiredID of the tax rate.
line_items.taxes.taxable_amountintegerRequiredAmount 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_amountintegerRequiredTax at this rate, in the smallest currency unit.
line_items.taxes.inclusivebooleanRequiredtruewhen the tax is already included in the line amount;falsewhen it is added on top of it.
discountsarray of objectsRequiredDiscounts copied from the invoice.
Show child attributes
discounts.idstringRequiredUnique identifier for the object.
discounts.coupon_idstringRequiredID of the coupon that gives the discount.
discounts.promotion_code_idstringRequiredID of the promotion code the coupon was redeemed through; empty when the coupon was applied directly.
discounts.namestringRequiredName of the coupon.
discounts.amountintegerRequiredDiscount amount, in the smallest currency unit.
subtotalintegerRequiredSubtotal of the invoice before discount and tax, in the smallest currency unit.
taxintegerRequiredTotal tax on the invoice, in the smallest currency unit.
totalintegerRequiredTotal of the invoice, in the smallest currency unit.
amount_shippingintegerRequiredShipping amount on the invoice, in the smallest currency unit.
amount_discountintegerRequiredTotal discount on the invoice, in the smallest currency unit.
amount_paidintegerRequiredAmount paid, in the smallest currency unit (e.g.
49900= 499.00 THB).payment_method_idstringRequiredID of the invoice's default payment method when the receipt was made; empty when it had none.
paid_attimestampRequiredNullableTime the invoice was paid, in Unix seconds.
currencystringRequiredThree-letter ISO 4217 currency code, in lowercase.
scaling_factorintegerRequiredNumber of smallest currency units in one unit of
currency(10 to the power of the currency's decimal places), e.g.100for THB. Divide an amount by it to get the value in major units.transfer_dataobjectRequiredNullableNot filled on receipts; always
null. Seetransfer_dataon the invoice.Show child attributes
transfer_data.destinationstringRequiredID 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_idstringRequiredID 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.
providerstringRequiredName of the payment provider that hosted the paid invoice, such as
stripe; empty when Paycose billed it.reference_idstringRequiredThe hosting provider's ID for the paid invoice; empty when Paycose billed it.
metadataobjectRequiredKey-value pairs you attach to the object for your own use. Paycose never reads or changes them.
The full customer object when you pass
expand[]=customer; otherwise absent — usecustomer_id.