Trustap API (0.1.0)

The Trustap API is a REST-based API for managing user data and transactions for Trustap users.

Note that, like Stripe, all API price and charge fields expect amounts to be provided in a currency's smallest unit. See the Stripe documentation for more details.

API Keys


Some endpoints such as /charge endpoints can be accessed directly using an API key. API keys are provided as the "username" portion of a basic auth authentication. For example, the Trustap fee for a new online transaction can be determined using the following cURL request with an API key:

curl -u '<api_key>': 'https://dev.stage.trustap.com/api/v1/charge?currency=eur&price=1234'

Deprecation


Deprecated endpoints are tagged with the word DEPRECATED at the start of their description. The deprecation message will describe what endpoints/approach should be used instead.

Note that deprecated endpoints will not be removed from the current version of the API, but their use is discouraged. Furthermore, migrating to later major versions of the API will be made easier by avoiding deprecated endpoints.

Production


This documentation references the staging environment of the Trustap API, which is available at https://dev.stage.trustap.com and uses the trustap-stage realm during authentication. This environment can be used for implementing and testing features using test credit cards, bank accounts, etc.

When all features using Trustap have been implemented and tested sufficiently, the production environment of the Trustap API can be used to process actual currency. This environment is available at https://dev.trustap.com and uses the trustap realm during authentication.

Note that only your client ID will be the same in the staging and production Trustap API environments; your client secret and API key will be different in the two environments.

Download OpenAPI description
Overview
Languages
Servers
https://dev.stage.trustap.com/api/v1/

Online Transactions

Operations

Get multiple transactions by their IDs

Request

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:

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

A comma-separated list of transaction IDs

