{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["openapiLink"]},"type":"markdown"},"seo":{"title":"Tutorial: Make standard transactions","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":"tutorial-make-standard-transactions","__idx":0},"children":["Tutorial: Make standard transactions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In this tutorial, you create an invoice and complete a transaction between users"," ","using tokens."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Allow about 10 minutes to complete this tutorial."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Transactions made in your application are described by invoices."," ","Just as in a real-world transaction, Tilia's invoices contain"," ","information about the goods or services being exchanged and the participants in the transaction."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following diagram shows the process of a transaction between users using tokens."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/tutorial-user-to-user-token-transaction-flow.c6e9c83052b87a9664c5a5b8e690a7582eaee20025bdc4e2c5b1013f3c623688.9c1bb791.png","alt":"User-to-user transaction process"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The exercises in this tutorial start after the user selects an item in the application."," ","The application takes the necessary information about the payer, the recipient,"," ","and the details from the payer's catalog selections to create the transaction's invoice."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A new invoice for a user-to-user, transaction that's using tokens needs"," ","at least the following information:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Product information that describes what's being exchanged for tokens"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Payer's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["account_id"]},": from the paying user's account information"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["source_wallet_id"]},": the wallet ID of the payer's wallet"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["destination_account_id"]},": the recipient's account ID, retrieved from the recipient or catalog."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["destination_wallet_id"]},": the recipient's wallet to receive the tokens from the sale."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In an actual implementation, the application provides this information; so it's simulated in this tutorial."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"api-operations-in-this-tutorial","__idx":1},"children":["API operations in this tutorial"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Tutorial interaction"},"children":["Tutorial interaction"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Tilia APIs used"},"children":["Tilia APIs used"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Scope"},"children":["Scope"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#create-a-user-to-user-invoice"},"children":["Create a user-to-user invoice"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"OpenapiLink","attributes":{"link":"invoicing/openapi/invoice/createinvoice","text":"Create a new invoice"},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["write_invoices"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#pay-a-user-to-user-invoice"},"children":["Pay a user-to-user-invoice"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["{% openapiLink text=\"Pay invoice link=\"invoicing/openapi/invoice/payinvoice\" /%}"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["write_invoices"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"to-complete-this-tutorial","__idx":2},"children":["To complete this tutorial"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial uses the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Explore Tilia transactions"]}," collection from the"," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://www.postman.com/tilia-docs-testing/workspace/get-started-using-tilia-services/overview"},"children":["shared Postman workspace"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["To complete this tutorial successfully:"]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Make sure the software described in ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/tutorials/tutorial_get_started"},"children":["Get started with the tutorials"]}," ","has been installed on your system and configured."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Make sure that you have initialized the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Tilia Client Info"]}," environment variables by running the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/tutorials/user-accounts"},"children":["User account tutorials"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In Postman:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Open the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Tilia tutorial workspace"]}," you created in ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/tutorials/tutorial_get_started"},"children":["Get started with the tutorials"]}," for this tutorial."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Make sure you have the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Explore Tilia transactions"]}," collection forked to your ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Tilia tutorial workspace"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Make sure that you've selected the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Tilia Client Info"]}," environment and confirmed that it has:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Your Tilia developer credentials."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All of the user-related environment variables with ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Current values"]}," defined."]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In your ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Tilia tutorial workspace"]},", open the list of ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Collections"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the list of ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Collections"]},", expand the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Explore Tilia transactions"]}," collection."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If it's been more than an hour since you last got an access token for this collection,"," ","get a new one as described in ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/tutorials/transactions#get-an-access-token"},"children":["Tutorial: Transactions overview"]},","," ","and then return to continue here."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-a-user-to-user-invoice","__idx":3},"children":["Create a user-to-user invoice"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This exercise creates an invoice for one user to sell something to another."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To create a user-to-user invoice, collect or create the following information:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A summary description of the invoice"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The product information"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["payer's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["account_id"]},": from the paying user's account information"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["source_wallet_id"]},": the wallet ID of the payer's wallet."," ","If omitted, the default wallet for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["account_id"]}," is used."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["destination_account_id"]},": the recipient's account ID, retrieved from the recipient or catalog."," ","If this property is used, the default wallet is used."," ","If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["destination_account_id"]}," is used, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["destination_wallet_id"]}," can be omitted."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["destination_wallet_id"]},": the recipient's wallet to receive the tokens from the sale."," ","This is the value used in this exercise."," ","If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["destination_wallet_id"]}," is used, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["destination_account_id"]}," can be omitted."]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n   \"account_id\": \"{{payers_account_id}}\",\n   \"description\": \"Digital product order\",\n   \"line_items\": [\n     {\n       \"amount\": 200000,\n       \"currency\": \"TIL\",\n       \"transaction_type\": \"user_to_user\",\n       \"description\": \"In-game digital bundle\",\n       \"recipients\": [\n         {\n           \"source_wallet_id\": \"{{payers_wallet_id}}\",\n           \"destination_wallet_id\": \"{{recipients_wallet_id}}\"\n         }\n       ]\n     }\n   ]\n}\n\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["To send this information and create a new user-to-user invoice, in Postman:"]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Explore Tilia transactions"]}," collection, in the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Standard transaction"]}," folder,"," ","open the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create a user-to-user invoice"]}," request."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the request ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Body"]}," field, notice the invoice information described previously."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create a user-to-user invoice"]}," request, choose ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Send"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After the response returns, open the response ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Body"]}," tab below the request to review the response body details."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A typical response body looks like the following."]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":["Show a typical response body with the transaction info."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"status\": \"Success\",\n    \"message\": [],\n    \"codes\": [],\n    \"payload\": {\n        \"invoice_id\": \"57592e8c-df91-4c7d-aa5e-c62eabe32a83\",\n        \"account_id\": \"acct_2Ym84qq2ieeaZkOHUM1xeF8uJtu\",\n        \"invoice_type\": \"user_purchase_virtual\",\n        \"reference_type\": \"\",\n        \"reference_id\": \"\",\n        \"state\": \"OPEN\",\n        \"description\": \"Digital product order\",\n        \"metadata\": {},\n        \"summary\": {\n            \"total_amount\": 200000,\n            \"total_amount_usd\": 2000,\n            \"currency\": \"TIL\",\n            \"display_amount\": \"TIL 200000\",\n            \"subtotal\": {\n                \"total_amount\": 200000,\n                \"total_amount_usd\": 2000,\n                \"currency\": \"TIL\",\n                \"display_amount\": \"TIL 200000\"\n            },\n            \"tax\": {\n                \"total_amount\": 0,\n                \"total_amount_usd\": 0,\n                \"currency\": \"TIL\",\n                \"display_amount\": \"TIL 0.00\"\n            },\n            \"payment_breakdown\": [],\n            \"tax_calculation\": \"\"\n        },\n        \"failure_code\": \"\",\n        \"failure_reason\": \"\",\n        \"created\": \"0001-01-01T00:00:00Z\",\n        \"updated\": \"0001-01-01T00:00:00Z\",\n        \"payment_methods\": {\n            \"41a64965-f990-4323-8781-ec56c5e365fc\": {\n                \"provider\": \"wallet\",\n                \"payment_method_id\": \"41a64965-f990-4323-8781-ec56c5e365fc\",\n                \"authorized_amount\": 200000,\n                \"currency\": \"TIL\",\n                \"display_string\": \"Standard TIL wallet\",\n                \"display_amount\": \"TIL 200000\",\n                \"tags\": {\n                    \"standard\": {\n                        \"tag_id\": \"\",\n                        \"tag\": \"\"\n                    }\n                },\n                \"subitems\": {}\n            }\n        },\n        \"line_items\": {\n            \"3fa9fc37-33c8-4126-be80-42b50f3dacfb\": {\n                \"line_item_id\": \"3fa9fc37-33c8-4126-be80-42b50f3dacfb\",\n                \"product_sku\": \"\",\n                \"product_code\": \"\",\n                \"amount\": 200000,\n                \"currency\": \"TIL\",\n                \"display_amount\": \"TIL 200000\",\n                \"reference_type\": \"\",\n                \"reference_id\": \"\",\n                \"transaction_type\": \"user_to_user_virtual\",\n                \"description\": \"In-game digital bundle\",\n                \"metadata\": null,\n                \"tags\": null,\n                \"sort_order\": 0,\n                \"subitems\": {\n                    \"914d1f91-0c6b-4c82-8ef9-d646e7977686\": {\n                        \"subitem_id\": \"914d1f91-0c6b-4c82-8ef9-d646e7977686\",\n                        \"amount\": 200000,\n                        \"currency\": \"TIL\",\n                        \"display_amount\": \"TIL 200000\",\n                        \"reference_type\": \"invoicing.invoice_line_item_v2.line_item_id\",\n                        \"reference_id\": \"3fa9fc37-33c8-4126-be80-42b50f3dacfb\",\n                        \"subitem_type\": \"user_recipient_virtual\",\n                        \"description\": \"\",\n                        \"metadata\": null,\n                        \"source_account_id\": \"75452177-cad5-42bd-8530-4fb86ecc6fa9\",\n                        \"source_payment_method_id\": \"\",\n                        \"source_wallet_id\": \"41f5e46b-76ef-4bf8-b661-d5fb30159713\",\n                        \"destination_account_id\": \"acct_2Ym85jZvz2HNx9q2LuouUymkFz3\",\n                        \"destination_payment_method_id\": \"\",\n                        \"destination_wallet_id\": \"36dfbb98-2551-40c8-a60c-617e29bdbb48\",\n                        \"tags\": null\n                    }\n                }\n            }\n        },\n        \"subitems\": {},\n        \"tags\": null\n    }\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The status of the transaction is indicated by the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payload.state"]}," value, which is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OPEN"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Notice that the invoice data returned in the response body includes many more properties"," ","than were sent in the request."," ","For more information about what you can include when creating an invoice, review ",{"$$mdtype":"Tag","name":"OpenapiLink","attributes":{"link":"invoicing/openapi/invoice/createinvoice","text":"Create a new invoice"},"children":[]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"pay-a-user-to-user-invoice","__idx":4},"children":["Pay a user-to-user-invoice"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This exercise pays the invoice created in the previous exercise."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The previous exercise only creates an invoice in Tilila's system."," ","No tokens have moved, yet."," ","This exercise finishes the purchase process and transfers tokens from the payer and the recipient."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["To pay the invoice, in Postman:"]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Explore Tilia transactions"]}," collection, in the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Standard transaction"]}," folder,"," ","open the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Pay a user-to-user-invoice"]}," request."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["URL"]}," field, notice that the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invoice_id"]}," returned by the preceding request is used to identify the invoice to pay."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Pay a user-to-user-invoice"]}," request, choose ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Send"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After the response returns, open the response ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Body"]}," tab below the request to review the response body details."]}]}]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":["Show a typical response body with the completed transaction info."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"status\": \"Success\",\n    \"message\": [],\n    \"codes\": [],\n    \"payload\": {\n        \"invoice_id\": \"57592e8c-df91-4c7d-aa5e-c62eabe32a83\",\n        \"account_id\": \"acct_2Ym84qq2ieeaZkOHUM1xeF8uJtu\",\n        \"invoice_type\": \"user_purchase_virtual\",\n        \"reference_type\": \"\",\n        \"reference_id\": \"\",\n        \"state\": \"SUCCESS\",\n        \"description\": \"Digital product order\",\n        \"metadata\": {},\n        \"summary\": {\n            \"total_amount\": 200000,\n            \"total_amount_usd\": 2000,\n            \"currency\": \"TIL\",\n            \"display_amount\": \"TIL 200000\",\n            \"subtotal\": {\n                \"total_amount\": 200000,\n                \"total_amount_usd\": 2000,\n                \"currency\": \"TIL\",\n                \"display_amount\": \"TIL 200000\"\n            },\n            \"tax\": {\n                \"total_amount\": 0,\n                \"total_amount_usd\": 0,\n                \"currency\": \"TIL\",\n                \"display_amount\": \"TIL 0.00\"\n            },\n            \"payment_breakdown\": [],\n            \"tax_calculation\": \"\"\n        },\n        \"failure_code\": \"\",\n        \"failure_reason\": \"\",\n        \"created\": \"2023-12-08T21:19:39Z\",\n        \"updated\": \"2023-12-08T21:19:39Z\",\n        \"payment_methods\": {\n            \"41a64965-f990-4323-8781-ec56c5e365fc\": {\n                \"provider\": \"wallet\",\n                \"payment_method_id\": \"41a64965-f990-4323-8781-ec56c5e365fc\",\n                \"authorized_amount\": 200000,\n                \"currency\": \"TIL\",\n                \"display_string\": \"\",\n                \"display_amount\": \"TIL 200000\",\n                \"tags\": null,\n                \"subitems\": {}\n            }\n        },\n        \"line_items\": {\n            \"3fa9fc37-33c8-4126-be80-42b50f3dacfb\": {\n                \"line_item_id\": \"3fa9fc37-33c8-4126-be80-42b50f3dacfb\",\n                \"product_sku\": \"\",\n                \"product_code\": \"\",\n                \"amount\": 200000,\n                \"currency\": \"TIL\",\n                \"display_amount\": \"TIL 200000\",\n                \"reference_type\": \"\",\n                \"reference_id\": \"\",\n                \"transaction_type\": \"user_to_user_virtual\",\n                \"description\": \"In-game digital bundle\",\n                \"metadata\": null,\n                \"tags\": null,\n                \"sort_order\": 0,\n                \"subitems\": {\n                    \"914d1f91-0c6b-4c82-8ef9-d646e7977686\": {\n                        \"subitem_id\": \"914d1f91-0c6b-4c82-8ef9-d646e7977686\",\n                        \"amount\": 200000,\n                        \"currency\": \"TIL\",\n                        \"display_amount\": \"TIL 200000\",\n                        \"reference_type\": \"invoicing.invoice_line_item_v2.line_item_id\",\n                        \"reference_id\": \"3fa9fc37-33c8-4126-be80-42b50f3dacfb\",\n                        \"subitem_type\": \"user_recipient_virtual\",\n                        \"description\": \"\",\n                        \"metadata\": null,\n                        \"source_account_id\": \"75452177-cad5-42bd-8530-4fb86ecc6fa9\",\n                        \"source_payment_method_id\": \"\",\n                        \"source_wallet_id\": \"41f5e46b-76ef-4bf8-b661-d5fb30159713\",\n                        \"destination_account_id\": \"acct_2Ym85jZvz2HNx9q2LuouUymkFz3\",\n                        \"destination_payment_method_id\": \"\",\n                        \"destination_wallet_id\": \"36dfbb98-2551-40c8-a60c-617e29bdbb48\",\n                        \"tags\": null\n                    }\n                }\n            }\n        },\n        \"subitems\": {},\n        \"tags\": null\n    }\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The invoice returned in the response buffer shows the paid invoice in the value of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payload.state"]},","," ","which is now ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SUCCESS"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":5},"children":["Next steps"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The exercises in this tutorial used Postman to call the Tilia APIs."," ","For an example of how to integrate the transaction demonstrated in this tutorial into a web page,"," ","see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/guides/user-to-user"},"children":["User-to-User Purchase"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you're curious, you can review the wallet balances of the users involved in this transaction by using the exercises in the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/tutorials/transactions/tutorial_txn_info"},"children":["Get info about transactions"]}," tutorial."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also return to the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/tutorials/transactions"},"children":["Transaction tutorials overview"]}," and find another transaction tutorial, or just go to the next transaction tutorial."]}]},"headings":[{"value":"Tutorial: Make standard transactions","id":"tutorial-make-standard-transactions","depth":1},{"value":"API operations in this tutorial","id":"api-operations-in-this-tutorial","depth":3},{"value":"To complete this tutorial","id":"to-complete-this-tutorial","depth":2},{"value":"Create a user-to-user invoice","id":"create-a-user-to-user-invoice","depth":2},{"value":"Pay a user-to-user-invoice","id":"pay-a-user-to-user-invoice","depth":2},{"value":"Next steps","id":"next-steps","depth":2}],"frontmatter":{"seo":{"title":"Tutorial: Make standard transactions"}},"lastModified":"2026-02-05T18:12:30.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/tutorials/transactions/tutorial_txn_standard","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}