# Face-to-face transaction flow with bank transfer payment

The following steps show a full face-to-face transaction from start to finish with a bank transfer payment.

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.
See our [test guide](/docs/intro/testing#test-bank-transfers) for more information on users for testing bank transfers.

### 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:gbp` = 10,50€.

Get Trustap fee

```CURL
curl --location 'https://dev.stage.trustap.com/api/v1/p2p/charge?price=20000&currency=gbp&payment_method=bank_transfer' \
--user '<API_KEY>:'
```

Response

```json
{
    "charge": 820,
    "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.

Create a transaction

```JSON
curl --location 'https://dev.stage.trustap.com/api/v1/p2p/me/transactions/create_with_guest_user' \
--header 'Trustap-User: 1-886e3c26-b585-4c92-a93b-e3c84b9b32e9' \
--header 'Content-Type: application/json' \
--user '<API_KEY>:' \
--data '{
"seller_id": "1-886e3c26-b585-4c92-a93b-e3c84b9b32e9",
"buyer_id": "1-be75312f-ef39-4f06-b4c7-d903e96800c3",
"creator_role": "seller",
"currency": "gbp",
"description": "Ireland vs Croatia UEFA Nations League",
"deposit_price": 20000,
"deposit_charge": 820,
"charge_calculator_version": 3,
"skip_remainder": true,
"deposit_payment_method": "bank_transfer",
"image_url": "https://docs.trustap.com/images/soccer-tickets.png"
}'
```

Response

```json
{
  {
    "id": 21134,
    "status": "joined",
    "currency": "gbp",
    "quantity": 1,
    "deposit_pricing": {
        "price": 20000,
        "charge": 820,
        "charge_seller": 0,
        "deposit_fee_multiplier": {
            "fee_multiplier": 1
        }
    },
    "description": "Ireland vs Croatia UEFA Nations League",
    "image_url": "https://docs.trustap.com/images/soccer-tickets.png",
    "created": "2025-01-24T17:08:28Z",
    "skip_remainder": true,
    "is_deposit_payment_in_progress": false,
    "is_remainder_payment_in_progress": false,
    "client_id": "118931fb-e3fc-44fc-8a86-06a79d26972c",
    "buyer_id": "1-be75312f-ef39-4f06-b4c7-d903e96800c3",
    "seller_id": "1-886e3c26-b585-4c92-a93b-e3c84b9b32e9",
    "joined": "2025-01-24T17:08:28Z",
    "deposit_payment_capture": null,
    "buyer_is_guest": true,
    "seller_is_guest": true
}
}
```

### Buyer transfers funds

After a transaction is created, redirect 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 `<CALLBACK_PAYMENT>` 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/f2f/transactions/{transaction_id}/pay_deposit?redirect_uri=<CALLBACK_PAYMENT>` |
| Test environment - Full user buyer | `https://actions.stage.trustap.com/f2f/transactions/{transaction_id}/user_pay_deposit?redirect_uri=<CALLBACK_PAYMENT>` |
| Production environment - Guest buyer | `https://actions.trustap.com/f2f/transactions/{transaction_id}/pay_deposit?<CALLBACK_PAYMENT>` |
| Production environment - Full user buyer | `https://actions.trustap.com/f2f/transactions/{transaction_id}/user_pay_deposit?<CALLBACK_PAYMENT>` |


For example:


```cURL
https://actions.stage.trustap.com/f2f/transactions/21380/pay_deposit?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, you can use the [bank details endpoint](/apis/openapi#f2f-payment/p2p.getbanktransferdetails).


```CURL Get the bank details
  curl --location 'https://dev.stage.trustap.com/api/v1/p2p/transactions/{transaction_id}/bank_transfer_details' \
