# Create a online transaction with bank transfer payment The following steps outline the full process for an online transaction using a bank transfer. A bank transfer, also known as an Electronic Funds Transfer (EFT), is the digital movement of money between bank accounts. Depending on the region, Trustap supports various EFT methods, including ACH in the US, BACS in the UK, and international wire transfers. Before you begin this guide, follow our [setup guide](/docs/intro/auth). ### Create a sellers and buyers Follow our [users](/docs/guides/transactions/users) guide to create user IDs for both seller and buyer. ### Get Trustap Fee (Charge) Before creating a transaction, retrieve the charge for the transaction. This returns the cost for using the Trustap service for this transaction. `price` is an integer, in which the last 2 digits are the decimal part of the price. For example, `price:1050` `currency:eur` = 10,50€. Get Trustap fee ```CURL curl --location 'https://dev.stage.trustap.com/api/v1/charge?price=20000¤cy=gbp&payment_method=bank_transfer' \ --user ':' ``` Response ```json { "charge": 1040, "charge_calculator_version": 3, "charge_config": 1, "charge_seller": 0, "currency": "gbp", "payment_method": "bank_transfer", "price": 20000 } ``` ### Create a transaction with a seller and buyer 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. When requesting bank transfer for payment, set `"payment_method": "bank_transfer"`. If you don't set `payment_method` the Trustap API uses `card` as the default value. Create a transaction ```CURL curl --location 'https://dev.stage.trustap.com/api/v1/me/transactions/create_with_guest_user' \ --header 'Trustap-User: 1-886e3c26-b585-4c92-a93b-e3c84b9b32e9' \ --header 'Content-Type: application/json' \ --user ':' \ --data '{ "seller_id": "1-886e3c26-b585-4c92-a93b-e3c84b9b32e9", "buyer_id": "1-615a70d4-b624-4243-95be-a8367b7953ea", "creator_role": "seller", "currency": "gbp", "description": "Ireland vs Croatia UEFA Nations League", "price": 20000, "charge": 1040, "charge_calculator_version": 5, "payment_method": "bank_transfer", "image_url": "https://docs.trustap.com/images/soccer-tickets.png" }' ``` Response ```json { "buyer_id": "1-615a70d4-b624-4243-95be-a8367b7953ea", "charge": 1040, "charge_seller": 0, "client_id": "118931fb-e3fc-44fc-8a86-06a79d26972c", "created": "2025-02-28T12:09:45Z", "currency": "gbp", "description": "Ireland vs Croatia UEFA Nations League", "id": 25273, "image_url": "https://docs.trustap.com/images/soccer-tickets.png", "is_payment_in_progress": false, "joined": "2025-02-28T12:09:45Z", "price": 20000, "quantity": 1, "seller_id": "1-886e3c26-b585-4c92-a93b-e3c84b9b32e9", "status": "joined" } ``` ### Buyer transfers funds After a transaction is created, redirected the buyer to the payment page to pay for it. These funds will not be released to the seller until the buyer approves. The payment URL that you send to the buyer depends on your type of integration. In the following examples, replace `` with the redirect URI you set [during your Trustap setup](/docs/intro/auth). This is the location where the buyer will be redirected to following payment. | Use case | URL | | --- | --- | | Test environment - Guest buyer | `https://actions.stage.trustap.com/online/transactions/{transaction_id}/guest_pay?redirect_uri=` | | Test environment - Full user buyer | `https://actions.stage.trustap.com/online/transactions/{transaction_id}/pay?redirect_uri=` | | Production environment - Guest buyer | `https://actions.trustap.com/online/transactions/{transaction_id}/guest_pay?` | | Production environment - Full user buyer | `https://actions.trustap.com/online/transactions/{transaction_id}/pay?` | For example: ```cURL https://actions.stage.trustap.com/online/transactions/25273/guest_pay?redirect_uri=https://www.example.com ``` The Trustap API also supports `state` when sending a buyer to the payment screen. Learn more about `state` in our [guide](/docs/guides/state). The payment screen looks like the following. Bank transfer payment screen The buyer is shown bank transfer details after they submit their personal details. Bank transfer details Alternatively, use the [bank details endpoint](/apis/openapi#online-payment/basic%2Egetbanktransferdetails). The response includes all the details needed for a buyer to complete the transaction over a bank transfer. Use the `hosted_instructions_url` to share instructions on how to use the bank details. Get the bank details ```CURL curl --location 'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/bank_transfer_details' \ --user ':' ``` Response ```JSON { "amount": 0, "currency": "string", "financial_address": { "aba": { "account_number": "string", "bank_name": "string", "routing_number": "string" }, "iban": { "account_holder_name": "string", "bic": "string", "country": "string", "iban": "string" }, "sort_code": { "account_holder_name": "string", "account_number": "string", "sort_code": "string" }, "swift": { "account_number": "string", "bank_name": "string", "swift_code": "string" } }, "hosted_instructions_url": "string", "reference": "string" } ``` ### Seller adds tracking details When the seller has arranged delivery, they add the tracking details to the transaction. The Trustap API also supports an integrated shipping solution. See our [Shipping](/docs/guides/transactions/online/online-shipping) guide for more information. Seller adds tracking ```CURL curl --location 'https://dev.stage.trustap.com/api/v1/transactions/25273/track_with_guest_seller' \ --header 'Trustap-User: 1-886e3c26-b585-4c92-a93b-e3c84b9b32e9' \ --header 'Content-Type: application/json' \ --user ':' \ --data '{ "carrier": "ups", "tracking_code": "345345123" }' ``` Response ```JSON { "buyer_id": "1-615a70d4-b624-4243-95be-a8367b7953ea", "charge": 1040, "charge_seller": 0, "client_id": "118931fb-e3fc-44fc-8a86-06a79d26972c", "created": "2025-02-28T12:09:45Z", "currency": "gbp", "description": "Ireland vs Croatia UEFA Nations League", "id": 25273, "image_url": "https://docs.trustap.com/images/soccer-tickets.png", "is_payment_in_progress": false, "joined": "2025-02-28T12:09:45Z", "price": 20000, "quantity": 1, "seller_id": "1-886e3c26-b585-4c92-a93b-e3c84b9b32e9", "status": "tracked", "tracked": "2025-02-29T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "345345123" }, "tracking_details_deadline": "2025-03-04T14:14:34Z", "tracking_details_window_started": "2025-02-28T14:14:34Z" } ``` ### Delivery is confirmed (optional) Once the item has been delivered, the buyer must confirm the delivery was complete before funds can be released to the seller. The complaints period begins (24h) when any of the users confirms the delivery. Buyer confirms delivery ```CURL curl --location --request POST 'https://dev.stage.trustap.com/api/v1/transactions/25273/confirm_delivery_with_guest_buyer' \ --header 'Trustap-User: 1-886e3c26-b585-4c92-a93b-e3c84b9b32e9' \ --user ':' ``` Response ```JSON { "buyer_id": "1-615a70d4-b624-4243-95be-a8367b7953ea", "charge": 1040, "charge_international_payment": 311, "charge_seller": 0, "client_id": "118931fb-e3fc-44fc-8a86-06a79d26972c", "complaint_period_deadline": "2025-02-28T14:21:54Z", "created": "2025-02-28T14:12:15Z", "currency": "gbp", "delivered": "2025-02-28T14:16:54Z", "description": "Ireland vs Croatia UEFA Nations League", "id": 25273, "image_url": "https://docs.trustap.com/images/soccer-tickets.png", "is_payment_in_progress": false, "joined": "2025-02-28T14:12:15Z", "paid": "2025-02-28T14:14:34Z", "price": 20000, "quantity": 1, "seller_id": "1-886e3c26-b585-4c92-a93b-e3c84b9b32e9", "status": "delivered", "tracked": "2025-02-28T14:15:18Z", "tracking": { "carrier": "ups", "tracking_code": "345345123" }, "tracking_details_deadline": "2025-03-04T14:14:34Z", "tracking_details_window_started": "2025-02-28T14:14:34Z" } ``` ### Complaints period 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. See our guide to [create a complaint](/docs/guides/transactions/complaint). ### Seller claims transaction 1. A seller must register for a full Trustap account before they can claim a transaction. See our [full user guide](/docs/guides/transactions/full-users) for details. 2. Using the seller full Trustap account user ID as `Trustap-User`, claim the transaction. This links the transaction to their full Trustap account. ```CURL Seller claims transaction curl --location --request POST 'https://dev.stage.trustap.com/api/v1/transactions/25273/claim_for_seller' \ --header 'Trustap-User: b9c9e108-1edd-5d5e-8268-8873d7beb3e3' \ --user ':' ``` 1. Following confirmation of delivery and a successful complaints period, the seller will receive the payout from the transaction to their account.