curl -i -X GET \
  'https://dev.stage.trustap.com/api/v1/batch/transactions?ids=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/jsonArray [
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
]
Response
application/json
[ { "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": {}, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": {} } ]

Get the Trustap fee for a transaction

Request

This returns the Trustap fee, in the currency's smallest unit, for a transaction involving goods with the supplied price. See the Stripe documentation for more details.

Query
currencystringrequired

The currency that the price is specified in.

priceinteger(int64)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 request for the charge for this transaction would be /charge?price=1234&currency=usd.

quantityinteger(int64)

When creating transactions from a multi-use listing, the quantity parameter can be provided in order to generate a charge for the given price multiplied by the given quantity. See /multi_use_listings/{listingId}/create_transaction for more details.

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.

The default value is card.

use_hr_postboolean
postage_feeinteger(int64)

The custom postage_fee for the transaction.

curl -i -X GET \
  'https://dev.stage.trustap.com/api/v1/charge?currency=string&payment_method=string&postage_fee=0&price=0&quantity=0&use_hr_post=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
chargeinteger(int64)required

The Trustap fee that the buyer will pay, in the currency's smallest unit, for a queried amount. See the Stripe documentation for more details.

Example: 78
charge_calculator_versioninteger(int64)required

The version of the Trustap charge calculator that was used to calculate this charge.

This property is present for error-handling purposes. The Trustap API allows apps and users to query how much Trustap will charge for a transaction before creating a transaction. Trustap then requires the queried charge to be provided when creating a transaction or listing. At this point the charge is calculated again and checked against the provided charge, to ensure that the charge calculated for the new resource is the same as the one shown to the user. In the unlikely event that the Trustap charge calculator used to calculate the charge has been updated, then the charge_calculator_version property will be used to return an incorrect_calc_version to the API client, which will indicate that the /charge endpoint should be queried again to get the newest charge value.

Example: 5
charge_postage_buyerinteger(int64)

When the transaction handles the generation of postage labels, then charge_postage_buyer will be added to cover this fee together with charge_postage_client

charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required

The Trustap fee that the seller will pay, in the currency's smallest unit, for a queried amount. See the Stripe documentation for more details.

currencystringrequired
Example: "eur"
priceinteger(int64)required
Response
application/json
{ "charge": 78, "charge_calculator_version": 5, "currency": "eur" }

Get the list of facilities for a given carrier.

Request

Path
carrier_idstringrequired
Bodyapplication/jsonrequired
country_codestringrequired

ISO 3166-1 alpha-2 country code.

delivery_typestringrequired

The type of delivery or collection method we want to get options from. delivery_type can be one of the following:

  • parcel_locker
  • post_office
Example: "parcel_locker"
search_textstringrequired

Filter text that is used to search available facilities. It can include City, Postal Code or a string contained within Facility name.

Example: "Zagreb"
curl -i -X GET \
  'https://dev.stage.trustap.com/api/v1/me/carriers/{carrier_id}/facilities' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "country": "HR",
    "delivery_type": "parcel_locker",
    "search_text": "Zagreb"
  }'

Responses

OK

Bodyapplication/jsonArray [
addressstringrequired
citystringrequired
codestring
delivery_typestringrequired
namestringrequired
postal_codestringrequired
]
Response
application/json
{ "address": "123 Street 1 Zabreb, Croatia", "city": "Zagreb", "facility_type": "post_office", "name": "Zagreb Main Office", "postal_code": "123456HR" }

Get online transactions for the logged-in user

Request

Transactions are currently sorted by ID.

Query
before_idinteger(int64)>= 0

Only return transactions that were created chronologically before the transaction with this ID

after_idinteger(int64)>= 0

Only return transactions that were created chronologically after the transaction with this ID (i.e. with smaller IDs)

limitinteger(int64)[ 1 .. 50 ]

The maximum number of transactions to return

Default 25
curl -i -X GET \
  'https://dev.stage.trustap.com/api/v1/me/transactions?after_id=0&before_id=0&limit=25' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/jsonArray [
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
]
Response
application/json
[ { "charge": 78, "charge_seller": 0, "created": "2019-12-25T09:00:00Z", "currency": "eur", "description": "Soccer ticket", "id": 1309, "join_code": "54c5bb89-a5ea-4be7-ad7a-e740c2eebab4", "price": 1234, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "created" }, { "buyer_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "charge": 78, "charge_seller": 0, "created": "2018-12-25T09:00:00Z", "currency": "eur", "description": "Soccer ticket", "id": 609, "join_code": "c9cd6a9d-1096-4d38-b4aa-2c354beac845", "price": 1234, "status": "created" } ]

Create a new transaction

Request

A request to this endpoint must be preceded by a call to /charge with the price of the goods specified in price.

Bodyapplication/jsonrequired
chargeinteger(int64)required

The charge value returned from a request to /charge.

Example: 78
charge_calculator_versioninteger(int64)required

The charge_calculator_version value returned from a request to /charge.

Example: 5
charge_sellerinteger(int64)

The seller charge value returned from a request to /charge.

client_idstring
currencystringrequired

The currency that the price is specified in.

Example: "eur"
descriptionstringrequired

A description of the goods being sold.

Example: "Soccer ticket"
featuresArray of strings(basic.Feature)

features contains flags that modify the transaction flow.

Items Enum"require_seller_acceptance""use_hr_post""use_shippo"
Example: ["require_seller_acceptance"]
priceinteger(int64)required

The price of the goods being sold, in the currency's smallest unit. The charge value should correspond to the Trustap charge created with this price, otherwise this request will fail with a 400 error.

Example: 1234
rolestring(basic.Role)required
Enum"buyer""seller"
Example: "buyer"
curl -i -X POST \
  https://dev.stage.trustap.com/api/v1/me/transactions \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "charge": 78,
    "charge_calculator_version": 5,
    "currency": "eur",
    "description": "Soccer ticket",
    "price": 1234,
    "role": "seller"
  }'

Responses

Created

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Create a new transaction with both users

Request

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.

Bodyapplication/jsonrequired
chargeinteger(int64)required

The charge value returned from a request to /charge.

Example: 78
charge_calculator_versioninteger(int64)required

The charge_calculator_version value returned from a request to /charge.

Example: 5
charge_sellerinteger(int64)

The seller charge value returned from a request to /charge.

client_idstring
creator_rolestring(basic.Role)required
Enum"buyer""seller"
Example: "buyer"
currencystringrequired

The currency that the price is specified in.

Example: "eur"
descriptionstringrequired

A description of the goods being sold.

Example: "Soccer ticket"
featuresArray of strings(basic.Feature)

features contains flags that modify the transaction flow.

Items Enum"require_seller_acceptance""use_hr_post""use_shippo"
Example: ["require_seller_acceptance"]
join_user_idstringrequired

The user that will be joined to the new transaction when it is created. It cannot be the ID of the user making the request.

Example: "feb33a87-3917-4538-9260-127c8a6b5232"
postage_feeinteger(int64)

The custom postage_fee for the transaction.

priceinteger(int64)required

The price of the goods being sold, in the currency's smallest unit. The charge value should correspond to the Trustap charge created with this price, otherwise this request will fail with a 400 error.

Example: 1234
curl -i -X POST \
  https://dev.stage.trustap.com/api/v1/me/transactions/create_and_join \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "charge": 78,
    "charge_calculator_version": 5,
    "creator_role": "seller",
    "currency": "eur",
    "description": "Soccer ticket",
    "join_user_id": "feb33a87-3917-4538-9260-127c8a6b5232",
    "price": 1234,
    "role": "seller"
  }'

Responses

Created

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Create a new transaction with both users

Request

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.

Bodyapplication/jsonrequired
buyer_idstringrequired

The id of the buyer for this transaction (it can be full user id or guest user id).

chargeinteger(int64)required

The charge value returned from a request to /charge.

charge_calculator_versioninteger(int64)required

The charge_calculator_version value returned from a request to /charge.

charge_sellerinteger(int64)

The seller charge value returned from a request to /charge.

client_idstring
creator_rolestring(basic.Role)required
Enum"buyer""seller"
Example: "buyer"
currencystring(Currency)required
Enum"aud""eur""gbp""myr""pln""sek""usd""huf"
Example: "eur"
descriptionstringrequired

A description of the goods being sold.

featuresArray of strings(basic.Feature)

features contains flags that modify the transaction flow.

Items Enum"require_seller_acceptance""use_hr_post""use_shippo"
Example: ["require_seller_acceptance"]
postage_feeinteger(int64)

The custom postage fee, this fee only applies in the case postage fee feature flag is enabled.

priceinteger(int64)required

The price of the goods being sold, in the currency's smallest unit. The charge value should correspond to the Trustap charge created with this price, otherwise this request will fail with a 400 error.

seller_idstringrequired

The id of the seller for this transaction (it can be full user id or guest user id).

curl -i -X POST \
  https://dev.stage.trustap.com/api/v1/me/transactions/create_with_guest_user \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "buyer_id": "1-bd5bb99j-95bf-87e2-ce0d-95e7541c6ad5",
      "charge": 78,
      "charge_calculator_version": 5,
      "charge_seller": 0,
      "creator_role": "seller",
      "currency": "eur",
      "description": "Soccer ticket",
      "price": 1234,
      "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
    }
  ]'

