v1

latestOpenAPI 3.0.02026-08-06202761.2 KB
Transactions

Create a new transaction

Offline access is allowed for this endpoint.

post/v2/transactions

Request body

amountinteger required

The price of the goods being sold in this transaction, in the currency's smallest unit. For example, if a trading card is being sold for $12.34 (with currency as usd), then the body would contain {"amount": 1234, "currency": "usd"}.

amount_extrainteger

Represents an additional charge to be paid by the buyer added to the transaction total. Use this field to include costs like processing fees or local taxes. Must be an integer provided in the smallest unit of the currency (for example, 500 for $5.00 USD). Defaults to 0 if not provided.

amount_postageinteger

Represents an additional charge to be paid by the buyer, seller or client. Use this field to include costs like shipping surcharges. Must be an integer provided in the smallest unit of the currency (for example, 500 for $5.00 USD).

buyer_idstring

The ID of the user that will be the buyer in this transaction.

contains_shippingboolean

Specifies if the transactions contains a shippable item and the shipping details should be collected from the buyer.

currencystring currency required

The currency that the amount is specified in.

descriptionstring required

A description of the goods being sold.

fees_buyerinteger required

The buyer fees for this transaction, in the currency's smallest unit.

fees_configinteger

The fee config for which the fees are computed.

fees_sellerinteger

The seller fees for this transaction, in the currency's smallest unit.

image_urlstring absolute_url

URL of the image displayed on the Trustap payment page to show the buyer the item they are paying for. Supports jpg, png, gif, bmp, webp and svg files. Images displayed as a squares. Non-square images are cropped.

payment_methodstring

The payment method that will be used to pay for the transaction. This is necessary because different payment methods may result in different fees. Supports card and bank_transfer.

The default value is card.

rolestring

The role of the user creating the transaction. Supported values are buyer and seller.

seller_idstring

The ID of the user that will be the seller in this transaction.

Response

Created

client_idstring required
contains_shippingboolean
descriptionstring required
idstring type_id required
join_codestring
metadataobject

Arbitrary key-value string pairs for adding extra information to transactions.

payment_linkstring

URL to the actions page where the buyer can pay the deposit.

status'created' | 'joined' | 'rejected' | 'cancelled' | 'paid' | 'review_flagged' | 'payment_accepted' | 'complaint_submitted' | 'complaint_period_ended' | 'refunded' | 'buyer_handover_confirmed' | 'seller_handover_confirmed' | 'tracked' | 'delivered' | 'funds_released' | 'claimed_by_buyer' | 'claimed_by_seller' required

Example response

{
  "buyer": {
    "id": "9097",
    "is_guest": false
  },
  "client_id": "1234",
  "deadlines": {
    "complaints": "2019-12-25T15:00:00Z"
  },
  "description": "Soccer ticket",
  "events": {
    "by_key": {
      "buyer_handover_confirmed": "2019-12-25T16:00:00Z",
      "created": "2019-12-25T09:00:00Z",
      "funds_released": "2019-12-25T17:00:00Z",
      "joined": "2019-12-25T10:00:00Z",
      "paid": "2019-12-25T11:00:00Z",
      "payment_accepted": "2019-12-25T12:00:00Z",
      "seller_handover_confirmed": "2019-12-25T15:00:00Z"
    },
    "by_time": []
  },
  "funds_release": {
    "refunds": [],
    "released_to_seller": false
  },
  "id": "tx_2106",
  "pricing": {
    "amount": 1000,
    "amount_extra": 0,
    "currency": "eur",
    "fees": {
      "buyer": 110,
      "buyer_client": 10,
      "international_payment": 20,
      "seller": 0,
      "seller_client": 5
    }
  },
  "review": {
    "approved": true,
    "outcome_reason": "Not fraudulent."
  },
  "seller": {
    "id": "9790",
    "is_guest": false
  },
  "status": "funds_released"
}