# F2F Transactions

F2F2 transactions are used when the goods are delivered in person.


## Get multiple face-to-face transactions by their IDs

 - [GET /api/v1/p2p/batch/transactions](https://docs.trustap.com/apis/openapi/f2f-transactions/getp2ptransactionsbyids.md): This endpoint takes a required ids parameter that contains a
comma-separated list of transaction IDs, and returns the
transactions corresponding to those IDs. A maximum of 50 IDs may
be provided, and results are returned in the order specified in
ids, and duplicates are preserved. Transactions that couldn't
be found will be returned as null values in the result array.
The following example request results in the 200 OK response
described below, assuming that the transaction with ID 1990
couldn't be found:


 http
https://dev.stage.trustap.com/api/v1/p2p/batch/transactions?ids=1309,609,1990,609

## Get face-to-face transactions for the logged-in user

 - [GET /api/v1/p2p/me/transactions](https://docs.trustap.com/apis/openapi/f2f-transactions/p2p.gettransactions.md): Transactions are currently sorted by ID.

## Create a new face-to-face transaction

 - [POST /api/v1/p2p/me/transactions](https://docs.trustap.com/apis/openapi/f2f-transactions/p2p.createtransaction.md): Note that this endpoint is similar to POST /me/transactions
but takes deposit_price and deposit_charge fields instead of
the price and charge fields.
Offline access is allowed for this endpoint when the user has
granted the p2p_tx:offline_create_join scope to the client
that is performing the request.

## Create a new face-to-face transaction with both users

 - [POST /api/v1/p2p/me/transactions/create_and_join](https://docs.trustap.com/apis/openapi/f2f-transactions/p2p.createandjointransaction.md): This endpoint is an optimised call that allows a transaction to
be created and joined in a single request. It requires the user
identified by join_user_id to have granted the
p2p_tx:offline_create_join scope to the client that is
performing the request.

Note that this endpoint is similar to POST /me/transactions
but takes deposit_price and deposit_charge fields instead of
the price and charge fields.

## Create a new face-to-face transaction with both users

 - [POST /api/v1/p2p/me/transactions/create_with_guest_user](https://docs.trustap.com/apis/openapi/f2f-transactions/p2p.createtransactionwithguestuser.md): This endpoint is an optimised call that allows a transaction to
be created and joined in a single request. It requires the
online user to have granted the p2p_tx:offline_create_join scope
to the client that is performing the request.
This endpoint allows creating a transaction with both buyer and seller
as guest users, or one party to be guest user and the other full user.

## Get a face-to-face transaction by its ID

 - [GET /api/v1/p2p/transactions/{transaction_id}](https://docs.trustap.com/apis/openapi/f2f-transactions/p2p.gettransaction.md)

## Claim a F2F transaction on behalf of the buyer

 - [POST /api/v1/p2p/transactions/{transaction_id}/claim_for_buyer](https://docs.trustap.com/apis/openapi/f2f-transactions/p2p.claimforbuyer.md): This endpoint enables a client to claim a face-to-face transaction on behalf of a buyer.
This endpoint is only accessible for a client.

## Claim a F2F transaction on behalf of the seller

 - [POST /api/v1/p2p/transactions/{transaction_id}/claim_for_seller](https://docs.trustap.com/apis/openapi/f2f-transactions/p2p.claimtransactionforseller.md): This endpoint enables a client to claim a face-to-face transaction on behalf of a seller.
This endpoint is only accessible for a client.

## Join the face-to-face transaction as guest user

 - [POST /api/v1/p2p/transactions/{transaction_id}/join_with_guest](https://docs.trustap.com/apis/openapi/f2f-transactions/p2p.joinwithguest.md)

## Get metadata for a face-to-face transaction

 - [GET /api/v1/p2p/transactions/{transaction_id}/metadata](https://docs.trustap.com/apis/openapi/f2f-transactions/p2p.gettransactionmetadata.md)

## Set metadata for a face-to-face transaction

 - [POST /api/v1/p2p/transactions/{transaction_id}/metadata](https://docs.trustap.com/apis/openapi/f2f-transactions/p2p.settransactionmetadata.md)

## Claim F2F transaction as buyer given a claim secret

 - [POST /api/v1/p2p/transactions_by_claim_secret/{secret}/claim_as_buyer](https://docs.trustap.com/apis/openapi/f2f-transactions/p2p.claimasbuyer.md): This endpoint allows a full user to claim a transaction
as buyer given a claim secret.

## Claim a F2F transaction as the seller

 - [POST /api/v1/p2p/transactions_by_claim_secret/{secret}/claim_as_seller](https://docs.trustap.com/apis/openapi/f2f-transactions/p2p.claimtransactionasseller.md): This endpoint allows a full user to claim a transaction
as seller given a claim secret.

## Get a face-to-face transaction by its join code

 - [GET /api/v1/p2p/transactions_by_join_code/{join_code}](https://docs.trustap.com/apis/openapi/f2f-transactions/p2p.gettransactionbyjoincode.md)

## Join a face-to-face transaction by its join code

 - [POST /api/v1/p2p/transactions_by_join_code/{join_code}/join](https://docs.trustap.com/apis/openapi/f2f-transactions/p2p.jointransactionbyjoincode.md): This endpoint allows a user to join a transaction provided a join code. Offline access is allowed for this endpoint when the user has granted the p2p_tx:offline_create_join scope to the client that is performing the request.