Responses

Created

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Get the list of Shippo shipping rates available

Request

This returns the list of Shippo shipping rates available for the addreses provided i.e sender's address and recipient's address.

Bodyapplication/jsonrequired
currencystringrequired
Example: "EUR"
customs_certifyboolean
Example: true
customs_certify_signerstring
Example: "Joe Doe"
customs_descriptionstring
Example: "T-Shirt"
customs_eel_pfcstring
customs_incotermstring
Example: "DDU"
customs_mass_unitstring
Example: "lb"
customs_net_weightnumber(double)
Example: 5
customs_non_delivery_optionstring
Enum"return""abandon"
Example: "return"
customs_origin_countrystring
Example: "US"
customs_quantityinteger(int64)
Example: 20
customs_value_amountstring
Example: 200
customs_value_currencystring
Example: "USD"
parcel_distance_unitstring(basic.DistanceUnit)required
Enum"in""cm"
Example: "cm"
parcel_heightnumber(double)required
Example: 10
parcel_lengthnumber(double)required
parcel_mass_unitstring(basic.MassUnit)required
Enum"lb""kg"
Example: "kg"
parcel_weightnumber(double)required
Example: 10
parcel_widthnumber(double)required
Example: 10
recipient_citystringrequired
Example: "New York"
recipient_countrystringrequired
Example: "us"
recipient_full_namestringrequired
Example: "Ivan Horvat"
recipient_phonestringrequired
Example: 123456789
recipient_statestringrequired
Example: "New York"
recipient_street_1stringrequired
Example: "21-27 Marshall Court"
recipient_street_2string
recipient_zip_codestringrequired
sender_citystringrequired
Example: "Altona"
sender_countrystringrequired
Example: "au"
sender_full_namestringrequired
Example: "Ana Potter"
sender_phonestringrequired
Example: 123456789
sender_statestringrequired
Example: "Victoria"
sender_street_1stringrequired
Example: "21-27 Marshall Court"
sender_street_2string
sender_zip_codestringrequired
curl -i -X POST \
  https://dev.stage.trustap.com/api/v1/shippo_shipping_rates \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "currency": "EUR",
    "customs_certify": true,
    "customs_certify_signer": "Joe Doe",
    "customs_description": "T-Shirt",
    "customs_incoterm": "DDU",
    "customs_mass_unit": "lb",
    "customs_net_weight": 5,
    "customs_non_delivery_option": "return",
    "customs_origin_country": "US",
    "customs_quantity": 20,
    "customs_value_amount": 200,
    "customs_value_currency": "USD",
    "parcel_distance_unit": "cm",
    "parcel_height": 10,
    "parcel_lenght": 10,
    "parcel_mass_unit": "lb",
    "parcel_weight": 10,
    "parcel_width": 10,
    "recipient_city": "New York",
    "recipient_country": "us",
    "recipient_full_name": "Ivan Horvat",
    "recipient_phone": 123456789,
    "recipient_postal_code": 10000,
    "recipient_state": "New York",
    "recipient_street_1": "21-27 Marshall Court",
    "sender_city": "Altona",
    "sender_country": "au",
    "sender_full_name": "Ana Potter",
    "sender_phone": 123456789,
    "sender_postal_code": 10000,
    "sender_state": "Victoria",
    "sender_street_1": "21-27 Marshall Court"
  }'

Responses

OK

Bodyapplication/json
ratesArray of objects(basic.ShippoRate)required
rates[].​amountstringrequired
rates[].​amount_localstringrequired
rates[].​arrives_bystring
rates[].​attributesArray of stringsrequired
rates[].​currencystringrequired
rates[].​currency_localstringrequired
rates[].​duration_termsstringrequired
rates[].​estimated_daysinteger(int64)required
rates[].​idstringrequired
rates[].​providerstringrequired
rates[].​provider_imagestringrequired
shipment_idstringrequired
Response
application/json
{ "rates": [ {} ], "shipment_id": "string" }

Get the supported carriers

Request

This returns the carriers that are currently supported for automated tracking in the online model. The carrier name should be shown to users but the code should be submitted to the /track endpoint when submitting tracking details. Likewise, when showing a transaction to the user, the carrier field stored with the transaction should be used to index these carriers and show the human-readable name of the carrier to the user, if this index is found.

curl -i -X GET \
  https://dev.stage.trustap.com/api/v1/supported_carriers \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/jsonArray [
codestringrequired
namestringrequired
]
Response
application/json
[ { "code": "an-post", "name": "An Post" }, { "code": "fedex", "name": "FedEx" }, { "code": "ups", "name": "UPS" }, { "code": "usps", "name": "USPS" } ]

Get a transaction using a join code

Request

