{"templateId":"markdown","versions":[{"version":"v1.0","label":"v1.0","link":"/docs/v1.0/guides/transactions/online/online-int-path-cc","default":false,"active":true,"folderId":"a2557b8d"},{"version":"v2.0","label":"v2.0 (latest version)","link":"/docs/v2.0/guides/transactions/online/online-int-path-cc","default":true,"active":false,"folderId":"a2557b8d"}],"sharedDataIds":{"sidebar":"sidebar-docs/@v1.0/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition","DSteps","DStep","tabs","tab","img"]},"type":"markdown"},"seo":{"title":"Online transaction flow with credit card payment","description":"Step by step guide showing a full online transaction flow with credit card payment.","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":"create-a-online-transaction-with-credit-card-payment","__idx":0},"children":["Create a online transaction with credit card payment"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following steps show a full online transaction from start to finish with a credit card payment."," ","In some cases, Trustap also support some local payment methods. For example, Swish, BLIK, iDEAL, Apple Pay, and Google Pay."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before you begin this guide, follow our ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/v1.0/intro/auth"},"children":["setup guide"]},"."]}]},{"$$mdtype":"Tag","name":"DSteps","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-a-sellers-and-buyers","__idx":1},"children":["Create a sellers and buyers"]},{"$$mdtype":"Tag","name":"DStep","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Follow our ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/v1.0/guides/transactions/users"},"children":["users"]}," guide to create user IDs for both seller and buyer."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"get-trustap-fee-charge","__idx":2},"children":["Get Trustap Fee (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":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Get Trustap fee","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"CURL","header":{"controls":{"copy":{}}},"source":"curl --location 'https://dev.stage.trustap.com/api/v1/charge?price=20000&currency=gbp' \\\n--user '<API_KEY>:'\n","lang":"CURL"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Response","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"charge\": 760,\n    \"charge_calculator_version\": 3,\n    \"charge_config\": 1,\n    \"charge_seller\": 0,\n    \"currency\": \"gbp\",\n    \"payment_method\": \"card\",\n    \"price\": 20000\n}\n","lang":"json"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-a-transaction-with-a-seller-and-buyer","__idx":3},"children":["Create a transaction with a seller and buyer"]},{"$$mdtype":"Tag","name":"DStep","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the Trustap API, the transaction object includes details about the the buyer and seller, the type of transaction, and the status of the transaction."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Create a transaction","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"CURL","header":{"controls":{"copy":{}}},"source":"curl --location 'https://dev.stage.trustap.com/api/v1/me/transactions/create_with_guest_user' \\\n--header 'Trustap-User: 1-886e3c26-b585-4c92-a93b-e3c84b9b32e9' \\\n--header 'Content-Type: application/json' \\\n--user '<API_KEY>:' \\\n--data '{\n    \"seller_id\": \"1-886e3c26-b585-4c92-a93b-e3c84b9b32e9\",\n    \"buyer_id\": \"1-615a70d4-b624-4243-95be-a8367b7953ea\",\n    \"creator_role\": \"seller\",\n    \"currency\": \"gbp\",\n    \"description\": \"Ireland vs Croatia UEFA Nations League\",\n    \"price\": 20000,\n    \"charge\": 760,\n    \"charge_calculator_version\": 5,\n    \"image_url\": \"https://docs.trustap.com/images/soccer-tickets.png\"\n    }'\n","lang":"CURL"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Response","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"buyer_id\": \"1-615a70d4-b624-4243-95be-a8367b7953ea\",\n    \"charge\": 760,\n    \"charge_seller\": 0,\n    \"client_id\": \"118931fb-e3fc-44fc-8a86-06a79d26972c\",\n    \"created\": \"2025-02-28T12:09:45Z\",\n    \"currency\": \"gbp\",\n    \"description\": \"Ireland vs Croatia UEFA Nations League\",\n    \"id\": 25273,\n    \"image_url\": \"https://docs.trustap.com/images/soccer-tickets.png\",\n    \"is_payment_in_progress\": false,\n    \"joined\": \"2025-02-28T12:09:45Z\",\n    \"price\": 20000,\n    \"quantity\": 1,\n    \"seller_id\": \"1-886e3c26-b585-4c92-a93b-e3c84b9b32e9\",\n    \"status\": \"joined\"\n}\n","lang":"json"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"buyer-transfers-funds","__idx":4},"children":["Buyer transfers funds"]},{"$$mdtype":"Tag","name":"DStep","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After a transaction is created, redirected the buyer to the payment page to pay for it."," ","Trustap support two methods for payment."," ","These funds will not be released to the seller until the buyer approves."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["With card transfer, direct the buyer using a URL to a payment screen where the buyer can enter their card details for secure payment."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["During testing, it's helpful to simulate the full payment flow. We recommend using ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.stripe.com/testing"},"children":["test credit card numbers"]}," to complete transactions without processing real payments."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The payment URL that you send to the buyer depends on your type of integration."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the following examples, replace ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<CALLBACK_PAYMENT>"]}," with the redirect URI you set ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/v1.0/intro/auth"},"children":["during your Trustap setup"]},". This is the location where the buyer will be redirected to following payment."]}]},{"$$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":"Use case"},"children":["Use case"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"URL"},"children":["URL"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Test environment - Guest buyer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://actions.stage.trustap.com/online/transactions/{transaction_id}/guest_pay?redirect_uri=<CALLBACK_PAYMENT>"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Test environment - Full user buyer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://actions.stage.trustap.com/online/transactions/{transaction_id}/pay?redirect_uri=<CALLBACK_PAYMENT>"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Production environment - Guest buyer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://actions.trustap.com/online/transactions/{transaction_id}/guest_pay?<CALLBACK_PAYMENT>"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Production environment - Full user buyer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://actions.trustap.com/online/transactions/{transaction_id}/pay?<CALLBACK_PAYMENT>"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cURL","header":{"controls":{"copy":{}}},"source":"https://actions.stage.trustap.com/online/transactions/25273/guest_pay?redirect_uri=https://www.example.com\n","lang":"cURL"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Trustap API also supports ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["state"]}," when sending a buyer to the payment screen."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Learn more about ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["state"]}," in our ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/v1.0/guides/state"},"children":["guide"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The payment screen looks like the following."]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/card-payment-online.3c04c59f4239762a6a604e00c7303f54d1bd08bc0cb030c6200fcf74c010106f.df2da560.png","alt":"Image with dimensions","withLightbox":true,"width":600},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"seller-adds-tracking-details","__idx":5},"children":["Seller adds tracking details"]},{"$$mdtype":"Tag","name":"DStep","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When the seller has arranged delivery, they add the tracking details to the transaction."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Trustap API also supports an integrated shipping solution. See our ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/v1.0/guides/transactions/online/online-shipping"},"children":["Shipping"]}," guide for more information."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Seller adds tracking","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"CURL","header":{"controls":{"copy":{}}},"source":"curl --location 'https://dev.stage.trustap.com/api/v1/transactions/25273/track_with_guest_seller' \\\n--header 'Trustap-User: 1-886e3c26-b585-4c92-a93b-e3c84b9b32e9' \\\n--header 'Content-Type: application/json' \\\n--user '<API_KEY>:' \\\n--data '{\n\"carrier\": \"ups\",\n\"tracking_code\": \"345345123\"\n}'\n","lang":"CURL"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Response","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"JSON","header":{"controls":{"copy":{}}},"source":"\n{\n    \"buyer_id\": \"1-615a70d4-b624-4243-95be-a8367b7953ea\",\n    \"charge\": 760,\n    \"charge_seller\": 0,\n    \"client_id\": \"118931fb-e3fc-44fc-8a86-06a79d26972c\",\n    \"created\": \"2025-02-28T12:09:45Z\",\n    \"currency\": \"gbp\",\n    \"description\": \"Ireland vs Croatia UEFA Nations League\",\n    \"id\": 25273,\n    \"image_url\": \"https://docs.trustap.com/images/soccer-tickets.png\",\n    \"is_payment_in_progress\": false,\n    \"joined\": \"2025-02-28T12:09:45Z\",\n    \"price\": 20000,\n    \"quantity\": 1,\n    \"seller_id\": \"1-886e3c26-b585-4c92-a93b-e3c84b9b32e9\",\n    \"status\": \"tracked\",\n    \"tracked\": \"2025-02-29T12:00:00Z\",\n    \"tracking\": {\n      \"carrier\": \"ups\",\n      \"tracking_code\": \"345345123\"\n  },\n    \"tracking_details_deadline\": \"2025-03-04T14:14:34Z\",\n    \"tracking_details_window_started\": \"2025-02-28T14:14:34Z\"\n}\n","lang":"JSON"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"delivery-confirmed-optional","__idx":6},"children":["Delivery confirmed (optional)"]},{"$$mdtype":"Tag","name":"DStep","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once the item has been delivered, the buyer must confirm the delivery was complete before funds can be released to the seller."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The complaints period begins (24h) when any of the users confirms the delivery."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Buyer confirms delivery","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"CURL","header":{"controls":{"copy":{}}},"source":"\ncurl --location --request POST 'https://dev.stage.trustap.com/api/v1/transactions/25273/confirm_delivery_with_guest_buyer' \\\n--header 'Trustap-User: 1-886e3c26-b585-4c92-a93b-e3c84b9b32e9' \\\n--user '<API_KEY>:'\n","lang":"CURL"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Response","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"JSON","header":{"controls":{"copy":{}}},"source":"{\n    \"buyer_id\": \"1-615a70d4-b624-4243-95be-a8367b7953ea\",\n    \"charge\": 760,\n    \"charge_international_payment\": 311,\n    \"charge_seller\": 0,\n    \"client_id\": \"118931fb-e3fc-44fc-8a86-06a79d26972c\",\n    \"complaint_period_deadline\": \"2025-02-28T14:21:54Z\",\n    \"created\": \"2025-02-28T14:12:15Z\",\n    \"currency\": \"gbp\",\n    \"delivered\": \"2025-02-28T14:16:54Z\",\n    \"description\": \"Ireland vs Croatia UEFA Nations League\",\n    \"id\": 25273,\n    \"image_url\": \"https://docs.trustap.com/images/soccer-tickets.png\",\n    \"is_payment_in_progress\": false,\n    \"joined\": \"2025-02-28T14:12:15Z\",\n    \"paid\": \"2025-02-28T14:14:34Z\",\n    \"price\": 20000,\n    \"quantity\": 1,\n    \"seller_id\": \"1-886e3c26-b585-4c92-a93b-e3c84b9b32e9\",\n    \"status\": \"delivered\",\n    \"tracked\": \"2025-02-28T14:15:18Z\",\n    \"tracking\": {\n        \"carrier\": \"ups\",\n        \"tracking_code\": \"345345123\"\n    },\n    \"tracking_details_deadline\": \"2025-03-04T14:14:34Z\",\n    \"tracking_details_window_started\": \"2025-02-28T14:14:34Z\"\n}\n","lang":"JSON"},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"complaints-period","__idx":7},"children":["Complaints period"]},{"$$mdtype":"Tag","name":"DStep","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["At this point, the buyer has an option to create a complaint. This means that were not satisfied with the transaction. A complaint will pause any payout until the dispute has been resolved."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See our guide to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/v1.0/guides/transactions/complaint"},"children":["create a complaint"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"seller-claims-transaction","__idx":8},"children":["Seller claims transaction"]},{"$$mdtype":"Tag","name":"DStep","attributes":{},"children":[{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A seller must register for a full Trustap account before they can claim a transaction. See our ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/v1.0/guides/transactions/full-users"},"children":["full user guide"]}," for details."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Using the seller full Trustap account user ID as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Trustap-User"]},", claim the transaction. This links the transaction to their full Trustap account."]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"CURL","data-title":"Seller claims transaction","header":{"title":"Seller claims transaction","controls":{"copy":{}}},"source":"curl --location --request POST 'https://dev.stage.trustap.com/api/v1/transactions/25273/claim_for_seller' \\\n--header 'Trustap-User: b9c9e108-1edd-5d5e-8268-8873d7beb3e3' \\\n--user '<API_KEY>:'\n","lang":"CURL"},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":3},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Following confirmation of delivery and a successful complaints period, the seller will receive the payout from the transaction to their account."]}]}]}]}]},"headings":[{"value":"Create a online transaction with credit card payment","id":"create-a-online-transaction-with-credit-card-payment","depth":1},{"value":"Create a sellers and buyers","id":"create-a-sellers-and-buyers","depth":3},{"value":"Get Trustap Fee (Charge)","id":"get-trustap-fee-charge","depth":3},{"value":"Create a transaction with a seller and buyer","id":"create-a-transaction-with-a-seller-and-buyer","depth":3},{"value":"Buyer transfers funds","id":"buyer-transfers-funds","depth":3},{"value":"Seller adds tracking details","id":"seller-adds-tracking-details","depth":3},{"value":"Delivery confirmed (optional)","id":"delivery-confirmed-optional","depth":3},{"value":"Complaints period","id":"complaints-period","depth":3},{"value":"Seller claims transaction","id":"seller-claims-transaction","depth":3}],"frontmatter":{"seo":{"title":"Online transaction flow with credit card payment","description":"Step by step guide showing a full online transaction flow with credit card payment.","meta":[{"name":"robots","content":"noindex"}]},"excludeFromSearch":true},"lastModified":"2026-04-03T11:15:25.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/v1.0/guides/transactions/online/online-int-path-cc","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}