# Online Transactions

Online transactions are used when the goods are delivered using registered
mail.


## Get multiple online transactions by their IDs

 - [GET /api/v1/batch/transactions](https://docs.trustap.com/apis/openapi/online-transactions/basic.gettransactionsbyids.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, 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/batch/transactions?ids=1309,609,1990,609

## Get online transactions for the logged-in user

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

## Create a new online transaction

 - [POST /api/v1/me/transactions](https://docs.trustap.com/apis/openapi/online-transactions/basic.createtransaction.md): A request to this endpoint must be preceded by a call to
/charge with the price of the goods specified in price.

## Create a new online transaction with both users

 - [POST /api/v1/me/transactions/create_and_join](https://docs.trustap.com/apis/openapi/online-transactions/basic.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
basic_tx:offline_create_join scope to the client that is
performing the request.

## Create a new online transaction with both users

 - [POST /api/v1/me/transactions/create_with_guest_user](https://docs.trustap.com/apis/openapi/online-transactions/basic.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 basic_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 or full users, or one party to be guest user and the other full user.

## Get an online transaction using a join code

 - [GET /api/v1/transactions](https://docs.trustap.com/apis/openapi/online-transactions/basic.gettransactionbyjoincode.md)

## Join an online transaction using a join code

 - [PUT /api/v1/transactions](https://docs.trustap.com/apis/openapi/online-transactions/basic.jointransaction.md): A transaction can't be joined using its ID, because only the
buyer and seller of a transaction can access a transaction using
its ID.

## Get an online transaction by its ID

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

## Claim online transaction on behalf of the buyer

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

## Claim online transactions on behalf of the seller

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

## Submit a detailed order issue for this online transaction

 - [POST /api/v1/transactions/{transaction_id}/submit_order_issue](https://docs.trustap.com/apis/openapi/online-transactions/basic.submitorderissue.md)

## Claim for an online transaction as buyer given a claim secret

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

## Claim an Online transaction as the seller

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