Query
join_codestringrequired
curl -i -X GET \
  'https://dev.stage.trustap.com/api/v1/transactions?join_code=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Join a transaction using a join code

Request

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.

Query
join_codestringrequired
curl -i -X PUT \
  'https://dev.stage.trustap.com/api/v1/transactions?join_code=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Reject a transaction by its join code

Request

A transaction can't be rejected using its ID, because only the buyer and seller of a transaction can access a transaction using its ID.

Path
join_codestringrequired
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions-by-join-code/{join_code}/reject' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Get a transaction by its ID

Request

Path
transaction_idinteger(int64)required
curl -i -X GET \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Updates description, currency, price and/or charge of transaction

Request

Path
transaction_idinteger(int64)required
Bodyapplication/jsonrequired
chargeinteger(int64)

The charge value returned from a request to /charge.

Example: 78
charge_sellerinteger(int64)

The charge_seller value returned from a request to /charge.

currencystring
Example: "eur"
descriptionstring

A description of the goods being sold.

Example: "Soccer ticket"
priceinteger(int64)

The price of the goods being sold, in the currency's smallest unit. The charge value should correspond to the Trustap charge created with this price, otherwise this request will fail with a 400 error.

Example: 1234
curl -i -X PATCH \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "charge": 78,
    "currency": "eur",
    "description": "Soccer ticket",
    "price": 1234
  }'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Accept complaint for this transaction

Request

Path
transaction_idinteger(int64)required
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/accept_complaint' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Allow this listing-based transaction to proceed

Request

"Listing transactions" are transactions created from listings (using the /create_transaction endpoints for listings). Listings transactions for online transactions must be accepted by the creator of the listing using /accept_listing_transaction in order to proceed. Offline access is allowed for this endpoint when the user has granted the basic_ls:offline_accept_listing scope to the client that is performing the request.

Path
transaction_idinteger(int64)required
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/accept_listing_transaction' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

This endpoint lets the seller accept payment and is accessible only if the seller has granted a feature `require_seller_acceptance`.

Request

Offline access is allowed for this endpoint when the user has granted the basic_tx:offline_accept_payment scope to the client that is performing the request.

Path
transaction_idinteger(int64)required
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/accept_payment' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

This endpoint allows payment acceptance for the seller specified in the header as `Trustap-User`.

Request

Path
transaction_idinteger(int64)required
Headers
Trustap-Userstring

Required in client flows, where you make API calls on behalf of another Trustap user.

curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/accept_payment_with_guest_seller' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Trustap-User: string'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Get bank transfer details for transaction which payment method is `bank_transfer`

Request

Path
transaction_idinteger(int64)required
curl -i -X GET \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/bank_transfer_details' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
amountinteger(int64)required
currencystringrequired
financial_addressobject(basic.FinancialAddress)required
financial_address.​abaobject(basic.Aba)
financial_address.​ibanobject(basic.Iban)
financial_address.​sort_codeobject(basic.SortCode)
financial_address.​swiftobject(basic.Swift)
hosted_instructions_urlstringrequired
referencestringrequired
Response
application/json
{ "amount": 0, "currency": "string", "financial_address": { "aba": {}, "iban": {}, "sort_code": {}, "swift": {} }, "hosted_instructions_url": "string", "reference": "string" }

Get details of the buyer from this transaction

Request

Path
transaction_idinteger(int64)required
curl -i -X GET \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/buyer_details' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
emailstringrequired
nameobject(basic.UserDetailsName)
Example: {"first":"John","last":"Doe"}
phonestring
Response
application/json
{ "email": "string", "name": { "first": "John", "last": "Doe" }, "phone": "string" }

Cancel this transaction

Request

Transaction can be cancelled until it's paid or if the feature RequireSellerAcceptance is present, it can be cancelled until it's tracked. Offline access is allowed for this endpoint when the user has granted the basic_tx:offline_cancel scope to the client that is performing the request.

Path
transaction_idinteger(int64)required
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/cancel' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Cancel this transaction with a guest user

Request

This endpoint cancels a transaction for the user specified in the header as Trustap-User. Transaction can be cancelled until it's paid or if the feature RequireSellerAcceptance is present, it can be cancelled until it's tracked.

Path
transaction_idinteger(int64)required
Headers
Trustap-Userstring

Required in client flows, where you make API calls on behalf of another Trustap user.

curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/cancel_with_guest_user' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Trustap-User: string'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Get the Trustap fee for a transaction

Request

This returns the Trustap fee, in the currency's smallest unit, for a transaction involving goods with the supplied price. See the Stripe documentation for more details.

Path
transaction_idinteger(int64)required
Query
priceinteger(int64)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 request for the charge for this transaction would be /charge?price=1234&currency=usd.

quantityinteger(int64)

When creating transactions from a multi-use listing, the quantity parameter can be provided in order to generate a charge for the given price multiplied by the given quantity. See /multi_use_listings/{listingId}/create_transaction for more details.

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.

The default value is card.

curl -i -X GET \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/charge?payment_method=string&price=0&quantity=0' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
chargeinteger(int64)required

The Trustap fee that the buyer will pay, in the currency's smallest unit, for a queried amount. See the Stripe documentation for more details.

Example: 78
charge_calculator_versioninteger(int64)required

The version of the Trustap charge calculator that was used to calculate this charge.

