{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["partial"]},"type":"markdown"},"seo":{"title":"Invoices","description":"Tilia Wallet Developer Documentation","siteUrl":"https://thunes-tilia-docs.redocly.app/","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"invoices","__idx":0},"children":["Invoices"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An invoice is the basis and the record of a Tilia transaction."," ","Tilia supports these invoice types:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Standard invoice"]},": A standard purchase invoice involves collecting funds from the buyer and"," ","transferring them directly to the recipient or seller."," ","Standard invoices work well in standard payment processing applications."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Escrow invoice"]},": An escrow purchase invoice involves collecting funds from the buyer and"," ","holding them in an escrow account, until an agreed-upon condition is met."," ","Once escrowed, funds can either be transferred to the seller, or refunded back to the buyer."," ","Escrow invoices are commonly used with non-fungible tokens (NFTs) and products on a blockchain."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Virtual token purchase"]},": This type of invoice enables a user to purchase tokens"," ","from you for use in other transactions."," ","Tokens can be spent using both standard invoices or escrow invoices."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Virtual token conversion"]},": This is a special type of invoice that can be used to exchange"," ","a user's convertible tokens to fiat currency."," ","Refer to ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"../../core-concepts/virtual-tokens"},"children":["Virtual Tokens"]}," for more information."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Payout"]},": Payout invoices are used to request that funds be transferred from a user's fiat wallet"," ","to an external account (e.g. PayPal.) Refer to ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"../../core-concepts/payouts"},"children":["Payouts"]}," for more information."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tilia supports these transactions from:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["User to user"]},": When the one user pays another user for a good or service."," ","A user-to-user invoice can include user-to-user line items, user-to-integrator line items,"," ","and line items with recipients that are users and a recipient that's the publisher."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["User to integrator"]},": When the user pays you, the publisher, for a good or service"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Both ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Standard"]}," and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Escrow"]}," invoices support transactions in tokens or in fiat currency."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"see-tilia-invoices-in-action","__idx":1},"children":["See Tilia invoices in action"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Our ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/tutorials"},"children":["Tutorials"]}," walk you through the process of creating invoices for many different transaction types."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"invoice-properties","__idx":2},"children":["Invoice properties"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following diagram shows how the contents of an invoice are organized."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/concepts-invoice-contents.d25da5ade62dde77fa4c51cef6aa64608c57eacc697038af58fc8ffd2323cae2.9c1bb791.png","alt":"Invoice elements"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Invoice"]}," contains one or more ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Line items"]},". The Line items of a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["User to user"]}," transaction can contain one or more ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Recipients"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"invoice-heading","__idx":3},"children":["Invoice heading"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Invoice contains information that applies to the entire transaction, such as:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["The invoice's unique ID."]}," You can use this ID to retrieve the invoice."," ","For example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"GET https://invoicing.tilia-inc.com/v2/invoice/{invoice_id}\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["The payer's account ID"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["A description of the transaction overall"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["The payment methods"]}," that provide the funds for the transactions."," ","Payment methods include credit cards, Tilia wallets, and PayPal."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["and other details and metadata about the invoice."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"line-item","__idx":4},"children":["Line item"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each line item contains information about a single item being exchanged in the transaction. Information, such as:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Product identification"]}," such as SKU, product code, purchase price, and other metadata."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Recipient information"]}," (user-to-user invoice only)"," ","In a user-to-user transaction, each user to receive payment from the"," ","transaction is described individually."," ","Line items in a user-to-user invoice can have recipients that are users as well as a recipient that's the publisher."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In a user-to-integrator transaction,"," ","the recipient is the publisher and needs no additional information."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"recipient","__idx":5},"children":["Recipient"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each user to receive funds from the transaction is listed individually in the Line item. This information includes:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Descriptive information"]}," data and metadata that describes the transaction."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Amount information"]}," that describes the currency type and amount the recipient is to receive."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Funding information"]}," that describes the wallet or payment method"," ","that provides the funds, and the account or wallet to receive the funds."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"invoice-lifecycle","__idx":6},"children":["Invoice lifecycle"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A standard invoice moves through the following states: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["open"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["processing"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["success"]},"."," ","The following diagram shows the invoice states as an invoice moves through its lifecycle."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/concepts-invoice-lifecycle.37ecb8c65b89c813789259a5f9a876b8da2207817ed44776eecbae3a08195fbb.9c1bb791.png","alt":"Standard invoice lifecycle"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If an invoice can't be processed, it is assigned a state of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["failed"]},"."," ","This could happen, for example, if the user's credit card was declined."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An unprocessed invoice can also be canceled, in which case it is assigned a state of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cancelled"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After a week, unpaid invoices  sare automatically canceled."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"webhooks","__idx":7},"children":["Webhooks"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can use our webhooks to keep track of an invoice throughout its lifecycle."," ","For information about using webhooks, visit ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/webhooks"},"children":["Webhooks"]},"."]}]},"headings":[{"value":"Invoices","id":"invoices","depth":1},{"value":"See Tilia invoices in action","id":"see-tilia-invoices-in-action","depth":3},{"value":"Invoice properties","id":"invoice-properties","depth":2},{"value":"Invoice heading","id":"invoice-heading","depth":3},{"value":"Line item","id":"line-item","depth":3},{"value":"Recipient","id":"recipient","depth":3},{"value":"Invoice lifecycle","id":"invoice-lifecycle","depth":2},{"value":"Webhooks","id":"webhooks","depth":2}],"frontmatter":{"seo":{"title":"Invoices"}},"lastModified":"2026-02-05T18:12:30.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/core-concepts/invoicing","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}