Trustap API API Reference
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.
API Endpoint
https://dev.stage.trustap.com/api/v1
Contact: help@trustap.com
Request Content-Types: application/json
Response Content-Types: application/json
Schemes: https
Version: 0.1.0
Authentication
APIKey
OAuth2
Online Transactions
Get multiple transactions by their IDs
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
A comma-separated list of transaction IDs
OK
Bad Request
code
can be one of the following:
ids_missing
invalid_id
too_many_ids
Response Example (200 OK)
[
[
{
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"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,
"created": "2018-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 609,
"join_code": "c9cd6a9d-1096-4d38-b4aa-2c354beac845",
"price": 1234,
"status": "created"
},
null,
{
"buyer_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"charge": 78,
"created": "2018-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 609,
"join_code": "c9cd6a9d-1096-4d38-b4aa-2c354beac845",
"price": 1234,
"status": "created"
}
]
]
Response Example (400 Bad Request)
{
"code": "ids_missing",
"error": "`ids` query parameter is required"
}
Get the Trustap fee for a transaction
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.
The currency that the price
is specified in.
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¤cy=usd
.
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.
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
.
(no description)
OK
Bad Request
code
can be one of the following:
currency_missing
invalid_price
negative_price
price_too_low
unsupported_currency
Response Example (200 OK)
{
"charge": 78,
"charge_calculator_version": 5,
"charge_seller": 0,
"currency": "eur",
"price": 1234
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Get the list of facilities for a given carrier.
- country_code: string
-
ISO 3166-1 alpha-2 country code.
- delivery_type: string
-
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
- search_text: string
-
Filter text that is used to search available facilities. It can include
City
,Postal Code
or a string contained within Facility name.
(no description)
Request Example
{
"country": "HR",
"delivery_type": "parcel_locker",
"search_text": "Zagreb"
}
OK
Bad Request
code
can be one of the following:
invalid_carrier
invalid_delivery_type
Response Example (200 OK)
{
"address": "123 Street 1 Zabreb, Croatia",
"city": "Zagreb",
"facility_type": "post_office",
"name": "Zagreb Main Office",
"postal_code": "123456HR"
}
Response Example (400 Bad Request)
{
"code": "invalid_carrier",
"error": "`carrier` is not a supported carrier"
}
Get online transactions for the logged-in user
Transactions are currently sorted by ID.
Only return transactions that were created chronologically before the transaction with this ID
Only return transactions that were created chronologically after the transaction with this ID (i.e. with smaller IDs)
The maximum number of transactions to return
OK
Bad Request
code
can be one of the following:
invalid_before_id
invalid_after_id
invalid_limit
Response Example (200 OK)
[
{
"charge": 78,
"charge_seller": 0,
"created": "2019-12-25T09:00:00.000Z",
"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:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 609,
"join_code": "c9cd6a9d-1096-4d38-b4aa-2c354beac845",
"price": 1234,
"status": "created"
}
]
Response Example (400 Bad Request)
{
"code": "invalid_after_id",
"error": "invalid after id"
}
Create a new transaction
A request to this endpoint must be preceded by a call to /charge
with the price of the goods specified in price
.
- charge: integer (int64)
-
The
charge
value returned from a request to/charge
. - charge_calculator_version: integer (int64)
-
The
charge_calculator_version
value returned from a request to/charge
. - charge_seller: integer (int64)
-
The seller
charge
value returned from a request to/charge
. - client_id: string
- currency: string
-
The currency that the
price
is specified in. - description: string
-
A description of the goods being sold.
- features: object[]
-
features
contains flags that modify the transaction flow. - price: integer (int64)
-
The price of the goods being sold, in the
currency
's smallest unit. Thecharge
value should correspond to the Trustap charge created with this price, otherwise this request will fail with a400
error. - role: basic.Role
Request Example
{
"charge": 78,
"charge_calculator_version": 5,
"currency": "eur",
"description": "Soccer ticket",
"price": 1234,
"role": "seller"
}
Created
Bad Request
code
can be one of the following:
incorrect_calc_version
incorrect_charge
incorrect_charge_seller
invalid_calc_version
negative_price
price_too_low
Response Example (201 Created)
{
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"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"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Create a new transaction with both users
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.
- charge: integer (int64)
-
The
charge
value returned from a request to/charge
. - charge_calculator_version: integer (int64)
-
The
charge_calculator_version
value returned from a request to/charge
. - charge_seller: integer (int64)
-
The seller
charge
value returned from a request to/charge
. - client_id: string
- creator_role: basic.Role
-
This is the role that will be given to the user making the request; the user specified by
join_user_id
will be given the complementary role. - currency: string
-
The currency that the
price
is specified in. - description: string
-
A description of the goods being sold.
- features: object[]
-
features
contains flags that modify the transaction flow. - join_user_id: string
-
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.
- price: integer (int64)
-
The price of the goods being sold, in the
currency
's smallest unit. Thecharge
value should correspond to the Trustap charge created with this price, otherwise this request will fail with a400
error.
Request Example
{
"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"
}
Created
Bad Request
code
can be one of the following:
invalid_join_user_id
duplicate_user_id
: The user specified byjoin_user_id
is the user making the request.incorrect_calc_version
incorrect_charge
incorrect_charge_seller
unsupported_currency
user_not_owned_by_client
invalid_calc_version
negative_price
price_too_low
user_already_joined
already_cancelled
feature_not_found
Response Example (201 Created)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "joined"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Create a new transaction with both users
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.
- buyer_id: string
-
The id of the buyer for this transaction (it can be full user id or guest user id).
- charge: integer (int64)
-
The
charge
value returned from a request to/charge
. - charge_calculator_version: integer (int64)
-
The
charge_calculator_version
value returned from a request to/charge
. - charge_seller: integer (int64)
-
The seller
charge
value returned from a request to/charge
. - client_id: string
- creator_role: basic.Role
-
This is the role that will be given to the user making the request; the user specified by
join_user_id
will be given the complementary role. - currency: Currency
- description: string
-
A description of the goods being sold.
- features: object[]
-
features
contains flags that modify the transaction flow. - postage_fee: integer (int64)
-
The custom
postage fee
, this fee only applies in the casepostage fee feature flag
is enabled. - price: integer (int64)
-
The price of the goods being sold, in the
currency
's smallest unit. Thecharge
value should correspond to the Trustap charge created with this price, otherwise this request will fail with a400
error. - seller_id: string
-
The id of the seller for this transaction (it can be full user id or guest user id).
Request Example
[
{
"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"
}
]
Created
Bad Request
code
can be one of the following:
incorrect_calc_version
incorrect_charge
incorrect_charge_seller
invalid_calc_version
negative_price
price_too_low
incompatible_countries
unsupported_currency
invalid_role
no_guest_user
Response Example (201 Created)
{
"buyer_id": "bd5bb99f-85bf-47e1-be0d-15e7541c6ad9",
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T09:01:00.000Z",
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "joined"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Get the supported carriers
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.
OK
Response Example (200 OK)
[
{
"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
(no description)
OK
Bad Request
code
can be one of the following:
join_code_missing
Not Found
Response Example (200 OK)
{
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"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"
}
Response Example (400 Bad Request)
{
"code": "join_code_missing",
"error": "`join_code` query parameter is required"
}
Join a transaction using a join code
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.
(no description)
OK
Bad Request
code
can be one of the following:
join_code_missing
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "joined"
}
Response Example (400 Bad Request)
{
"code": "join_code_missing",
"error": "`join_code` query parameter is required"
}
Reject a transaction by its join code
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.
(no description)
OK
Bad Request
Not Found
Response Example (200 OK)
{
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"denied": "2019-12-25T10:00:00.000Z",
"description": "Soccer ticket",
"id": 1309,
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "rejected"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Get a transaction by its ID
(no description)
OK
Bad Request
code
can be one of the following:
invalid_id
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "joined"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Updates description, currency, price and/or charge of transaction
- charge: integer (int64)
-
The
charge
value returned from a request to/charge
. - charge_seller: integer (int64)
-
The
charge_seller
value returned from a request to/charge
. - currency: string
- description: string
-
A description of the goods being sold.
- price: integer (int64)
-
The price of the goods being sold, in the
currency
's smallest unit. Thecharge
value should correspond to the Trustap charge created with this price, otherwise this request will fail with a400
error.
(no description)
Request Example
{
"charge": 78,
"currency": "eur",
"description": "Soccer ticket",
"price": 1234
}
OK
Bad Request
code
can be one of the following:
invalid_id
second_party_already_joined
values_not_changed
Forbidden
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "created"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Allow this listing-based transaction to proceed
"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.
(no description)
OK
Bad Request
code
can be one of the following:
no_listing
: This transaction wasn't created from a listingalready_accepted
already_rejected
Forbidden
code
can be one of the following:
not_creator
Not Found
Response Example (200 OK)
{
"accepted_by_listing_creator": "2019-12-25T11:00:00.000Z",
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"listing_id": 1990,
"listing_type": "single_use",
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "paid"
}
Response Example (400 Bad Request)
{
"code": "already_accepted",
"error": "transaction already accepted"
}
Response Example (403 Forbidden)
{
"code": "not_creator",
"error": "current user is not the creator for the source listing"
}
This endpoint lets the seller accept payment and is accessible only if the seller has granted a feature require_seller_acceptance
.
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.
(no description)
OK
Bad Request
code
can be one of the following:
missing_required_feature
payment_already_accepted
transaction_not_paid_yet
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"paid": "2019-12-25T11:00:00.000Z",
"payment_accepted": "2019-12-26T11:00:00.000Z",
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "payment_accepted"
}
Response Example (400 Bad Request)
{
"code": "transaction_not_paid_yet",
"error": "this transaction is not paid yet"
}
This endpoint allows payment acceptance for the seller specified in the header as Trustap-User
.
(no description)
OK
Bad Request
code
can be one of the following:
missing_required_feature
payment_already_accepted
transaction_not_paid_yet
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"paid": "2019-12-25T11:00:00.000Z",
"payment_accepted": "2019-12-26T11:00:00.000Z",
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "payment_accepted"
}
Response Example (400 Bad Request)
{
"code": "transaction_not_paid_yet",
"error": "this transaction is not paid yet"
}
Get details of the buyer from this transaction
(no description)
OK
Not Found
Response Example (200 OK)
{
"email": "string",
"name": {
"first": "John",
"last": "Doe"
},
"phone": "string"
}
Cancel this transaction
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.
(no description)
OK
Bad Request
code
can be one of the following:
invalid_id
already_paid
already_cancelled
tracking_already_added
Forbidden
Not Found
Response Example (200 OK)
{
"cancelled": "2022-04-26T11:00:00.000Z",
"charge": 78,
"created": "2022-04-26T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "cancelled"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Cancel this transaction with a guest user
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.
(no description)
OK
Bad Request
code
can be one of the following:
invalid_id
already_paid
already_cancelled
tracking_already_added
Forbidden
Not Found
Response Example (200 OK)
{
"cancelled": "2022-04-26T11:00:00.000Z",
"charge": 78,
"created": "2022-04-26T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "cancelled"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Get the Trustap fee for a transaction
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.
(no description)
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¤cy=usd
.
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.
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
.
OK
Bad Request
code
can be one of the following:
invalid_payment_method
unsupported_currency
currency_missing
invalid_price
negative_price
price_too_low
Response Example (200 OK)
{
"charge": 78,
"charge_calculator_version": 5,
"currency": "eur"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
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.
(no description)
OK
Bad Request
code
can be one of the following:
already_claimed
cannot_claim_own_transaction
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "joined"
}
Response Example (400 Bad Request)
{
"code": "already_claimed",
"error": "transaction already claimed"
}
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.
(no description)
OK
Bad Request
code
can be one of the following:
already_claimed
cannot_claim_own_transaction
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "joined"
}
Response Example (400 Bad Request)
{
"code": "already_claimed",
"error": "transaction already claimed"
}
Submit a detailed complaint for this transaction
- description: string
(no description)
Request Example
{
"description": "Item was fake"
}
OK
Bad Request
code
can be one of the following:
empty_complaint_description
already_complained
unconfirmed_delivery
: The complaint period for this transaction has not yet started.complaint_period_ended_prematurely
: The buyer has already ended the complaint period.complaint_period_expired
funds_already_released
invalid_id
Forbidden
code
can be one of the following:
not_buyer
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"complained": "2019-12-25T14:00:00.000Z",
"complaint": {
"description": "Item was fake"
},
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"delivered": "2019-12-25T13:00:00.000Z",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"paid": "2019-12-25T11:00:00.000Z",
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "complained",
"tracked": "2019-12-25T12:00:00.000Z",
"tracking": {
"carrier": "ups",
"tracking_code": "***"
}
}
Response Example (400 Bad Request)
{
"code": "complaint_period_expired",
"error": "complaint period has expired"
}
Response Example (403 Forbidden)
{
"code": "not_buyer",
"error": "current user is not buyer"
}
Submit a detailed complaint for this transaction for the guest buyer specified in the header as Trustap-User
.
- description: string
(no description)
Request Example
{
"description": "Item was fake"
}
OK
Bad Request
code
can be one of the following:
empty_complaint_description
already_complained
unconfirmed_delivery
: The complaint period for this transaction has not yet started.complaint_period_ended_prematurely
: The buyer has already ended the complaint period.complaint_period_expired
funds_already_released
invalid_id
Forbidden
code
can be one of the following:
not_buyer
Not Found
Response Example (200 OK)
{
"buyer_id": "1-feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"complained": "2019-12-25T14:00:00.000Z",
"complaint": {
"description": "Item was fake"
},
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"delivered": "2019-12-25T13:00:00.000Z",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"paid": "2019-12-25T11:00:00.000Z",
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "complained",
"tracked": "2019-12-25T12:00:00.000Z",
"tracking": {
"carrier": "ups",
"tracking_code": "***"
}
}
Response Example (400 Bad Request)
{
"code": "complaint_period_expired",
"error": "complaint period has expired"
}
Response Example (403 Forbidden)
{
"code": "not_buyer",
"error": "current user is not buyer"
}
Confirm delivery for this transaction
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.
(no description)
OK
Bad Request
code
can be one of the following:
tracking_not_added
delivery_already_set
invalid_id
Forbidden
code
can be one of the following:
not_buyer
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"delivered": "2019-12-26T12:00:00.000Z",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"paid": "2019-12-25T11:00:00.000Z",
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "delivered",
"tracked": "2019-12-25T12:00:00.000Z",
"tracking": {
"carrier": "ups",
"tracking_code": "***"
}
}
Response Example (400 Bad Request)
{
"code": "delivery_already_set",
"error": "delivery details already added"
}
Response Example (403 Forbidden)
{
"code": "not_buyer",
"error": "current user is not buyer"
}
Confirm delivery for this transaction
This endpoint allows the client to manually confirm the delivery on behalf of the guest buyer specified in the header as Trustap-User
.
(no description)
OK
Bad Request
code
can be one of the following:
tracking_not_added
delivery_already_set
invalid_id
Forbidden
code
can be one of the following:
not_buyer
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"delivered": "2019-12-26T12:00:00.000Z",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"paid": "2019-12-25T11:00:00.000Z",
"price": 1234,
"seller_id": "1-ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "delivered",
"tracked": "2019-12-25T12:00:00.000Z",
"tracking": {
"carrier": "ups",
"tracking_code": "***"
}
}
Response Example (400 Bad Request)
{
"code": "delivery_already_set",
"error": "delivery details already added"
}
Response Example (403 Forbidden)
{
"code": "not_buyer",
"error": "current user is not buyer"
}
Set a delivery point for HR posta
- carrier: string
- city: string
- delivery_center_code: string
- delivery_type: string , x ∈ { parcel_locker , postal_office }
- email: string
- full_name: string
- house_number: string
- house_number_suffix: string
- phone: string
- postal_code: string
- street: string
(no description)
Request Example
{
"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"
}
OK
Bad Request code
can be one of the following:
empty_join_code
empty_name
empty_phone
empty_email
empty_street
empty_house_number
empty_postal_code
empty_city
empty_delivery_center_code
empty_delivery_type
empty_carrier
unsupported_carrier
unsupported_delivery_type
Response Example (200 OK)
{
"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"
}
Response Example (400 Bad Request)
{
"code": "empty_name",
"error": "`name` parameter is required"
}
End the complaint period for this transaction
(no description)
OK
Bad Request
code
can be one of the following:
complaint_period_expired
already_complained
complaint_period_ended_prematurely
invalid_id
unconfirmed_delivery
: The complaint period for this transaction has not yet started.
Forbidden
code
can be one of the following:
not_buyer
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"complaint_period_ended": "2019-12-25T14:00:00.000Z",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"delivered": "2019-12-25T13:00:00.000Z",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"paid": "2019-12-25T11:00:00.000Z",
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "complaint_period_ended",
"tracked": "2019-12-25T12:00:00.000Z",
"tracking": {
"carrier": "ups",
"tracking_code": "***"
}
}
Response Example (400 Bad Request)
{
"code": "complaint_period_expired",
"error": "complaint period has expired"
}
Response Example (403 Forbidden)
{
"code": "not_buyer",
"error": "current user is not buyer"
}
Extend tracking details submission deadline for this transaction
This endpoint allows the buyer to extend the tracking details submission deadline for the seller.
(no description)
OK
Bad Request
code
can be one of the following:
invalid_id
tracking_already_added
payment_details_not_added
tracking_submission_window_not_started
Forbidden
code
can be one of the following:
not_buyer
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"paid": "2019-12-25T11:00:00.000Z",
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "paid",
"tracking_details_window_start": "2019-12-25T12:00:00.000Z"
}
Response Example (403 Forbidden)
{
"code": "not_buyer",
"error": "current user is not buyer"
}
Generate a shipment label for the transaction's parcel
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.
(no description)
(no description)
OK
Bad Request
code
can be one of the following:
pick_up_details_missing
drop_off_details_missing
Forbidden
code
can be one of the following:
not_seller
Not Found
Response Content-Types: application/json
Response Example (200 OK)
{
"label": "string"
}
Response Example (400 Bad Request)
{
"code": "pick_up_details_missing",
"error": "there are one or more pick up details properties missing"
}
Response Example (403 Forbidden)
{
"code": "not_seller",
"error": "current user is not seller"
}
Set a pick up point for carrier (i.e HR posta)
- carrier: string
- city: string
- delivery_type: string , x ∈ { parcel_locker , postal_office }
- email: string
- full_name: string
- house_number: string
- house_number_suffix: string
- phone: string
- pick_up_center_code: string
- postal_code: string
- street: string
(no description)
Request Example
{
"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"
}
OK
Bad Request
code
can be one of the following:
empty_join_code
empty_full_name
empty_phone
empty_email
empty_street
empty_house_number
empty_postal_code
empty_city
empty_pick_up_center_code
empty_delivery_type
empty_carrier
unsupported_carrier
unsupported_delivery_type
Response Example (200 OK)
{
"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"
}
Response Example (400 Bad Request)
{
"code": "empty_name",
"error": "`name` parameter is required"
}
Cancel this listing-based transaction
"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.
(no description)
OK
Bad Request
code
can be one of the following:
no_listing
: This transaction wasn't created from a listingalready_accepted
already_rejected
second_party_not_joined
Forbidden
code
can be one of the following:
not_creator
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"listing_id": 1990,
"listing_type": "single_use",
"price": 1234,
"rejected_by_listing_creator": "2019-12-25T11:00:00.000Z",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "paid"
}
Response Example (400 Bad Request)
{
"code": "already_accepted",
"error": "transaction already accepted"
}
Response Example (403 Forbidden)
{
"code": "not_creator",
"error": "current user is not the creator for the source listing"
}
Get details of the seller from this transaction
(no description)
OK
Not Found
Response Example (200 OK)
{
"email": "string",
"name": {
"first": "John",
"last": "Doe"
},
"phone": "string"
}
Set the payment method to be used for this transaction
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.
- charge: integer (int64)
-
The
charge
value returned from a request to/charge
. - charge_seller: integer (int64)
-
The
charge_seller
value returned from a request to/charge
. - currency: string
- payment_method: string
- price: integer (int64)
-
The price of the goods being sold, in the
currency
's smallest unit. Thecharge
value should correspond to the Trustap charge created with this price, otherwise this request will fail with a400
error.
(no description)
Request Example
{
"charge": "integer (int64)",
"charge_seller": "integer (int64)",
"currency": "string",
"payment_method": "string",
"price": "integer (int64)"
}
OK
Bad Request
code
can be one of the following:
invalid_payment_method
unsupported_currency
currency_missing
incorrect_charge
incorrect_charge_seller
incorrect_price
incorrect_currency
Forbidden
code
can be one of the following:
not_buyer
Not Found
Response Example (200 OK)
{
"charge": 78,
"charge_seller": 0,
"created": "2019-12-25T09:00:00.000Z",
"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"
}
Response Example (400 Bad Request)
{
"code": "incorrect_price",
"error": "specified price doesn't match expected price"
}
Response Example (403 Forbidden)
{
"code": "not_buyer",
"error": "current user is not buyer"
}
Get shipping details of the buyer from this transaction
(no description)
OK
Not Found
Response Example (200 OK)
{
"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
- address_line_1: string
- address_line_2: string
- city: string
- country: string (at least 1 chars)
- name: string (at least 1 chars)
- phone: string
- postal_code: string
- state: string
(no description)
Request Example
{
"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"
}
OK
Bad Request
code
can be one of the following:
empty_name
empty_country
Not Found
Response Example (200 OK)
{
"address": {
"city": "string",
"country": "string",
"line1": "string",
"line2": "string",
"postal_code": "string",
"state": "string"
},
"name": "string",
"phone": "string"
}
Get the Stripe client secret for this transaction
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.
(no description)
OK
Bad Request
code
can be one of the following:
already_paid
invalid_id
not_accepted
: This transaction was created from a listing but the listing's creator has not yet accepted this transaction.
Forbidden
code
can be one of the following:
not_buyer
Not Found
Response Example (200 OK)
{
"client_secret": "string"
}
Response Example (400 Bad Request)
{
"code": "already_paid",
"error": "payment already made"
}
Response Example (403 Forbidden)
{
"code": "not_buyer",
"error": "current user is not buyer"
}
Get the details for the Stripe publishable key that is in use for this transaction
Returns the Publishable Key for the Stripe Platform which is hosting this transaction.
(no description)
OK
Bad Request
code
can be one of the following:
invalid_id
Forbidden
code
can be one of the following:
not_buyer
not_seller
Not Found
Response Content-Types: application/json
Response Example (200 OK)
{
"publishable_key": "pk_xXxXxXxXxXx"
}
Response Example (400 Bad Request)
{
"code": "invalid_id",
"error": "couldn't parse transaction id: abc"
}
Response Example (403 Forbidden)
{
"code": "not_buyer",
"error": "current user is not buyer"
}
Set postal tracking details for this transaction
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.
- carrier: string (at least 1 chars)
- tracking_code: string (at least 1 chars)
(no description)
Request Example
{
"carrier": "ups",
"tracking_code": "***"
}
OK
Bad Request
code
can be one of the following:
invalid_id
empty_carrier
empty_tracking_code
tracking_already_added
payment_details_not_added
tracking_details_deadline_expired
already_cancelled
Forbidden
code
can be one of the following:
not_seller
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"paid": "2019-12-25T11:00:00.000Z",
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "tracked",
"tracked": "2019-12-25T12:00:00.000Z",
"tracking": {
"carrier": "ups",
"tracking_code": "***"
}
}
Response Example (400 Bad Request)
{
"code": "empty_carrier",
"error": "`carrier` parameter is required"
}
Response Example (403 Forbidden)
{
"code": "not_seller",
"error": "current user is not seller"
}
Set postal tracking details for this transaction
Add tracking details for the guest seller specified in the header as Trustap-User
.
- carrier: string (at least 1 chars)
- tracking_code: string (at least 1 chars)
(no description)
Request Example
{
"carrier": "ups",
"tracking_code": "***"
}
OK
Bad Request
code
can be one of the following:
invalid_id
empty_carrier
empty_tracking_code
tracking_already_added
payment_details_not_added
tracking_details_deadline_expired
already_cancelled
Forbidden
code
can be one of the following:
not_seller
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"paid": "2019-12-25T11:00:00.000Z",
"price": 1234,
"seller_id": "1-ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "tracked",
"tracked": "2019-12-25T12:00:00.000Z",
"tracking": {
"carrier": "ups",
"tracking_code": "***"
}
}
Response Example (400 Bad Request)
{
"code": "empty_carrier",
"error": "`carrier` parameter is required"
}
Response Example (403 Forbidden)
{
"code": "not_seller",
"error": "current user is not seller"
}
This endpoint allows a full user to claim for a transaction as buyer given a claim secret.
(no description)
OK
Bad Request
code
can be one of the following:
already_claimed
cannot_claim_own_transaction
missing_secret
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "joined"
}
Clients
Get supported registration countries for the current client
OK
Response Example (200 OK)
[
"string"
]
Users
Create a new guest user
This endpoint creates guest user which can be used as the buyer or the seller. If guest user is used as the seller in a transaction, they need to be created with country_code
parameter correctly set. This is important because of currencies they can use in their transactions. tos_acceptance
is the parameter which is important for disputes/chargeback and represent the timestamp when Trustap ToS were accepted
https://www.trustap.com/terms.
- country_code: string
- email: string (at least 1 chars)
- first_name: string (at least 1 chars)
- last_name: string (at least 1 chars)
- tos_acceptance: users.TosAcceptance
Request Example
{
"country_code": "IE",
"email": "guest@test.com",
"first_name": "Test",
"last_name": "User",
"tos_acceptance": {
"ip": "192.168.1.2",
"unix_timestamp": 1672531200
}
}
Created
Bad Request code
can be one of the following:
* `email_missing`
* `first_name_missing`
* `last_name_missing`
* `tos_acceptance_ip_missing`
* `invalid_country_code`
* `invalid_email`
* `invalid_tos_acceptance_date`
Response Example (201 Created)
{
"id": "1-feb33a87-3917-4538-9260-127c8a6b5232"
}
Get the balance for the current user in each currency
OK
Bad Request
Response Content-Types: application/json
Response Example (200 OK)
{
"available": [
{
"amount": "integer (int64)",
"currency": "string"
}
]
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Retrieve a user by email address
(no description)
OK
Bad Request code
can be one of the following:
user_not_found
Response Example (200 OK)
{
"id": "2-feb33a87-3917-4538-9260-127c8a6b5232"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Create a new user
This endpoint creates a new user account which can be used as the buyer or the seller in a transaction.
- country_code: string (at least 2 chars)
- email: string (at least 1 chars)
- tos_acceptance: users.TosAcceptance
Request Example
{
"country_code": "string",
"email": "string",
"tos_acceptance": {
"ip": "string",
"unix_timestamp": "integer (int64)"
}
}
Created
Bad Request code
can be one of the following:
* `email_missing`
* `email_used_for_the_client`
Response Example (201 Created)
{
"id": "2-feb33a87-3917-4538-9260-127c8a6b5232"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Personal
Get debit account details
OK
Response Example (200 OK)
{
"bank_account": {
"bank_name": "string",
"country": "string",
"currency_alpha_2": "string",
"last4": "string",
"routing": "string"
},
"card": {
"last4": "string",
"month": "integer (int64)",
"year": "integer (int64)"
}
}
Set debit account details
- bank_details: personal.BankDetails
- bank_token: string
- card_details: string
- type: string , x ∈ { bank , bank_token , card }
Request Example
{
"bank_details": {
"account_number": "string",
"country_code": "string",
"currency": "string",
"routing_number": "string"
},
"bank_token": "string",
"card_details": "string",
"type": "string"
}
OK
Bad Request
code
can be one of the following:
routing_number_invalid
: The routing number is invalid.account_number_invalid
: The account number is invalid.parameter_missing
: Parameter is missing.invalid_account_type
: The given debit account type is invalid.bank_account_unusable
: The bank account is unusable.bank_details_missing
: The bank details are missing.bank_token_missing
: The bank token is missing.card_details_missing
: The card details are missing.
Response Example (200 OK)
{
"bank_account": {
"bank_name": "string",
"country": "string",
"currency_alpha_2": "string",
"last4": "string",
"routing": "string"
},
"card": {
"last4": "string",
"month": "integer (int64)",
"year": "integer (int64)"
}
}
Get instant payout balance
OK
Response Example (200 OK)
{
"amount": "integer (int64)",
"currency": "string"
}
Get the payout attempts that have occurred for this account
Payout attempts are returned in reverse chronological order - the first attempt in the returned array will be the most recent payout attempt.
OK
Response Example (200 OK)
[
{
"amount": "integer (int64)",
"arrival_date": "integer (int64)",
"failure_code": "string",
"status": "string"
}
]
Get verification status for the front side of the secondary identity document
OK
Response Example (200 OK)
{
"previously_submitted": true,
"status": "verifying"
}
Get verification status for the back side of the secondary identity document
OK
Response Example (200 OK)
{
"previously_submitted": true,
"status": "verifying"
}
Get personal details for the local user
OK
Response Example (200 OK)
{
"address_city": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"cannot_unset": "boolean",
"cannot_update": "boolean",
"max_length": "integer",
"min_length": "integer"
},
"value": "string"
},
"address_country": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"cannot_unset": "boolean",
"cannot_update": "boolean",
"max_length": "integer",
"min_length": "integer"
},
"value": "string"
},
"address_line1": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"cannot_unset": "boolean",
"cannot_update": "boolean",
"max_length": "integer",
"min_length": "integer"
},
"value": "string"
},
"address_line2": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"cannot_unset": "boolean",
"cannot_update": "boolean",
"max_length": "integer",
"min_length": "integer"
},
"value": "string"
},
"address_postal_code": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"cannot_unset": "boolean",
"cannot_update": "boolean",
"max_length": "integer",
"min_length": "integer"
},
"value": "string"
},
"address_state": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"cannot_unset": "boolean",
"cannot_update": "boolean",
"max_length": "integer",
"min_length": "integer"
},
"value": "string"
},
"dob": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"max_date": "integer",
"max_day": "integer",
"max_month": "integer",
"max_year": "integer",
"min_day": "integer",
"min_month": "integer",
"min_year": "integer"
},
"value": {
"day": "integer",
"month": "integer",
"year": "integer"
}
},
"id_number": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"max_length": "integer",
"min_length": "integer"
},
"value": {
"provided": "boolean"
}
},
"name_first": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"cannot_unset": "boolean",
"cannot_update": "boolean",
"max_length": "integer",
"min_length": "integer"
},
"value": "string"
},
"name_last": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"cannot_unset": "boolean",
"cannot_update": "boolean",
"max_length": "integer",
"min_length": "integer"
},
"value": "string"
},
"phone": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"number_min_length": "integer"
},
"value": {
"dial_code": "string",
"dial_code_country": "string",
"number": "string"
}
}
}
Set personal details for the local user
- address_city: string
- address_line1: string
- address_line2: string
- address_postal_code: string
- address_state: string
- dob: object
- id_number: string
-
The full ID number for this user.
- name_first: string
- name_last: string
- phone: object
Request Example
{
"address_city": "string",
"address_line1": "string",
"address_line2": "string",
"address_postal_code": "string",
"address_state": "string",
"dob": {
"day": "integer",
"month": "integer",
"year": "integer"
},
"id_number": "string",
"name_first": "string",
"name_last": "string",
"phone": {
"dial_code": "string",
"dial_code_country": "string",
"number": "string"
}
}
OK
Response Example (200 OK)
{
"address_city": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"cannot_unset": "boolean",
"cannot_update": "boolean",
"max_length": "integer",
"min_length": "integer"
},
"value": "string"
},
"address_country": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"cannot_unset": "boolean",
"cannot_update": "boolean",
"max_length": "integer",
"min_length": "integer"
},
"value": "string"
},
"address_line1": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"cannot_unset": "boolean",
"cannot_update": "boolean",
"max_length": "integer",
"min_length": "integer"
},
"value": "string"
},
"address_line2": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"cannot_unset": "boolean",
"cannot_update": "boolean",
"max_length": "integer",
"min_length": "integer"
},
"value": "string"
},
"address_postal_code": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"cannot_unset": "boolean",
"cannot_update": "boolean",
"max_length": "integer",
"min_length": "integer"
},
"value": "string"
},
"address_state": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"cannot_unset": "boolean",
"cannot_update": "boolean",
"max_length": "integer",
"min_length": "integer"
},
"value": "string"
},
"dob": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"max_date": "integer",
"max_day": "integer",
"max_month": "integer",
"max_year": "integer",
"min_day": "integer",
"min_month": "integer",
"min_year": "integer"
},
"value": {
"day": "integer",
"month": "integer",
"year": "integer"
}
},
"id_number": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"max_length": "integer",
"min_length": "integer"
},
"value": {
"provided": "boolean"
}
},
"name_first": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"cannot_unset": "boolean",
"cannot_update": "boolean",
"max_length": "integer",
"min_length": "integer"
},
"value": "string"
},
"name_last": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"cannot_unset": "boolean",
"cannot_update": "boolean",
"max_length": "integer",
"min_length": "integer"
},
"value": "string"
},
"phone": {
"invalid_reason": {
"code": "string",
"description": "string"
},
"required_now": "boolean",
"status": "string",
"type": "string",
"validation": {
"number_min_length": "integer"
},
"value": {
"dial_code": "string",
"dial_code_country": "string",
"number": "string"
}
}
}
Get verification status for the front side of the primary identity document
OK
Response Example (200 OK)
{
"previously_submitted": true,
"status": "verifying"
}
Get verification status for the back side of the primary identity document
OK
Response Example (200 OK)
{
"previously_submitted": true,
"status": "verifying"
}
Get the details for the Stripe publishable key the user is linked to.
Returns the Publishable Key for the Stripe Platform which the user is linked to.
OK
Response Example (200 OK)
{
"publishable_key": "pk_xXxXxXxXxXx"
}
Get the status of a user's ability to accept payouts. This endpoint requires the user identified by the Trustap-User
header to have granted the profile
scope to the client that is performing the request.
Offline access is allowed for this endpoint when the user has granted the profile
scope to the client that is performing the request.
OK
Response Example (200 OK)
{
"status": "verifying"
}
Add a new payout method to the current account using a payment method ID
- payment_method_id: string
Request Example
{
"payment_method_id": "string"
}
OK
Response Example (200 OK)
{
"bank_account": {
"bank_name": "string",
"country": "string",
"currency_alpha_2": "string",
"last4": "string",
"routing": "string"
},
"card": {
"last4": "string",
"month": "integer (int64)",
"year": "integer (int64)"
}
}
Get ownership details from the given SetupIntent using Stripe Financial Connections
(no description)
OK
Conflict
code
can be one of the following:
unconfirmed_setup_intent
: The given SetupIntent has not been confirmed
Response Example (200 OK)
{
"email": "string",
"name": "string",
"raw_address": "string",
"raw_phone": "string"
}
Get a SetupIntent ID and secret for starting a Stripe Financial Connections session
OK
Response Example (200 OK)
{
"setup_intent_client_secret": "string",
"setup_intent_id": "string"
}
Creates verification method and message if not available.
OK
Response Example (200 OK)
{
"message": "not_available",
"verification_method": "stripe_identity"
}
Creates verification session and retrieves client secret for it.
Offline access is allowed for this endpoint when the user has granted the profile
scope to the client that is performing the request.
OK
Bad Request
code
can be one of the following:
stripe_identity_not_available
: stripe identity is currently not available for this account.
Response Example (201 Created)
{
"verification_session_client_secret": "vs_1P**********************_******_****_********************************************************************************0PVs"
}
Get verification status of the user.
Offline access is allowed for this endpoint when the user has granted the profile
scope to the client that is performing the request.
OK
Response Example (200 OK)
{
"verification_session_id": "vs_1PH0bmDnTEntFpTD2xDXZy9t",
"verification_session_status": "created"
}
Online Multi-use Listings
Create a new multi-use listing for the logged-in user
Multi-use listings are disabled once payment has been submitted for a transaction created from it. Offline access is allowed for this endpoint when the user has granted the basic_ls:offline_create
scope to the client that is performing the request.
- charge: integer (int64)
-
The
charge
value returned from a request to/charge
. - charge_calculator_version: integer (int64)
-
The
charge_calculator_version
value returned from a request to/charge
. - charge_seller: integer (int64)
-
The
charge_seller
value returned from a request to/charge
. - currency: Currency
- description: string
-
A description of the goods being sold.
- price: integer (int64)
-
The price of the goods being sold, in the
currency
's smallest unit. Thecharge
value should correspond to the Trustap charge created with this price, otherwise this request will fail with a400
error. - role: basic.Role
Request Example
{
"charge": 78,
"charge_calculator_version": 5,
"currency": "eur",
"description": "Soccer ticket",
"price": 1234,
"role": "seller"
}
Created
Bad Request
code
can be one of the following:
invalid_role
: '' is not a valid roleincorrect_charge
incorrect_charge_seller
Response Example (201 Created)
{
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"description": "Soccer ticket",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"pricing": {
"charge": 78,
"price": 1234
}
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Delete this listing
(no description)
No Content
Not Found
Get a listing by its ID
(no description)
OK
Not Found
Response Example (200 OK)
{
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a"
}
Patch listing properties
- charge: integer (int64)
-
The
charge
value returned from a request to/charge
. - charge_calculator_version: integer (int64)
-
The
charge_calculator_version
value returned from a request to/charge
. - charge_seller: integer (int64)
-
The
charge_seller
value returned from a request to/charge
. - currency: Currency
- description: string
- price: integer (int64)
-
The price of the goods being sold, in the
currency
's smallest unit. Thecharge
value should correspond to the Trustap charge created with this price, otherwise this request will fail with a400
error.
(no description)
Request Example
{
"charge": 78,
"charge_calculator_version": 5,
"currency": "eur",
"description": "Soccer ticket",
"price": 1234
}
OK
Bad Request
code
can be one of the following:
empty_body
: The request body is empty.partial_pricing
: When updating a pricing field, all 3 ofcurrency
,price
andcharge
must be supplied.
Not Found
Response Example (200 OK)
{
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"skip_remainder": true
}
Create a transaction from this listing
Calling /create_transaction
with no parameters will create a new transaction with the details provided by the listing.
The optional quantity
parameter can be passed to create a transaction for a multiple of the original listing. In this case, the price
and charge
for the new transaction will also need to be passed.
As an example, consider a listing for a chair with a price of 1234
EUR
. If a user wants to buy 10 of these in a single transaction then the charge for the total can be retrieved using GET /charge?price=1234¤cy=usd&quantity=10
(note the addition of the optional quantity parameter at the end). This will return a price
of 12340
and an associated charge
. These new values must then be passed to /create_transaction
with quantity=10
, which will create a new transaction with the new pricing information. The new transaction will also include a quantity
field, which doesn't have a functional effect on the transaction, but is included for informational purposes.
Note that this functionality is not available for single-use listings, from which only singular transactions may be created.
(no description)
(no description)
(no description)
(no description)
(no description)
Created
Bad Request
code
can be one of the following:
listing_is_disabled
no_listing_currency
: The source listing doesn't have a currency.no_listing_price
: The source listing doesn't have pricing.no_listing_descr
: The source listing doesn't have a description.is_listing_creator
: The current user created this listing.
Not Found
Response Example (201 Created)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"charge_seller": 0,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"listing_id": 1990,
"listing_type": "multi_use",
"price": 1234,
"quantity": 10,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "joined"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Create a transaction from this listing
(no description)
Created
Bad Request
code
can be one of the following:
listing_is_disabled
no_listing_currency
: The source listing doesn't have a currency.no_listing_price
: The source listing doesn't have pricing.no_listing_descr
: The source listing doesn't have a description.is_listing_creator
: The current user created this listing.
Not Found
Response Example (201 Created)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"charge_seller": 0,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"listing_id": 1990,
"listing_type": "multi_use",
"price": 1234,
"quantity": 10,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "joined"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Disable this listing
Calling /create_transaction
on a disabled listing will return a 400
response.
(no description)
OK
Not found
Response Example (200 OK)
{
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"description": "Soccer ticket",
"disabled": "2019-12-25T10:00:00.000Z",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"pricing": {
"charge": 78,
"price": 1234
}
}
Enable this listing
(no description)
OK
Not found
Response Example (200 OK)
{
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"description": "Soccer ticket",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"pricing": {
"charge": 78,
"price": 1234
}
}
Set description for this listing
- description: string
(no description)
Request Example
{
"description": "Soccer ticket"
}
OK
Not Found
Response Example (200 OK)
{
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"description": "Soccer ticket",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a"
}
Set pricing for this listing
- charge: integer (int64)
-
The
charge
value returned from a request to/charge
. - charge_calculator_version: integer (int64)
-
The
charge_calculator_version
value returned from a request to/charge
. - charge_seller: integer (int64)
-
The
charge_seller
value returned from a request to/charge
. - currency: Currency
- price: integer (int64)
-
The price of the goods being sold, in the
currency
's smallest unit. Thecharge
value should correspond to the Trustap charge created with this price, otherwise this request will fail with a400
error.
(no description)
Request Example
{
"charge": 78,
"charge_calculator_version": 5,
"currency": "eur",
"price": 1234
}
OK
Not Found
Response Example (200 OK)
{
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a"
}
Notifications
Get notifications for the logged-in user
Only return transactions that were created chronologically before the transaction with this ID
Only return notifications that were created chronologically after the notification with this ID (i.e. with smaller IDs)
The maximum number of notifications to return
OK
Bad Request
code
can be one of the following:
invalid_before_id
invalid_after_id
invalid_limit
Response Example (200 OK)
[
{
"created": "2019-12-25T10:00:00.000Z",
"description": "Buyer has joined transaction for 'Soccer ticket'",
"id": 1990,
"target": "basic/1309",
"user_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
}
]
Response Example (400 Bad Request)
{
"code": "invalid_after_id",
"error": "invalid after id"
}
Get a notification by its ID
(no description)
OK
Not Found
Response Example (200 OK)
{
"created": "2019-12-25T10:00:00.000Z",
"description": "Buyer has joined transaction for 'Soccer ticket'",
"id": 1990,
"target": "basic/1309",
"user_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
}
Mark this notification as read
(no description)
OK
Not Found
Response Example (200 OK)
{
"created": "2019-12-25T10:00:00.000Z",
"description": "Buyer has joined transaction for 'Soccer ticket'",
"id": 1990,
"read": "2019-12-25T11:00:00.000Z",
"target": "basic/1309",
"user_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
}
Online Single-use Listings
Create a new single-use listing for the logged-in user
Single-use listings are disabled once payment has been submitted for a transaction created from it. Offline access is allowed for this endpoint when the user has granted the basic_ls:offline_create
scope to the client that is performing the request.
- charge: integer (int64)
-
The
charge
value returned from a request to/charge
. - charge_calculator_version: integer (int64)
-
The
charge_calculator_version
value returned from a request to/charge
. - charge_seller: integer (int64)
-
The
charge_seller
value returned from a request to/charge
. - currency: Currency
- description: string
-
A description of the goods being sold.
- price: integer (int64)
-
The price of the goods being sold, in the
currency
's smallest unit. Thecharge
value should correspond to the Trustap charge created with this price, otherwise this request will fail with a400
error. - role: basic.Role
Request Example
{
"charge": 78,
"charge_calculator_version": 5,
"currency": "eur",
"description": "Soccer ticket",
"price": 1234,
"role": "seller"
}
Created
Bad Request
code
can be one of the following:
invalid_role
: '' is not a valid roleincorrect_charge
incorrect_charge_seller
Response Example (201 Created)
{
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"description": "Soccer ticket",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"pricing": {
"charge": 78,
"price": 1234
}
}
Delete this listing
(no description)
No Content
Not Found
Get a listing by its ID
(no description)
OK
Not Found
Response Example (200 OK)
{
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a"
}
Patch listing properties
- charge: integer (int64)
-
The
charge
value returned from a request to/charge
. - charge_calculator_version: integer (int64)
-
The
charge_calculator_version
value returned from a request to/charge
. - charge_seller: integer (int64)
-
The
charge_seller
value returned from a request to/charge
. - currency: Currency
- description: string
- price: integer (int64)
-
The price of the goods being sold, in the
currency
's smallest unit. Thecharge
value should correspond to the Trustap charge created with this price, otherwise this request will fail with a400
error.
(no description)
Request Example
{
"charge": 78,
"charge_calculator_version": 5,
"currency": "eur",
"description": "Soccer ticket",
"price": 1234
}
OK
Bad Request
code
can be one of the following:
empty_body
: The request body is empty.partial_pricing
: When updating a pricing field, all 3 ofcurrency
,price
andcharge
must be supplied.
Not Found
Response Example (200 OK)
{
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"description": "Soccer ticket",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"pricing": {
"charge": 78,
"price": 1234
}
}
Create a transaction from this listing
(no description)
Created
Bad Request
code
can be one of the following:
listing_is_disabled
no_listing_currency
: The source listing doesn't have a currency.no_listing_price
: The source listing doesn't have pricing.no_listing_descr
: The source listing doesn't have a description.is_listing_creator
: The current user created this listing.
Not Found
Response Example (201 Created)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"listing_id": 1990,
"listing_type": "single_use",
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "joined"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Create a transaction from this listing
(no description)
Created
Bad Request
code
can be one of the following:
listing_is_disabled
no_listing_currency
: The source listing doesn't have a currency.no_listing_price
: The source listing doesn't have pricing.no_listing_descr
: The source listing doesn't have a description.is_listing_creator
: The current user created this listing.
Not Found
Response Example (201 Created)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"charge": 78,
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"listing_id": 1990,
"listing_type": "single_use",
"price": 1234,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"status": "joined"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Disable this listing
Calling /create_transaction
on a disabled listing will return a 400
response.
(no description)
OK
Not found
Response Example (200 OK)
{
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"description": "Soccer ticket",
"disabled": "2019-12-25T10:00:00.000Z",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"pricing": {
"charge": 78,
"price": 1234
}
}
Enable this listing
(no description)
OK
Not found
Response Example (200 OK)
{
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"description": "Soccer ticket",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"pricing": {
"charge": 78,
"price": 1234
}
}
Set description for this listing
- description: string
(no description)
Request Example
{
"description": "Soccer ticket"
}
OK
Not Found
Response Example (200 OK)
{
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"description": "Soccer ticket",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a"
}
Set pricing for this listing
- charge: integer (int64)
-
The
charge
value returned from a request to/charge
. - charge_calculator_version: integer (int64)
-
The
charge_calculator_version
value returned from a request to/charge
. - charge_seller: integer (int64)
-
The
charge_seller
value returned from a request to/charge
. - currency: Currency
- price: integer (int64)
-
The price of the goods being sold, in the
currency
's smallest unit. Thecharge
value should correspond to the Trustap charge created with this price, otherwise this request will fail with a400
error.
(no description)
Request Example
{
"charge": 78,
"charge_calculator_version": 5,
"currency": "eur",
"price": 1234
}
OK
Not Found
Response Example (200 OK)
{
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"description": "Soccer ticket",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"pricing": {
"charge": 78,
"price": 1234
}
}
F2F Transactions
Get multiple transactions by their IDs
This endpoint takes a required ids
parameter that contains a comma-separated list of transaction IDs, and returns the transactions corresponding to those IDs. A maximum of 50 IDs may be provided, and results are returned in the order specified in ids
, and duplicates are preserved. Transactions that couldn't be found will be returned as null
values in the result array. The following example request results in the 200 OK
response described below, assuming that the transaction with ID 1990
couldn't be found:
https://dev.stage.trustap.com/api/v1/p2p/batch/transactions?ids=1309,609,1990,609
A comma-separated list of transaction IDs
OK
Bad Request
code
can be one of the following:
ids_missing
invalid_id
too_many_ids
Response Example (200 OK)
[
[
{
"buyer_handover_confirmed": "2019-12-25T16:00:00.000Z",
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_accepted": "2019-12-25T12:00:00.000Z",
"deposit_paid": "2019-12-25T11:00:00.000Z",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"funds_released": "2019-12-25T17:00:00.000Z",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"priced": "2019-12-25T13:00:00.000Z",
"pricing": {
"charge": 190,
"price": 5000
},
"remainder_paid": "2019-12-25T14:00:00.000Z",
"seller_handover_confirmed": "2019-12-25T15:00:00.000Z",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "funds_released"
},
{
"buyer_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"created": "2018-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 609,
"join_code": "c9cd6a9d-1096-4d38-b4aa-2c354beac845",
"skip_remainder": false,
"status": "created"
},
null,
{
"buyer_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"created": "2018-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 609,
"join_code": "c9cd6a9d-1096-4d38-b4aa-2c354beac845",
"skip_remainder": false,
"status": "created"
}
]
]
Response Example (400 Bad Request)
{
"code": "ids_missing",
"error": "`ids` query parameter is required"
}
Get the Trustap fee for a face-to-face transaction
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.
The currency that the price
is specified in.
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 /p2p/charge?price=1234¤cy=usd
.
The fee_multiplier
parameter is used to apply a higher percentage fee based on the total price of the transaction. The percentage fee is calculated multiplying the percentage fee
by the fee_multiplier
.
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 /p2p/multi_use_listings/{listingId}/create_transaction
for more details.
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
.
OK
Bad Request
code
can be one of the following:
currency_missing
invalid_price
negative_price
price_too_low
unsupported_currency
Response Example (200 OK)
{
"charge": 78,
"charge_calculator_version": 2,
"currency": "eur"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Get face-to-face transactions for the logged-in user
Transactions are currently sorted by ID.
Only return transactions that were created chronologically before the transaction with this ID
Only return transactions that were created chronologically after the transaction with this ID (i.e. with smaller IDs)
The maximum number of transactions to return
OK
Bad Request
code
can be one of the following:
invalid_before_id
invalid_after_id
invalid_limit
Response Example (200 OK)
[
{
"buyer_handover_confirmed": "2019-12-25T16:00:00.000Z",
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_accepted": "2019-12-25T12:00:00.000Z",
"deposit_paid": "2019-12-25T11:00:00.000Z",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"funds_released": "2019-12-25T17:00:00.000Z",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"priced": "2019-12-25T13:00:00.000Z",
"pricing": {
"charge": 190,
"price": 5000
},
"remainder_paid": "2019-12-25T14:00:00.000Z",
"seller_handover_confirmed": "2019-12-25T15:00:00.000Z",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "funds_released"
},
{
"buyer_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"created": "2018-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 609,
"join_code": "c9cd6a9d-1096-4d38-b4aa-2c354beac845",
"skip_remainder": false,
"status": "created"
}
]
Response Example (400 Bad Request)
{
"code": "invalid_after_id",
"error": "invalid after id"
}
Create a new face-to-face transaction
Note that this endpoint is similar to POST /me/transactions
but takes deposit_price
and deposit_charge
fields instead of the price
and charge
fields. Offline access is allowed for this endpoint when the user has granted the p2p_tx:offline_create_join
scope to the client that is performing the request.
- charge_calculator_version: integer (int64)
- currency: Currency
- deposit_charge: integer (int64)
- deposit_price: integer (int64)
- description: string
-
A description of the goods being sold.
- role: basic.Role
- skip_remainder: boolean
-
If
skip_remainder
istrue
then this transaction will move to the "confirm handover" step after the deposit has been accepted.
Request Example
{
"charge_calculator_version": 2,
"currency": "eur",
"deposit_charge": 78,
"deposit_price": 1234,
"description": "Soccer ticket",
"role": "seller"
}
Created
Bad Request
code
can be one of the following:
incorrect_calc_version
incorrect_charge
incorrect_charge_seller
invalid_calc_version
negative_price
price_too_low
Response Example (201 Created)
{
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 1309,
"join_code": "54c5bb89-a5ea-4be7-ad7a-e740c2eebab4",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "created"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Create a new face-to-face transaction with both users
This endpoint is an optimised call that allows a transaction to be created and joined in a single request. It requires the user identified by join_user_id
to have granted the p2p_tx:offline_create_join
scope to the client that is performing the request.
Note that this endpoint is similar to POST /me/transactions
but takes deposit_price
and deposit_charge
fields instead of the price
and charge
fields.
- charge_calculator_version: integer (int64)
- creator_role: basic.Role
-
This is the role that will be given to the user making the request; the user specified by
join_user_id
will be given the complementary role. - currency: Currency
- deposit_charge: integer (int64)
- deposit_price: integer (int64)
- description: string
-
A description of the goods being sold.
- join_user_id: string
-
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.
- skip_remainder: boolean
-
If
skip_remainder
istrue
then the transaction will move to the "confirm handover" step after the deposit has been accepted.
Request Example
{
"charge_calculator_version": 2,
"creator_role": "seller",
"currency": "eur",
"deposit_charge": 78,
"deposit_price": 1234,
"description": "Soccer ticket",
"join_user_id": "feb33a87-3917-4538-9260-127c8a6b5232"
}
Created
Bad Request
code
can be one of the following:
duplicate_user_id
: The user specified byjoin_user_id
is the user making the request.incorrect_calc_version
incorrect_charge
incorrect_charge_seller
invalid_calc_version
negative_price
price_too_low
Response Example (201 Created)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "joined"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Create a new face-to-face transaction with both users
This endpoint is an optimised call that allows a transaction to be created and joined in a single request. It requires the online user to have granted the p2p_tx:offline_create_join
scope to the client that is performing the request. This endpoint allows creating a transaction with both buyer and seller as guest users, or one party to be guest user and the other full user.
- buyer_id: string
-
The id of the buyer for this transaction (it can be full user id or guest user id).
- charge_calculator_version: integer (int64)
- creator_role: basic.Role
-
This is the role that will be given to the user making the request; the user specified by
join_user_id
will be given the complementary role. - currency: Currency
- deposit_charge: integer (int64)
- deposit_charge_seller: integer (int64)
- deposit_price: integer (int64)
- description: string
-
A description of the goods being sold.
- fee_multiplier: number (double)
-
The
fee_multiplier
parameter is used to apply a higher percentage fee based on the total price of the transaction. The percentage fee is calculated multiplying thepercentage fee
by thefee_multiplier
. - seller_id: string
-
The id of the seller for this transaction (it can be full user id or guest user id).
- skip_remainder: boolean
-
If
skip_remainder
istrue
then the transaction will move to the "confirm handover" step after the deposit has been accepted.
Request Example
{
"charge_calculator_version": 2,
"creator_role": "seller",
"currency": "eur",
"deposit_charge": 78,
"deposit_charge_seller": 0,
"deposit_price": 1234,
"description": "Soccer ticket",
"join_user_id": "feb33a87-3917-4538-9260-127c8a6b5232"
}
Created
Bad Request
code
can be one of the following:
duplicate_user_id
: The user specified byjoin_user_id
is the user making the request.incorrect_calc_version
incorrect_charge
incorrect_charge_seller
invalid_calc_version
negative_price
price_too_low
no_guest_user
incompatible_countries
unsupported_currency
fee_multiplier_too_low
Response Example (201 Created)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_pricing": {
"charge": 78,
"charge_seller": 0,
"price": 1234
},
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "joined"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Get a transaction by its ID
(no description)
OK
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "joined"
}
Updates description, currency, price and/or charge of F2F transaction
- currency: Currency
- deposit_charge: integer (int64)
- deposit_price: integer (int64)
- description: string
-
A description of the goods being sold.
(no description)
Request Example
{
"currency": "eur",
"deposit_charge": 78,
"deposit_price": 1234,
"description": "Soccer ticket"
}
OK
Bad Request
code
can be one of the following:
invalid_id
second_party_already_joined
values_not_changed
Forbidden
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 1309,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "created"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Get bank transfer details for transaction which payment method is bank_transfer
(no description)
OK
Bad Request code
can be one of the following:
payment_method_not_bank_transfer
Response Example (200 OK)
{
"amount": 20200,
"currency": "eur",
"financial_address": {
"iban": {
"account_holder_name": "Trustap Ltd",
"bic": "IRBBIE12XXX",
"country": "IE",
"iban": "IE722848006801920534742"
}
},
"hosted_instructions_url": "https://payments.stripe.com/bank_transfers/instructions/test_YWNjdF8xOWtIRzBEblRFbnpGcFRELF9QTElzVjdEcHg4Y2dUTUlPcUJoTlRSSlBFZU5EbkFt0100bfu5n8c7\n",
"reference": "TZQ9B3VHF9FK"
}
End complaint period for this transaction with a guest buyer
(no description)
OK
Bad Request
code
can be one of the following:
complaint_period_expired
already_complained
handover_not_confirmed
funds_already_released
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"complaint_period_deadline": "2019-12-25T15:00:00.000Z",
"complaint_period_ended": "2019-12-25T14:30:00.000Z",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_accepted": "2019-12-25T12:00:00.000Z",
"deposit_paid": "2019-12-25T11:00:00.000Z",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"priced": "2019-12-25T13:00:00.000Z",
"pricing": {
"charge": 190,
"price": 5000
},
"remainder_paid": "2019-12-25T14:00:00.000Z",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "complaint_period_ended"
}
Set deposit payment method for F2F transaction, values can be card
, bank_transfer
, p24
, sepa
and fpx
.
(no description)
Request Example
{
"currency": "eur",
"deposit_charge": 2000,
"deposit_charge_seller": 0,
"deposit_price": 200000,
"payment_method": "bank_transfer"
}
OK
Bad Request
code
can be one of the following:
invalid_payment_method
deposit_already_paid
Response Example (200 OK)
{
"buyer_handover_confirmed": "2019-12-25T16:00:00.000Z",
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"client_id": "trustap-app",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_accepted": "2019-12-25T12:00:00.000Z",
"deposit_paid": "2019-12-25T11:00:00.000Z",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"funds_released": "2019-12-25T17:00:00.000Z",
"id": 1309,
"is_deposit_payment_in_progress": false,
"is_remainder_payment_in_progress": false,
"joined": "2019-12-25T10:00:00.000Z",
"priced": "2019-12-25T13:00:00.000Z",
"pricing": {
"charge": 190,
"price": 5000
},
"remainder_paid": "2019-12-25T14:00:00.000Z",
"seller_handover_confirmed": "2019-12-25T15:00:00.000Z",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "funds_released"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Accept the deposit for this transaction
Offline access is allowed for this endpoint when the user has granted the p2p_tx:offline_accept_deposit
scope to the client that is performing the request.
(no description)
OK
Forbidden
code
can be one of the following:
not_seller
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_accepted": "2019-12-25T12:00:00.000Z",
"deposit_paid": "2019-12-25T11:00:00.000Z",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "deposit_accepted"
}
Response Example (403 Forbidden)
{
"code": "not_seller",
"error": "current user is not seller"
}
Accept the deposit for this transaction as a guest seller
(no description)
OK
Forbidden
code
can be one of the following:
not_seller
subject_is_not_guest_user
deposit_not_paid
deposit_already_accepted
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_accepted": "2019-12-25T12:00:00.000Z",
"deposit_paid": "2019-12-25T11:00:00.000Z",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "deposit_accepted"
}
Response Example (403 Forbidden)
{
"code": "not_seller",
"error": "current user is not seller"
}
Get details of the buyer from this transaction
(no description)
OK
Not Found
Response Example (200 OK)
{
"email": "string",
"name": {
"first": "John",
"last": "Doe"
},
"phone": "string"
}
Cancel this transaction with a description
If a transaction is cancelled after the deposit has been paid then the deposit (excluding the Trustap fee) will be returned to the buyer. Offline access is allowed for this endpoint when the user has granted the p2p_tx:offline_cancel
scope to the client that is performing the request.
- description: string
(no description)
Request Example
{
"description": "Found another buyer"
}
OK
Bad Request
code
can be one of the following:
second_party_not_joined
already_cancelled
remainder_already_paid
handover_already_confirmed
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"cancellation": {
"reason": "Found another buyer"
},
"cancelled": "2019-12-25T11:00:00.000Z",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "cancelled"
}
Response Example (400 Bad Request)
{
"code": "already_cancelled",
"error": "transaction already cancelled"
}
Cancel this transaction with a description with guest user
If a transaction is cancelled after the deposit has been paid then the deposit (excluding the Trustap fee) will be returned to the buyer.
- description: string
(no description)
Request Example
{
"description": "Found another buyer"
}
OK
Bad Request
code
can be one of the following:
description_missing
already_cancelled
remainder_already_paid
handover_already_confirmed
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"cancellation": {
"reason": "Found another buyer"
},
"cancelled": "2019-12-25T11:00:00.000Z",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "cancelled"
}
Response Example (400 Bad Request)
{
"code": "already_cancelled",
"error": "transaction already cancelled"
}
Submit a complaint for this transaction
Offline access is allowed for this endpoint when the user has granted the p2p_tx:offline_complain
scope to the client that is performing the request.
- description: string
(no description)
Request Example
{
"description": "Item was fake"
}
OK
Bad Request
code
can be one of the following:
remainder_required
already_complained
funds_already_released
complaint_period_expired
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"complained": "2019-12-25T15:00:00.000Z",
"complaint": {
"description": "Item was fake"
},
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_accepted": "2019-12-25T12:00:00.000Z",
"deposit_paid": "2019-12-25T11:00:00.000Z",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"priced": "2019-12-25T13:00:00.000Z",
"pricing": {
"charge": 190,
"price": 5000
},
"remainder_paid": "2019-12-25T14:00:00.000Z",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "complained"
}
Submit a complaint for this transaction with a guest buyer
- description: string
(no description)
Request Example
{
"description": "Item was fake"
}
OK
Bad Request
code
can be one of the following:
remainder_required
already_complained
funds_already_released
complaint_period_expired
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"complained": "2019-12-25T15:00:00.000Z",
"complaint": {
"description": "Item was fake"
},
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_accepted": "2019-12-25T12:00:00.000Z",
"deposit_paid": "2019-12-25T11:00:00.000Z",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"priced": "2019-12-25T13:00:00.000Z",
"pricing": {
"charge": 190,
"price": 5000
},
"remainder_paid": "2019-12-25T14:00:00.000Z",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "complained"
}
Confirm handover for this transaction
Both parties should confirm the handover for a face-to-face transaction. The complaints period begins when the seller confirms the handover. Offline access is allowed for this endpoint when the user has granted the p2p_tx:offline_confirm_handover
scope to the client that is performing the request.
(no description)
OK
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_accepted": "2019-12-25T12:00:00.000Z",
"deposit_paid": "2019-12-25T11:00:00.000Z",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"priced": "2019-12-25T13:00:00.000Z",
"pricing": {
"charge": 190,
"price": 5000
},
"remainder_paid": "2019-12-25T14:00:00.000Z",
"seller_handover_confirmed": "2019-12-25T15:00:00.000Z",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "seller_handover_confirmed"
}
Confirm handover for this transaction with a guest user
Both parties should confirm the handover for a face-to-face transaction. Full users don't have access to this endpoint.
(no description)
OK
Bad Request
code
can be one of the following:
remainder_required
already_complained
seller_handover_already_confirmed
buyer_handover_already_confirmed
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_accepted": "2019-12-25T12:00:00.000Z",
"deposit_paid": "2019-12-25T11:00:00.000Z",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"priced": "2019-12-25T13:00:00.000Z",
"pricing": {
"charge": 190,
"price": 5000
},
"remainder_paid": "2019-12-25T14:00:00.000Z",
"seller_handover_confirmed": "2019-12-25T15:00:00.000Z",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "seller_handover_confirmed"
}
Get the Stripe client secret for this transaction
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.
(no description)
OK
Bad Request
code
can be one of the following:
deposit_already_paid
Forbidden
code
can be one of the following:
not_buyer
Not Found
Response Example (200 OK)
{
"client_secret": "***"
}
Response Example (400 Bad Request)
{
"code": "deposit_already_paid",
"error": "deposit payment already made"
}
Response Example (403 Forbidden)
{
"code": "not_buyer",
"error": "current user is not buyer"
}
Get the Stripe client secret for this transaction
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.
(no description)
OK
Bad Request
code
can be one of the following:
missing_pricing
: Pricing details have not yet been added to this transaction.remainder_already_paid
Forbidden
code
can be one of the following:
not_buyer
Not Found
Response Example (200 OK)
{
"client_secret": "***"
}
Response Example (400 Bad Request)
{
"code": "remainder_already_paid",
"error": "remainder payment already made"
}
Response Example (403 Forbidden)
{
"code": "not_buyer",
"error": "current user is not buyer"
}
Get details of the seller from this transaction
(no description)
OK
Not Found
Response Example (200 OK)
{
"email": "string",
"name": {
"first": "John",
"last": "Doe"
},
"phone": "string"
}
Set the total price for this transaction
price
is the total price of the item, and thus includes the price already paid for the deposit.
Note that this endpoint will return a remainder_too_low
response if the difference between the total price and the deposit price is too low. Offline access is allowed for this endpoint when the user has granted the p2p_tx:offline_set_price
scope to the client that is performing the request.
- charge: integer (int64)
-
The
charge
value returned from a request to/p2p/charge
. - charge_calculator_version: integer (int64)
-
The
charge_calculator_version
value returned from a request to/p2p/charge
. - currency: Currency
- price: integer (int64)
-
The price of the goods being sold, in the
currency
's smallest unit. Thecharge
value should correspond to the Trustap charge created with this price, otherwise this request will fail with a400
error.
(no description)
Request Example
{
"charge": 190,
"charge_calculator_version": 2,
"currency": "eur",
"price": 5000
}
OK
Bad Request
code
can be one of the following:
currency_mismatch
: Pricing currency is different to the transaction's currency.remainder_already_skipped
remainder_too_low
: The difference between the total price of this transaction isn't larger than the deposit price.
Forbidden
code
can be one of the following:
not_seller
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_accepted": "2019-12-25T12:00:00.000Z",
"deposit_paid": "2019-12-25T11:00:00.000Z",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"priced": "2019-12-25T13:00:00.000Z",
"pricing": {
"charge": 190,
"price": 5000
},
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "deposit_accepted"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Response Example (403 Forbidden)
{
"code": "not_seller",
"error": "current user is not seller"
}
Skip the remainder for this transaction
This will skip the remainder payment of this transaction, and the total price of the transaction will not need to be set. Note that this must be done before the total price of the transaction is set using /set_price
.
(no description)
OK
Bad Request
code
can be one of the following:
price_already_set
Forbidden
code
can be one of the following:
not_seller
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_accepted": "2019-12-25T12:00:00.000Z",
"deposit_paid": "2019-12-25T11:00:00.000Z",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"remainder_skipped": "2019-12-25T13:00:00.000Z",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "remainder_skipped"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Response Example (403 Forbidden)
{
"code": "not_seller",
"error": "current user is not seller"
}
Get the details for the Stripe publishable key that is in use for this transaction
Returns the Publishable Key for the Stripe Platform which is hosting this transaction.
(no description)
OK
Bad Request
code
can be one of the following:
invalid_id
Forbidden
code
can be one of the following:
not_buyer
not_seller
Not Found
Response Content-Types: application/json
Response Example (200 OK)
{
"publishable_key": "pk_xXxXxXxXxXx"
}
Response Example (400 Bad Request)
{
"code": "invalid_id",
"error": "couldn't parse transaction id: abc"
}
Response Example (403 Forbidden)
{
"code": "not_buyer",
"error": "current user is not buyer"
}
Get a transaction by its join code
(no description)
OK
Not Found
Response Example (200 OK)
{
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 1309,
"join_code": "54c5bb89-a5ea-4be7-ad7a-e740c2eebab4",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "created"
}
Join a transaction by its join code
This endpoint allows a user to join a transaction provided a join code. Offline access is allowed for this endpoint when the user has granted the p2p_tx:offline_create_join
scope to the client that is performing the request.
(no description)
OK
Bad Request
code
can be one of the following:
cannot_join_own_transaction
- `already_cancelled``
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "joined"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Reject a transaction by its join code
(no description)
OK
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": 1309,
"rejected": "2019-12-25T10:00:00.000Z",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "joined"
}
F2F Multi-use Listings
Create a new multi-use, face-to-face listing for the logged-in user
Multi-use listings can be used to create transactions. Offline access is allowed for this endpoint when the user has granted the p2p_ls:offline_create
scope to the client that is performing the request.
- charge_calculator_version: integer (int64)
-
The
charge_calculator_version
value returned from a request to/p2p/charge
. - charge_seller: integer (int64)
-
The
charge_seller
value returned from a request to/p2p/charge
. - currency: Currency
- deposit_charge: integer (int64)
-
The
charge
value returned from a request to/p2p/charge
. - deposit_price: integer (int64)
-
The price of the goods being sold, in the
currency
's smallest unit. Thecharge
value should correspond to the Trustap charge created with this price, otherwise this request will fail with a400
error. - description: string
-
A description of the goods being sold.
- role: basic.Role
- skip_remainder: boolean
-
If
skip_remainder
istrue
then the transaction will move to the "confirm handover" step after the deposit has been accepted.
Request Example
{
"charge_calculator_version": 5,
"currency": "eur",
"deposit_charge": 78,
"deposit_price": 1234,
"description": "Soccer ticket",
"role": "seller"
}
Created
Bad Request
code
can be one of the following:
* `invalid_role`: '' is not a valid role
Response Example (201 Created)
{
"allows_multi_use": true,
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"skip_remainder": false
}
Delete this listing
(no description)
OK
Not Found
Get a listing by its ID
(no description)
OK
Not Found
Response Example (200 OK)
{
"allows_multi_use": true,
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"deposit_pricing": {
"charge": 150,
"price": 5000
},
"description": "",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"skip_remainder": false
}
Patch listing properties
- charge_calculator_version: integer (int64)
-
The
charge_calculator_version
value returned from a request to/p2p/charge
. - currency: Currency
- deposit_charge: integer (int64)
-
The
charge
value returned from a request to/p2p/charge
. - deposit_price: integer (int64)
-
The deposit price of the goods being sold, in the
currency
's smallest unit. Thecharge
value should correspond to the Trustap charge created with this price, otherwise this request will fail with a400
error. - description: string
- skip_remainder: boolean
(no description)
Request Example
{
"charge_calculator_version": 5,
"currency": "eur",
"deposit_charge": 78,
"deposit_price": 1234,
"description": "Soccer ticket",
"skip_remainder": false
}
OK
Bad Request
code
can be one of the following:
empty_body
: The request body is empty.
Not Found
Response Example (200 OK)
{
"allows_multi_use": true,
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"pricing": {
"charge": 78,
"price": 1234
},
"skip_remainder": false
}
Create a transaction from this listing
Calling /create_transaction
with no parameters will create a new transaction with the details provided by the listing.
The optional quantity
parameter can be passed to create a transaction for a multiple of the original listing. In this case, the price
and charge
for the new transaction will also need to be passed.
As an example, consider a listing for a chair with a price of 1234
EUR
. If a user wants to buy 10 of these in a single transaction then the charge for the total can be retrieved using GET /p2p/charge?price=1234¤cy=usd&quantity=10
(note the addition of the optional quantity parameter at the end). This will return a price
of 12340
and an associated charge
. These new values must then be passed to /create_transaction
with quantity=10
, which will create a new transaction with the new pricing information. The new transaction will also include a quantity
field, which doesn't have a functional effect on the transaction, but is included for informational purposes.
Note that this functionality is not available for single-use listings, from which only singular transactions may be created.
Offline access is allowed for this endpoint when the user has granted the p2p_tx:offline_create_join
scope to the client that is performing the request.
(no description)
(no description)
(no description)
(no description)
OK
Bad Request
code
can be one of the following:
listing_is_disabled
is_listing_creator
: The current user created this listing.
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_pricing": {
"charge": 150,
"price": 5000
},
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"listing_id": 1990,
"listing_type": "multi_use",
"quantity": 10,
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "joined"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Disable this listing
Calling /create_transaction
on a disabled listing will return a 400
response. Offline access is allowed for this endpoint when the user has granted the p2p_ls:offline_update
scope to the client that is performing the request.
(no description)
OK
Not Found
Response Example (200 OK)
{
"allows_multi_use": true,
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"deposit_pricing": {
"charge": 150,
"price": 5000
},
"description": "Soccer ticket",
"disabled": "2019-12-25T10:00:00.000Z",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"skip_remainder": false
}
Enable this listing
Offline access is allowed for this endpoint when the user has granted the p2p_ls:offline_update
scope to the client that is performing the request.
(no description)
OK
Not Found
Response Example (200 OK)
{
"allows_multi_use": true,
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"deposit_pricing": {
"charge": 150,
"price": 5000
},
"description": "Soccer ticket",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"skip_remainder": false
}
Set pricing for this listing
Offline access is allowed for this endpoint when the user has granted the p2p_ls:offline_update
scope to the client that is performing the request.
- charge_calculator_version: integer (int64)
-
The
charge_calculator_version
value returned from a request to/p2p/charge
. - currency: Currency
- deposit_charge: integer (int64)
-
The
charge
value returned from a request to/p2p/charge
. - deposit_price: integer (int64)
-
The deposit price of the goods being sold, in the
currency
's smallest unit. Thecharge
value should correspond to the Trustap charge created with this price, otherwise this request will fail with a400
error.
(no description)
Request Example
{
"charge_calculator_version": 5,
"currency": "eur",
"deposit_charge": 78,
"deposit_price": 1234
}
OK
Not Found
Response Example (200 OK)
{
"allows_multi_use": true,
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"pricing": {
"charge": 78,
"price": 1234
},
"skip_remainder": false
}
Set the description for this listing
Offline access is allowed for this endpoint when the user has granted the p2p_ls:offline_update
scope to the client that is performing the request.
- description: string
(no description)
Request Example
{
"description": "Soccer ticket"
}
OK
Not Found
Response Example (200 OK)
{
"allows_multi_use": true,
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"deposit_pricing": {
"charge": 150,
"price": 5000
},
"description": "Soccer ticket",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"skip_remainder": false
}
Set skip remainder for this listing
Offline access is allowed for this endpoint when the user has granted the p2p_ls:offline_update
scope to the client that is performing the request.
- skip_remainder: boolean
(no description)
Request Example
{
"skip_remainder": "boolean"
}
OK
Not Found
Response Example (200 OK)
{
"allows_multi_use": true,
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"deposit_pricing": {
"charge": 150,
"price": 5000
},
"description": "Soccer ticket",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"skip_remainder": false
}
F2F Single-use Listings
Create a new single-use, face-to-face listing for the logged-in user
Single-use listings are disabled once the remainder has been paid for a transaction created from it. Offline access is allowed for this endpoint when the user has granted the p2p_ls:offline_create
scope to the client that is performing the request.
- charge_calculator_version: integer (int64)
-
The
charge_calculator_version
value returned from a request to/p2p/charge
. - charge_seller: integer (int64)
-
The
charge_seller
value returned from a request to/p2p/charge
. - currency: Currency
- deposit_charge: integer (int64)
-
The
charge
value returned from a request to/p2p/charge
. - deposit_price: integer (int64)
-
The deposit price of the goods being sold, in the
currency
's smallest unit. Thecharge
value should correspond to the Trustap charge created with this price, otherwise this request will fail with a400
error. - description: string
-
A description of the goods being sold.
- role: basic.Role
- skip_remainder: boolean
-
If
skip_remainder
istrue
then the transaction will move to the "confirm handover" step after the deposit has been accepted.
Request Example
{
"charge_calculator_version": 5,
"currency": "eur",
"deposit_charge": 78,
"deposit_price": 1234,
"description": "Soccer ticket",
"role": "seller"
}
Created
Bad Request
code
can be one of the following:
* `invalid_role`: '' is not a valid role
Response Example (201 Created)
{
"allows_multi_use": false,
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"description": "Soccer ticket",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"skip_remainder": false
}
Delete this listing
(no description)
OK
Not Found
Get a listing by its ID
(no description)
OK
Not Found
Response Example (200 OK)
{
"allows_multi_use": false,
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"deposit_pricing": {
"charge": 150,
"price": 5000
},
"description": "",
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"skip_remainder": false
}
Patch listing properties
- charge_calculator_version: integer (int64)
-
The
charge_calculator_version
value returned from a request to/p2p/charge
. - currency: Currency
- deposit_charge: integer (int64)
-
The
charge
value returned from a request to/p2p/charge
. - deposit_price: integer (int64)
-
The deposit price of the goods being sold, in the
currency
's smallest unit. Thecharge
value should correspond to the Trustap charge created with this price, otherwise this request will fail with a400
error. - description: string
- skip_remainder: boolean
(no description)
Request Example
{
"charge_calculator_version": 5,
"currency": "eur",
"deposit_charge": 78,
"deposit_price": 1234,
"description": "Soccer ticket",
"skip_remainder": false
}
OK
Bad Request
code
can be one of the following:
empty_body
: The request body is empty.
Not Found
Response Example (200 OK)
{
"allows_multi_use": false,
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency": "eur",
"deposit_pricing": {
"charge": 78,
"price": 1234
},
"id": "77f36253-7a43-4d47-897d-f73dd208e17a",
"skip_remainder": false
}
Create a transaction from this listing
Offline access is allowed for this endpoint when the user has granted the p2p_tx:offline_create_join
scope to the client that is performing the request.
(no description)
OK
Bad Request
code
can be one of the following:
listing_is_disabled
is_listing_creator
: The current user created this listing.
Not Found
Response Example (200 OK)
{
"buyer_id": "feb33a87-3917-4538-9260-127c8a6b5232",
"created": "2019-12-25T09:00:00.000Z",
"currency": "eur",
"deposit_pricing": {
"charge": 150,
"price": 5000
},
"description": "Soccer ticket",
"id": 1309,
"joined": "2019-12-25T10:00:00.000Z",
"listing_id": 1990,
"listing_type": "single_use",
"seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"skip_remainder": false,
"status": "joined"
}
Response Example (400 Bad Request)
{
"code": "negative_price",
"error": "`price` cannot be negative"
}
Disable this listing
Calling /create_transaction
on a disabled listing will return a 400
response. Offline access is allowed for this endpoint when the user has granted the p2p_ls:offline_update
scope to the client that is performing the request.
(no description)
OK
Not Found
Response Example (200 OK)
{
"allows_multi_use": false,
"created": "2019-12-25T09:00:00.000Z",
"creator_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7",
"currency":