This property is present for error-handling purposes. The Trustap API allows apps and users to query how much Trustap will charge for a transaction before creating a transaction. Trustap then requires the queried charge to be provided when creating a transaction or listing. At this point the charge is calculated again and checked against the provided charge, to ensure that the charge calculated for the new resource is the same as the one shown to the user. In the unlikely event that the Trustap charge calculator used to calculate the charge has been updated, then the charge_calculator_version property will be used to return an incorrect_calc_version to the API client, which will indicate that the /charge endpoint should be queried again to get the newest charge value.

Example: 5
charge_postage_buyerinteger(int64)

When the transaction handles the generation of postage labels, then charge_postage_buyer will be added to cover this fee together with charge_postage_client

charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required

The Trustap fee that the seller will pay, in the currency's smallest unit, for a queried amount. See the Stripe documentation for more details.

currencystringrequired
Example: "eur"
priceinteger(int64)required
Response
application/json
{ "charge": 78, "charge_calculator_version": 5, "currency": "eur" }

This endpoint allows a client's claim transactions for sellers on behalf of the buyer. It requires to have granted the `basic_tx:offline_claim` scope and API Key authentication. The endpoint is not accessible for guests and full users.

Request

Path
transaction_idinteger(int64)required
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/claim_for_buyer' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

This endpoint allows a client's claim transactions for sellers on behalf of the seller. It requires to have granted the `basic_tx:offline_claim` scope and API Key authentication. The endpoint is not accessible for guests and full users.

Request

Path
transaction_idinteger(int64)required
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/claim_for_seller' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Submit a detailed complaint for this transaction

Request

Path
transaction_idinteger(int64)required
Bodyapplication/jsonrequired
descriptionstringrequired
Example: "Item was fake"
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/complain_with_description' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "description": "Item was fake"
  }'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Submit a detailed complaint for this transaction for the guest buyer specified in the header as `Trustap-User`.

Request

Path
transaction_idinteger(int64)required
Headers
Trustap-Userstring

Required in client flows, where you make API calls on behalf of another Trustap user.

Bodyapplication/jsonrequired
descriptionstringrequired
Example: "Item was fake"
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/complain_with_guest_buyer' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Trustap-User: string' \
  -d '{
    "description": "Item was fake"
  }'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Confirm delivery for this transaction

Request

This endpoint allows the buyer to manually confirm the delivery of the item in the case that the state of the transaction was not updated asynchronously by Trustap.

Path
transaction_idinteger(int64)required
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/confirm_delivery' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Confirm delivery for this transaction

Request

This endpoint allows the client to manually confirm the delivery on behalf of the guest buyer specified in the header as Trustap-User.

Path
transaction_idinteger(int64)required
Headers
Trustap-Userstring

Required in client flows, where you make API calls on behalf of another Trustap user.

curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/confirm_delivery_with_guest_buyer' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Trustap-User: string'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Set a delivery point for HR posta

Request

Path
transaction_idinteger(int64)required
Bodyapplication/jsonrequired
carrierstringrequired
Example: "posta_hr"
citystringrequired
Example: "Zagreb"
delivery_center_codestringrequired
Example: "321ha32"
delivery_typestringrequired
Enum"parcel_locker""postal_office"
Example: "parcel_locker"
emailstringrequired
Example: "ivan.horvat@email.com"
full_namestringrequired
Example: "Ivan Horvat"
house_numberstringrequired
Example: 147
house_number_suffixstring
Example: "A"
phonestringrequired
Example: 997896541
postal_codestringrequired
Example: 10000
streetstringrequired
Example: "Ilica"
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/delivery_point' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "carrier": "posta_hr",
    "city": "Zagreb",
    "delivery_center_code": "321ha32",
    "delivery_type": "parcel_locker",
    "email": "ivan.horvat@email.com",
    "full_name": "Ivan Horvat",
    "house_number": 147,
    "house_number_suffix": "A",
    "phone": 997896541,
    "postal_code": 10000,
    "street": "Ilica"
  }'

Responses

OK

Bodyapplication/json
carrierstringrequired
citystringrequired
delivery_center_codestringrequired
delivery_typestringrequired
emailstringrequired
full_namestringrequired
house_numberstringrequired
house_number_suffixstringrequired
phonestringrequired
postal_codestringrequired
streetstringrequired
Response
application/json
{ "carrier": "string", "city": "string", "delivery_center_code": "string", "delivery_type": "string", "email": "string", "full_name": "string", "house_number": "string", "house_number_suffix": "string", "phone": "string", "postal_code": "string", "street": "string" }

End the complaint period for this transaction

Request

Path
transaction_idinteger(int64)required
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/end_complaint_period' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Extend tracking details submission deadline for this transaction

Request

This endpoint allows the buyer to extend the tracking details submission deadline for the seller.

Path
transaction_idinteger(int64)required
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/extend_tracking_deadline' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Generate a shipment label for the transaction's parcel

Request

This endpoint returns a PDF containing the label for the transaction's parcel. Both sender and recipient details have to be submitted before making a call to this endpoint.

Path
transaction_idinteger(int64)required
Query
carrierstringrequired
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/generate_shipment_label?carrier=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
labelstringrequired
Response
application/json
{ "label": "string" }

Set payment details and process payment for this transaction with this user's balance

