{"templateId":"markdown","versions":[{"version":"v1.0","label":"v1.0","link":"/docs/v1.0/guides/state","default":false,"active":true,"folderId":"a2557b8d"},{"version":"v2.0","label":"v2.0 (latest version)","link":"/docs/guides/state","default":true,"active":false,"folderId":"a2557b8d"}],"sharedDataIds":{"sidebar":"sidebar-docs/@v1.0/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition","paymentForm"]},"type":"markdown"},"seo":{"title":"State","description":"Using the state parameter with the Trustap API.","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":"state","__idx":0},"children":["State"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Trustap API uses ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["state"]}," in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/v1.0/guides/transactions/full-users"},"children":["creating full Trustap users"]}," and in the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/v1.0/guides/transactions/online/online-int-path-cc#buyer-transfers-funds"},"children":["payment screen"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The state parameter in the Trustap API serves two main purposes."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["It protects against ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://auth0.com/blog/prevent-csrf-attacks-in-oauth-2-implementations/"},"children":["CSRF"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["It allows you to pass contextual information like a shopping cart ID or buyer details."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"payment-continuation-using-state","__idx":1},"children":["Payment continuation using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["state"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Trustap ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/v1.0/guides/transactions/online/online-int-path-cc#buyer-transfers-funds"},"children":["payment screen"]}," supports payment continuation. To reduce additional friction, you can choose to pre-populate your buyer`s details in the payment screen."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Base64 encoded string is passed in the URL that you send your buyer using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["state"]}," parameter."," ","The string is delimited using the colon character ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[":"]},". The format of the string is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameter 1=value 1:parameter 2=value 2:parameter 3=value 3"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"URL","header":{"controls":{"copy":{}}},"source":"https://actions.stage.trustap.com/online/transactions/25273/guest_pay?redirect_uri=https://www.example.com&state=bmFtZT1EYXZleSBKb25lczpsaW5lMT1NYXJrZXQgU3RyZWV0OmxpbmUyPURvd250b3duOmNpdHk9Qm9zdG9uOnN0YXRlPU1BOnBvc3Rjb2RlPURZMTAgNUZTOmNvdW50cnk9VVM=\n","lang":"URL"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can use additional unspecified parameters for your own purposes that will be ignored by payment continuation. For example, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["token=678fe24e01dbe4a798eeb85de6a31940:"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"supported-parameters","__idx":2},"children":["Supported parameters"]},{"$$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":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Buyer's name. Should contain first and surname"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["line1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Address line 1 (e.g., street, PO Box, or company name)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["line2"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Address line 2 (e.g., apartment, suite, unit, or building)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["city"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["City, district, suburb, town, or village"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["state"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["State, county, province, or region"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postcode"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ZIP or postal code."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["country"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Two-letter country code (",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2"},"children":["ISO 3166-1 alpha-2"]},")"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"preview-payment-continuation-using-state","__idx":3},"children":["Preview payment continuation using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["state"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the following example to test how the payment form looks with pre-filled buyer information."," ","Edit the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["State string"]}," to see the sample payment form pre-populated."]},{"$$mdtype":"Tag","name":"PaymentFormPreview","attributes":{},"children":[]}]},"headings":[{"value":"State","id":"state","depth":1},{"value":"Payment continuation using state","id":"payment-continuation-using-state","depth":2},{"value":"Supported parameters","id":"supported-parameters","depth":2},{"value":"Preview payment continuation using state","id":"preview-payment-continuation-using-state","depth":2}],"frontmatter":{"seo":{"title":"State","description":"Using the state parameter with the Trustap API.","meta":[{"name":"robots","content":"noindex"}]},"excludeFromSearch":true},"lastModified":"2026-04-22T08:41:41.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/v1.0/guides/state","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}