{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["openapiLink"]},"type":"markdown"},"seo":{"title":"Multi-Seller Purchase","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":"multi-seller-purchase","__idx":0},"children":["Multi-Seller Purchase"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can use Tilia to process simple transactions between a buyer and a single seller, such as a ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/guides/user-to-integrator"},"children":["user-to-integrator"]}," or ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/guides/user-to-user"},"children":["user-to-user"]}," purchase."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also build more complex transactions involving multiple sellers. These transactions follow the same basic flow as other transactions, although the invoice is built slightly differently. The example below is an invoice in which the buyer is purchasing an item from one of your sellers, and you are taking a fee for the transaction."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The first line item has a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transaction_type"]}," of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_to_user"]}," and handles information tied to the seller. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recipients"]}," array contains the seller's wallet information (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["destination_wallet_id"]},") along with the publisher wallet you wish to use in processing the transaction (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["source_wallet_id"]},"). This line item also contains information about the seller's product."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The second line item has a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transaction_type"]}," of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_to_integrator"]}," and handles information tied to your transaction fee."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"request-body","__idx":1},"children":["Request body"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"account_id\": \"<buyer_account_id>\",\n  \"reference_type\": \"<your_reference_type>\",\n  \"reference_id\": \"<your_reference_id>\",\n  \"description\": \"<your_product_description>\",\n  \"payment_methods\": [\n  {\n    \"payment_method_id\": \"<buyer_payment_method_id>\"\n  }\n  ],\n  \"line_items\": [\n    {\n      \"amount\": 550,\n      \"currency\": \"USD\",\n      \"transaction_type\": \"user_to_user\",\n      \"reference_type\": \"<seller_product_info>\",\n      \"reference_id\": \"<seller_product_id>\",\n      \"recipients\": [\n        {\n          \"amount\": 500,\n          \"currency\": \"USD\",\n          \"source_wallet_id\":\"<your_integrator_wallet_id>\",\n          \"destination_wallet_id\": \"<seller_USD_wallet_id>\"\n        }\n      ]\n    },\n  {\n      \"amount\": 50,\n      \"currency\": \"USD\",\n      \"transaction_type\": \"user_to_integrator\",\n      \"reference_type\": \"<your_reference_info>\",\n      \"reference_id\": \"<your_reference_id>\"\n    },\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For detailed information about each of these properties, refer to the ",{"$$mdtype":"Tag","name":"OpenapiLink","attributes":{"link":"invoicing/openapi","text":"Invoicing API"},"children":[]}," documentation."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"sample-response","__idx":2},"children":["Sample response"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A successful request returns the HTTP ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["201 Created"]}," status code along with a JSON response body containing the invoice details."]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":["View Response"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"status\": \"Success\",\n    \"message\": [],\n    \"codes\": [],\n    \"payload\": {\n        \"invoice_id\": \"6672ace6-c3bc-468a-8b3f-16c0ee9d1ed9\",\n        \"account_id\": \"08ef3dc4-e760-4570-b13a-0f9dbdb472b2\",\n        \"reference_type\": \"product_purchase_id\",\n        \"reference_id\": \"purchase_id123\",\n        \"state\": \"open\",\n        \"description\": \"A description of the product\",\n        \"metadata\": null,\n        \"summary\": {\n            \"total_amount\": 550,\n            \"currency\": \"USD\",\n            \"display_amount\": \"USD 5.50\"\n        },\n        \"created\": \"0001-01-01T00:00:00Z\",\n        \"updated\": \"0001-01-01T00:00:00Z\",\n        \"payment_methods\": {\n            \"36ad2d23-ad8d-4264-be68-2e9eb19c4f96\": {\n                \"payment_method_id\": \"36ad2d23-ad8d-4264-be68-2e9eb19c4f96\",\n                \"authorized_amount\": 550,\n                \"currency\": \"USD\",\n                \"display_amount\": \"USD 5.50\",\n                \"subitems\": {}\n            }\n        },\n        \"line_items\": {\n            \"67982820-187c-4157-b966-113353e4bfec\": {\n                \"line_item_id\": \"67982820-187c-4157-b966-113353e4bfec\",\n                \"product_sku\": \"\",\n                \"amount\": 500,\n                \"currency\": \"USD\",\n                \"display_amount\": \"USD 5.00\",\n                \"reference_type\": \"user_product_id\",\n                \"reference_id\": \"product123\",\n                \"transaction_type\": \"user_to_user\",\n                \"description\": \"\",\n                \"metadata\": null,\n                \"subitems\": {\n                    \"54a7fc29-bf5f-40d3-ac47-1426d96891f0\": {\n                        \"subitem_id\": \"54a7fc29-bf5f-40d3-ac47-1426d96891f0\",\n                        \"amount\": 500,\n                        \"currency\": \"USD\",\n                        \"display_amount\": \"USD 5.00\",\n                        \"reference_type\": \"invoicing.invoice_line_item_v2.line_item_id\",\n                        \"reference_id\": \"67982820-187c-4157-b966-113353e4bfec\",\n                        \"subitem_type\": \"user_recipient\",\n                        \"description\": \"\",\n                        \"metadata\": null,\n                        \"source_account_id\": \"bd1ae1e9-e857-4acb-af0a-ec0d1b2bcd62\",\n                        \"source_payment_method_id\": \"\",\n                        \"source_wallet_id\": \"73f450d4-0f5d-4a9f-93f6-3be0631d7389\",\n                        \"destination_account_id\": \"682c8d3e-75ad-4d10-8b1a-1e15768e5d61\",\n                        \"destination_payment_method_id\": \"\",\n                        \"destination_wallet_id\": \"9e369d95-deba-4c5f-b8b8-83719e62f335\"\n                    }\n                }\n            },\n            \"85f3cbfc-23e7-421a-8870-9bded0752bad\": {\n                \"line_item_id\": \"85f3cbfc-23e7-421a-8870-9bded0752bad\",\n                \"product_sku\": \"\",\n                \"amount\": 50,\n                \"currency\": \"USD\",\n                \"display_amount\": \"USD 0.50\",\n                \"reference_type\": \"transaction_fee\",\n                \"reference_id\": \"fee_id\",\n                \"transaction_type\": \"user_to_integrator\",\n                \"description\": \"\",\n                \"metadata\": null,\n                \"subitems\": {}\n            }\n        },\n        \"subitems\": {}\n    }\n}\n","lang":"json"},"children":[]}]}]},"headings":[{"value":"Multi-Seller Purchase","id":"multi-seller-purchase","depth":1},{"value":"Request body","id":"request-body","depth":4},{"value":"Sample response","id":"sample-response","depth":4}],"frontmatter":{"seo":{"title":"Multi-Seller Purchase"}},"lastModified":"2026-02-05T18:12:30.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/multi-seller-transaction","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}