Request

Path
transaction_idinteger(int64)required
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/pay_with_balance' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Set a pick up point for carrier (i.e HR posta)

Request

Path
transaction_idinteger(int64)required
Bodyapplication/jsonrequired
carrierstringrequired
Example: "posta_hr"
citystringrequired
Example: "Zagreb"
delivery_typestringrequired
Enum"parcel_locker""postal_office"
Example: "parcel_locker"
emailstringrequired
Example: "ivan.horvat@email.com"
full_namestringrequired
Example: "Ivan Horvat"
house_numberstringrequired
Example: 147
house_number_suffixstring
Example: "A"
phonestringrequired
Example: 997896541
pick_up_center_codestringrequired
Example: "321ha32"
postal_codestringrequired
Example: 10000
streetstringrequired
Example: "Ilica"
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/pick_up_point' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "carrier": "posta_hr",
    "city": "Zagreb",
    "delivery_type": "parcel_locker",
    "email": "ivan.horvat@email.com",
    "full_name": "Ivan Horvat",
    "house_number": 147,
    "house_number_suffix": "A",
    "phone": 997896541,
    "pick_up_center_code": "321ha32",
    "postal_code": 10000,
    "street": "Ilica"
  }'

Responses

OK

Bodyapplication/json
carrierstringrequired
citystringrequired
delivery_typestringrequired
emailstringrequired
full_namestringrequired
house_numberstringrequired
house_number_suffixstringrequired
phonestringrequired
pick_up_center_codestringrequired
postal_codestringrequired
streetstringrequired
Response
application/json
{ "carrier": "string", "city": "string", "delivery_type": "string", "email": "string", "full_name": "string", "house_number": "string", "house_number_suffix": "string", "phone": "string", "pick_up_center_code": "string", "postal_code": "string", "street": "string" }

Cancel this listing-based transaction

Request

"Listing transactions" are transactions created from listings (using the /create_transaction endpoints for listings). Listings transactions for online transactions must be accepted by the creator of the listing using /accept_listing_transaction in order to proceed. This endpoint instead rejects the listing transaction.

Path
transaction_idinteger(int64)required
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/reject_listing_transaction' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Get details of the seller from this transaction

Request

Path
transaction_idinteger(int64)required
curl -i -X GET \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/seller_details' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
emailstringrequired
nameobject(basic.UserDetailsName)
Example: {"first":"John","last":"Doe"}
phonestring
Response
application/json
{ "email": "string", "name": { "first": "John", "last": "Doe" }, "phone": "string" }

Set the payment method to be used for this transaction

Request

Different payment methods incur different rates, so the payment method to be used for a transaction must be set before the payment is made. This requires retrieving the charge associated with the payment method using GET /transactions/{transaction_id}/charge, and passing the generated charge as a parameter to this endpoint.

Path
transaction_idinteger(int64)required
Bodyapplication/jsonrequired
chargeinteger(int64)required

The charge value returned from a request to /charge.

charge_sellerinteger(int64)

The charge_seller value returned from a request to /charge.

currencystringrequired
payment_methodstring
priceinteger(int64)required

The price of the goods being sold, in the currency's smallest unit. The charge value should correspond to the Trustap charge created with this price, otherwise this request will fail with a 400 error.

curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/set_payment_method' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "charge": 0,
    "charge_seller": 0,
    "currency": "string",
    "payment_method": "string",
    "price": 0
  }'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Get shipping details of the buyer from this transaction

Request

Path
transaction_idinteger(int64)required
curl -i -X GET \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/shipping_details' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
addressobject(ShippingDetailsAddress)required
address.​citystringrequired
address.​countrystringrequired
address.​line1stringrequired
address.​line2stringrequired
address.​postal_codestringrequired
address.​statestringrequired
namestringrequired
phonestringrequired
Response
application/json
{ "address": { "city": "string", "country": "string", "line1": "string", "line2": "string", "postal_code": "string", "state": "string" }, "name": "string", "phone": "string" }

Post shipping details of the buyer from this transaction

Request

Path
transaction_idinteger(int64)required
Bodyapplication/jsonrequired
address_line_1string
Example: "3672 Massillon Rd"
address_line_2string
Example: "3672 Massillon Rd"
citystring
Example: "Green"
countrystringnon-emptyrequired
Example: "us"
namestringnon-emptyrequired
Example: "John Doe"
phonestring
Example: "330-896-9303"
postal_codestring
Example: 44685
statestring
Example: "Ohio"
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/shipping_details' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "address_line_1": "3672 Massillon Rd",
    "address_line_2": "3672 Massillon Rd",
    "city": "Green",
    "country": "us",
    "name": "John Doe",
    "phone": "330-896-9303",
    "postal_code": 44685,
    "state": "Ohio"
  }'

Responses

OK

Bodyapplication/json
addressobject(ShippingDetailsAddress)required
address.​citystringrequired
address.​countrystringrequired
address.​line1stringrequired
address.​line2stringrequired
address.​postal_codestringrequired
address.​statestringrequired
namestringrequired
phonestringrequired
Response
application/json
{ "address": { "city": "string", "country": "string", "line1": "string", "line2": "string", "postal_code": "string", "state": "string" }, "name": "string", "phone": "string" }

Set sender's or recipient's address for Shippo shipment

