{"templateId":"markdown","versions":[{"version":"v1.0","label":"v1.0","link":"/docs/v1.0/guides/transactions/postage-fee","default":false,"active":false,"folderId":"a2557b8d"},{"version":"v2.0","label":"v2.0 (latest version)","link":"/docs/guides/transactions/postage-fee","default":true,"active":true,"folderId":"a2557b8d"}],"sharedDataIds":{"sidebar":"sidebar-docs/@v1.0/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["DSteps","DStep","admonition","tabs","tab","img"]},"type":"markdown"},"seo":{"title":"Transaction with postage fee","description":"An API for end-to-end transaction solution that seamlessly integrates payments, fulfillment, and support into your marketplace.","llmstxt":{"hide":false,"title":"Trustap API","description":"Trustap is an API for end-to-end transaction solution that seamlessly integrates payments, fulfillment, and support into your marketplace. Trustap is an escrow API service facilitating secure transactions.","sections":[{"title":"Intro","description":"Trustap API introduction.","includeFiles":["docs/v2.0/intro/*.md"],"excludeFiles":[]},{"title":"Concepts","description":"Trustap Concepts","includeFiles":["docs/v2.0/concepts/*.md"],"excludeFiles":["docs/v2.0/concepts/errors.md"]},{"title":"Guides","description":"Trustap integration guides","includeFiles":["docs/v2.0/guides/**/*.md"],"excludeFiles":["docs/v2.0/guides/listing/"]},{"title":"API Reference","description":"Trustap API reference guide","includeFiles":["**/apis/@v2.0/openapi.yaml"],"excludeFiles":[]}],"excludeFiles":[]},"meta":[{"name":"robots","content":"noindex"}]},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"transaction-with-postage-fee","__idx":0},"children":["Transaction with postage fee"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Trustap API enables sellers to use their own shipping solutions and provide a mechanism to add tracking details to a transaction."," ","To support sellers using their own shipping solution, the Trustap API includes a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postage_fee"]}," parameter. Use this to add a pre-calculated postage cost to a transaction, which is then collected at the Trustap payment screen."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"add-a-postage-fee-to-a-transaction","__idx":1},"children":["Add a postage fee to a transaction"]},{"$$mdtype":"Tag","name":"DSteps","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-users","__idx":2},"children":["Create users"]},{"$$mdtype":"Tag","name":"DStep","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Follow our ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/guides/transactions/users"},"children":["users"]}," guide to create user objects for both seller and buyer."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"calculate-the-charge","__idx":3},"children":["Calculate the charge"]},{"$$mdtype":"Tag","name":"DStep","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before creating a transaction, retrieve the charge for the transaction. This returns the cost for using the Trustap service for this transaction."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["price"]}," is an integer, in which the last 2 digits are the decimal part of the price. For example, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["price:1050"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["currency:eur"]}," = €10.50."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Get the charge for the transaction including the path parameter ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amount_postage"]},"."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Get charge","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"CURL","header":{"controls":{"copy":{}}},"source":"curl -i -X GET \\\n-u '<API_KEY>:' \\\n'https://api.test.trustap.com/v2/fees?amount=20000&currency=gbp&amount_postage=500'\n","lang":"CURL"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Get charge response","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"charge\": 325,\n    \"charge_calculator_version\": 5,\n    \"charge_config\": 1,\n    \"charge_postage_buyer\": 500,\n    \"charge_seller\": 0,\n    \"currency\": \"eur\",\n    \"payment_method\": \"card\",\n    \"price\": 495\n}\n","lang":"json"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-transaction","__idx":4},"children":["Create transaction"]},{"$$mdtype":"Tag","name":"DStep","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In your transaction, include the postage fee as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amount_postage"]},". Amounts must be provided in a currency's smallest unit. For example, use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}," for €5."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Create transaction","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"curl","header":{"controls":{"copy":{}}},"source":"curl -i -X POST \\\n-u '<API_KEY>:' \\\nhttps://api.test.trustap.com/v2/transactions \\\n-H 'Content-Type: application/json' \\\n-d '{\n\"amount\": 20000,\n\"amount_extra\": 0,\n\"buyer_id\": \"1-506ec116-f0b3-4ea8-bfd0-ea0e7b9d18aa\",\n\"currency\": \"eur\",\n\"description\": \"Trustap socks\",\n\"fees_buyer\": 1075,\n\"fees_config\": 1,\n\"fees_seller\": 0,\n\"amount_postage\": 500,\n\"image_url\": \"https://docs.trustap.com/images/trustap-socks.png\",\n\"payment_method\": \"card\",\n\"role\": \"seller\",\n\"contains_shipping\": true,\n\"seller_id\": \"8e5cbedc-e57b-42e5-a3bd-2f9ced81a2d0\"\n}'\n","lang":"curl"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Create transaction response","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"buyer\": {\n  \t\"id\": \"1-506ec116-f0b3-4ea8-bfd0-ea0e7b9d18aa\",\n  \t\"is_guest\": true\n  },\n  \"client_id\": \"5a3d7990-9f1c-4e11-8d67-3da5b160c50a\",\n  \"contains_shipping\": true,\n  \"deadlines\": {\n  \t\"complaints\": null\n  },\n  \"description\": \"Trustap socks\",\n  \"events\": {\n  \t\"by_key\": {\n  \t\t\"created\": \"2026-06-18T08:47:05Z\",\n  \t\t\"joined\": \"2026-06-18T08:47:05Z\"\n  \t},\n  \t\"by_time\": [\n  \t\t{\n  \t\t\t\"at\": \"2026-06-18T08:47:05Z\",\n  \t\t\t\"code\": \"created\"\n  \t\t},\n  \t\t{\n  \t\t\t\"at\": \"2026-06-18T08:47:05Z\",\n  \t\t\t\"code\": \"joined\"\n  \t\t}\n  \t]\n  },\n  \"id\": \"tx_01kvcyk6dhf4crpbs5phe6vspa\",\n  \"metadata\": {},\n  \"payment_link\": \"https://actions.stage.trustap.com/transactions/tx_01kvcyk6dhf4crpbs5phe6vspa/pay\",\n  \"pricing\": {\n  \t\"amount\": 20000,\n  \t\"amount_extra\": 0,\n  \t\"amount_postage\": 500,\n  \t\"currency\": \"eur\",\n  \t\"fees\": {\n  \t\t\"buyer\": 1075,\n  \t\t\"buyer_client\": 0,\n  \t\t\"seller\": 0,\n  \t\t\"seller_client\": 0\n  \t},\n  \t\"postage_bearer\": \"buyer\"\n  },\n  \"seller\": {\n  \t\"id\": \"8e5cbedc-e57b-42e5-a3bd-2f9ced81a2d0\",\n  \t\"is_guest\": false\n  },\n  \"status\": \"joined\"\n}\n","lang":"json"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"send-buyer-to-payment-screen","__idx":5},"children":["Send buyer to payment screen"]},{"$$mdtype":"Tag","name":"DStep","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Direct your buyer to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/guides/transactions/transaction-int-path-cc#buyer-transfers-funds"},"children":["Trustap payment screen"]},"."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Payment screen URL","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"https://actions.stage.trustap.com/transactions/tx_01kvcyk6dhf4crpbs5phe6vspa/pay?redirect_uri=https://www.example.com\n\n"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Trustap payment screen","disable":false},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Trustap payment screen includes a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Shipping"]}," fee, that is collected in the total payment."]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/online-postage-fee.76387bd5aa8fc7cfb33b224d0225bde21c674c8b2233031ae614a99a19b70ff5.3b378a3f.png","alt":"Trustap payment screen with postage_fee","withLightbox":true},"children":[]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The collected postage fees are held in the Trustap vault and paid out to the platform at agreed intervals, in a similar manner to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/concepts/pricing#platform-commission"},"children":["partner commission"]},"."]}]},"headings":[{"value":"Transaction with postage fee","id":"transaction-with-postage-fee","depth":1},{"value":"Add a postage fee to a transaction","id":"add-a-postage-fee-to-a-transaction","depth":2},{"value":"Create users","id":"create-users","depth":3},{"value":"Calculate the charge","id":"calculate-the-charge","depth":3},{"value":"Create transaction","id":"create-transaction","depth":3},{"value":"Send buyer to payment screen","id":"send-buyer-to-payment-screen","depth":3}],"frontmatter":{"excludeFromSearch":true,"seo":{"meta":[{"name":"robots","content":"noindex"}],"title":"Transaction with postage fee"}},"lastModified":"2026-06-18T11:39:43.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/guides/transactions/postage-fee","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}