--user '<API_KEY>:'
```

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.


```JSON Bank details response
{
  "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"
}
```



If your buyer's account has funds already available, Trustap automatically uses those funds to pay for the transaction.

In this case, you will not see bank details at this step, however funds will transfer and move the [transaction status](/docs/guides/transactions/face-to-face/face-to-face-lifecycle)  to `paid`.

The [get bank details endpoint](/apis/openapi/f2f-payment/p2p.getbanktransferdetails) returns a `400` error with the code `paid_with_balance`.

If the buyer's account has funds to partially pay for the transaction, Trustap uses those funds and requests payment for the remaining balance.

The [Trustap test buyer](/docs/intro/testing#test-bank-transfers) account is pre-funded behaves in this way.

### Seller accepts deposit

Once the payment is made by the buyer, the seller can choose to accept the deposit.

Seller accept deposit

```CURL
curl --location --request POST 'https://dev.stage.trustap.com/api/v1/p2p/transactions/21380/accept_deposit_with_guest_seller' \
--header 'Trustap-User: 1-886e3c26-b585-4c92-a93b-e3c84b9b32e9' \
--user '<API_KEY>:'
```

Response

```JSON
{
    "id": 21380,
    "status": "remainder_skipped",
    "currency": "gbp",
    "quantity": 1,
    "deposit_pricing": {
        "price": 20000,
        "charge": 820,
        "charge_seller": 0,
        "deposit_fee_multiplier": {
            "fee_multiplier": 1
        },
        "charge_international_payment": 311
    },
    "description": "Ireland vs Croatia UEFA Nations League",
    "image_url": "https://docs.trustap.com/images/soccer-tickets.png",
    "created": "2025-01-31T17:26:01Z",
    "skip_remainder": true,
    "is_deposit_payment_in_progress": false,
    "is_remainder_payment_in_progress": false,
    "client_id": "118931fb-e3fc-44fc-8a86-06a79d26972c",
    "buyer_id": "1-be75312f-ef39-4f06-b4c7-d903e96800c3",
    "seller_id": "1-886e3c26-b585-4c92-a93b-e3c84b9b32e9",
    "joined": "2025-01-31T17:26:01Z",
    "deposit_payment_capture": null,
    "deposit_paid": "2025-01-31T17:38:55Z",
    "deposit_accepted": "2025-01-31T17:45:39Z",
    "remainder_skipped": "2025-01-31T17:45:39Z",
    "buyer_is_guest": true,
    "seller_is_guest": true
}
```

### Handover is confirmed

Once the physical handover of the item has taken place, the buyer must confirm the handover was complete before funds can be released to the seller.

Both parties can confirm the handover for a face-to-face transaction. The complaints period begins (24h) when any of the users confirms the handover.

Seller confirms handover

```CURL
curl --location --request POST 'https://dev.stage.trustap.com/api/v1/p2p/transactions/21380/confirm_handover_with_guest_user' \
--header 'Trustap-user: 1-886e3c26-b585-4c92-a93b-e3c84b9b32e9' \
--user '<API_KEY>:'
```

Response

```JSON
{
    "id": 21380,
    "status": "seller_handover_confirmed",
    "currency": "gbp",
    "quantity": 1,
    "deposit_pricing": {
        "price": 20000,
        "charge": 820,
        "charge_seller": 0,
        "deposit_fee_multiplier": {
            "fee_multiplier": 1
        },
        "charge_international_payment": 311
    },
    "description": "Ireland vs Croatia UEFA Nations League",
    "image_url": "https://docs.trustap.com/images/soccer-tickets.png",
    "created": "2025-01-31T17:26:01Z",
    "skip_remainder": true,
    "is_deposit_payment_in_progress": false,
    "is_remainder_payment_in_progress": false,
    "client_id": "118931fb-e3fc-44fc-8a86-06a79d26972c",
    "buyer_id": "1-be75312f-ef39-4f06-b4c7-d903e96800c3",
    "seller_id": "1-886e3c26-b585-4c92-a93b-e3c84b9b32e9",
    "joined": "2025-01-31T17:26:01Z",
    "deposit_payment_capture": null,
    "deposit_paid": "2025-01-31T17:38:55Z",
    "deposit_accepted": "2025-01-31T17:45:39Z",
    "remainder_skipped": "2025-01-31T17:45:39Z",
    "seller_handover_confirmed": "2025-01-31T17:47:18Z",
    "complaint_period_deadline": "2025-01-31T17:52:18Z",
    "buyer_is_guest": true,
    "seller_is_guest": true
}
```

### Complaints period

At this point, the buyer has the option to create a complaint if the were not satisfied with the transaction.
The buyer will receive an email from Trustap with details on how to create a complaint.
Submitting complaint will pause any payout until the issue is resolved. The Trustap support team mediate between both buyer and seller to resolve the complaint.

The complaints period typically lasts 24 hours.

Alternatively, you can enable your buyer to manually [create a complaint](/docs/guides/transactions/complaint).
If a complaint is made, you will receive an email as well as a [webhook event](/docs/concepts/webhooks).

If no complaint is made within the complaints period, funds are automatically released [following the seller claiming the payout](#step-9-seller-claims-payout).

### 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/p2p/transactions/21380/claim_for_seller' \
--header 'Trustap-User: b9c9e108-1edd-5d5e-8268-8873d7beb3e3' \
--user '<API_KEY>:'
```

1. Following confirmation of handover and a successful complaints period, the seller will receive the payout from the transaction to their account.