Request

Path
transaction_idinteger(int64)required
Bodyapplication/jsonrequired
citystringrequired
Example: "Altona"
countrystringrequired
Example: "au"
full_namestringrequired
Example: "Ivan Horvat"
is_sender_addressbooleanrequired
phonestringrequired
Example: 4215559099
statestringrequired
Example: "Victoria"
street_1stringrequired
Example: "21-27 Marshall Court"
street_2string
zip_codestringrequired
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/shippo_address' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "city": "Altona",
    "country": "au",
    "full_name": "Ivan Horvat",
    "phone": 4215559099,
    "postal_code": 10000,
    "state": "Victoria",
    "street_1": "21-27 Marshall Court"
  }'

Responses

OK

Bodyapplication/json
citystringrequired
countrystringrequired
full_namestringrequired
phonestringrequired
statestringrequired
street_1stringrequired
street_2string
zip_codestringrequired
Response
application/json
{ "city": "string", "country": "string", "full_name": "string", "phone": "string", "state": "string", "street_1": "string", "street_2": "string", "zip_code": "string" }

Send customs declaration for this transaction's shipment

Request

Path
transaction_idinteger(int64)required
Bodyapplication/jsonrequired
certifybooleanrequired
Example: true
certify_signerstringrequired
Example: "Joe Doe"
descriptionstringrequired
Example: "T-Shirt"
eel_pfcstring
incotermstring
Example: "DDU"
mass_unitstringrequired
Example: "lb"
net_weightnumber(double)required
Example: 5
non_delivery_optionstringrequired
Enum"return""abandon"
Example: "return"
origin_countrystringrequired
Example: "US"
quantityinteger(int64)required
Example: 20
value_amountstringrequired
Example: 200
value_currencystringrequired
Example: "USD"
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/shippo_customs_declaration' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "certify": true,
    "certify_signer": "Joe Doe",
    "description": "T-Shirt",
    "incoterm": "DDU",
    "mass_unit": "lb",
    "net_weight": 5,
    "non_delivery_option": "return",
    "origin_country": "US",
    "quantity": 20,
    "value_amount": 200,
    "value_currency": "USD"
  }'

Responses

No Content

Response
No content

Set Shippo parcel details for the transaction

Request

Path
transaction_idinteger(int64)required
Bodyapplication/jsonrequired
distance_unitstring(basic.DistanceUnit)required
Enum"in""cm"
Example: "cm"
heightnumber(double)required
Example: 10
lengthnumber(double)required
mass_unitstring(basic.DistanceUnit)required
Enum"in""cm"
Example: "cm"
shipment_datestringrequired

Date the shipment will be tendered to the carrier. Must be in the format 2014-01-18T00:35:03.463Z

weightnumber(double)required
Example: 10
widthnumber(double)required
Example: 10
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/shippo_parcel_details' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "distance_unit": "cm",
    "height": 10,
    "lenght": 10,
    "mass_unit": "lb",
    "weight": 10,
    "width": 10
  }'

Responses

OK

Bodyapplication/json
distance_unitstringrequired
heightnumber(double)required
lengthnumber(double)required
mass_unitstringrequired
shipment_datestringrequired
weightnumber(double)required
widthnumber(double)required
Response
application/json
{ "distance_unit": "string", "height": 0.1, "length": 0.1, "mass_unit": "string", "shipment_date": "string", "weight": 0.1, "width": 0.1 }

Get Shippo generated label details for this transaction.

Request

Path
transaction_idinteger(int64)required
curl -i -X GET \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/shippo_shipping_label' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
label_urlstringrequired
tracking_codestringrequired
tracking_urlstringrequired
Response
application/json
{ "label_url": "string", "tracking_code": "string", "tracking_url": "string" }

Set Shippo shipping rate for transaction. This rate will be used to purchase the Shippo label once the transaction is paid. Shipment ID can be provided as an optional parameter, depending on the flow which is used to obtain it.

Request

Path
transaction_idinteger(int64)required
Bodyapplication/jsonrequired
rate_idstringrequired
Example: "d755e91036a84c15bd5318f4b67c7707"
shipment_idstring
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/shippo_shipping_rate' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "rate_id": "d755e91036a84c15bd5318f4b67c7707"
  }'

Responses

No Content

Response
No content

Get Shippo shipping rates based on sender's and recipient's address and parcel details.

Request

Path
transaction_idinteger(int64)required
curl -i -X GET \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/shippo_shipping_rates' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/jsonArray [
amountstringrequired
amount_localstringrequired
arrives_bystring
attributesArray of stringsrequired
currencystringrequired
currency_localstringrequired
duration_termsstringrequired
estimated_daysinteger(int64)required
idstringrequired
providerstringrequired
provider_imagestringrequired
]
Response
application/json
[ { "amount": "string", "amount_local": "string", "arrives_by": "string", "attributes": [], "currency": "string", "currency_local": "string", "duration_terms": "string", "estimated_days": 0, "id": "string", "provider": "string", "provider_image": "string" } ]

Get the Stripe client secret for this transaction

Request

This endpoint is used for the asynchronous payment flow using Stripe. The client_secret returned from this endpoint should be passed to stripe.confirmCardPayment to start the payment process.

Path
transaction_idinteger(int64)required
curl -i -X GET \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/stripe_client_secret' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
client_secretstringrequired
Response
application/json
{ "client_secret": "string" }

Get the details for the Stripe publishable key that is in use for this transaction

Request

Returns the Publishable Key for the Stripe Platform which is hosting this transaction.

Path
transaction_idinteger(int64)required
curl -i -X GET \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/stripe_publishable_key' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
publishable_keystringrequired
Example: "pk_xXxXxXxXxXx"
Response
application/json
{ "publishable_key": "pk_xXxXxXxXxXx" }

Set postal tracking details for this transaction

Request

After the tracking information has been submitted then the state of the transaction will be updated asynchronously by Trustap once the delivery of the item has been confirmed, at which point the delivered field of the transaction will be set. Offline access is allowed for this endpoint when the user has granted the basic_tx:offline_track scope to the client that is performing the request.

Path
transaction_idinteger(int64)required
Bodyapplication/jsonrequired
carrierstringnon-emptyrequired
Example: "ups"
tracking_codestringnon-emptyrequired
Example: "***"
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/track' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "carrier": "ups",
    "tracking_code": "***"
  }'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Set postal tracking details for this transaction

Request

Add tracking details for the guest seller specified in the header as Trustap-User.

Path
transaction_idinteger(int64)required
Headers
Trustap-Userstring

Required in client flows, where you make API calls on behalf of another Trustap user.

Bodyapplication/jsonrequired
carrierstringnon-emptyrequired
Example: "ups"
tracking_codestringnon-emptyrequired
Example: "***"
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions/{transaction_id}/track_with_guest_seller' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Trustap-User: string' \
  -d '{
    "carrier": "ups",
    "tracking_code": "***"
  }'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

This endpoint allows a full user to claim for a transaction as buyer given a claim secret.

Request

Path
secretstringrequired
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/transactions_by_claim_secret/{secret}/claim_as_buyer' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
amount_refundedinteger(int64)
amount_releasedinteger(int64)
buyer_idstring
Example: "feb33a87-3917-4538-9260-127c8a6b5232"
cancelledstring(date-time)
chargeinteger(int64)required
Example: 78
charge_international_paymentinteger(int64)
charge_postage_buyerinteger(int64)
charge_postage_clientinteger(int64)
charge_sellerinteger(int64)required
claimed_by_buyerstring(date-time)
client_idstringrequired
Example: "trustap-app"
complainedstring(date-time)
complaintobject(Complaint)
Example: {"description":"Item was fake"}
complaint_period_deadlinestring(date-time)
complaint_period_endedstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
currencystringrequired

The currency of the transaction. Note that, at present, the buyer must pay using the transaction's currency and the seller will be paid in the transaction's currency.

Example: "eur"
deliveredstring(date-time)
Example: "2019-12-25T13:00:00Z"
deniedstring(date-time)
descriptionstringrequired
Example: "Soccer ticket"
funds_releasedstring(date-time)
Example: "2019-12-26T14:00:00Z"
idinteger(int64)required
Example: 1309
is_payment_in_progressbooleanrequired

If the transaction is paid via a delayed payment method, such as SEPA debit, this field will be true until the payment has fully succeeded or failed.

join_codestring
joinedstring(date-time)
Example: "2019-12-25T10:00:00Z"
listing_creator_acceptedstring(date-time)
listing_creator_rejectedstring(date-time)
listing_idstring

If the transaction is created from a listing then this is the ID of that listing; otherwise this property is omitted.

listing_typestring(ListingType)
Enum"single_use""multi_use"
Example: "single_use"
paidstring(date-time)
Example: "2019-12-25T11:00:00Z"
payment_acceptedstring(date-time)
payment_refundedstring(date-time)
posta_hr_trackingobject(PostaHrTracking)
Example: {"barcode":"ABC123456","barcode_generated":"2019-12-26T14:00:00Z"}
priceinteger(int64)required
Example: 1234
quantityinteger(int64)required
Example: 1
released_to_sellerboolean
reviewobject(basic.Review)
review_flaggedstring(date-time)
seller_idstring
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
shippo_transaction_idstring
statusstringrequired
Example: "funds_released"
trackedstring(date-time)
Example: "2019-12-25T12:00:00Z"
trackingobject(Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232", "charge": 78, "charge_seller": 0, "client_id": "trustap-app", "created": "2019-12-25T09:00:00Z", "currency": "eur", "delivered": "2019-12-25T13:00:00Z", "description": "Soccer ticket", "funds_released": "2019-12-26T14:00:00Z", "id": 1309, "is_payment_in_progress": false, "joined": "2019-12-25T10:00:00Z", "paid": "2019-12-25T11:00:00Z", "posta_hr_tracking": { "barcode": "ABC12345", "barcode_generated": "2019-12-25T12:00:00Z" }, "price": 1234, "quantity": 1, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "funds_released", "tracked": "2019-12-25T12:00:00Z", "tracking": { "carrier": "ups", "tracking_code": "***" } }

Clients

Operations

Users

Operations

Personal

Operations

Online Multi-use Listings

Operations

Notifications

Operations

Online Single-use Listings

Operations

F2F Transactions

Operations

F2F Multi-use Listings

Operations

F2F Single-use Listings

Operations

Subscriptions

Operations