Trustap API (0.1.0)

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

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

API Keys


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

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

Deprecation


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

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

Production


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

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

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

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

Online Transactions

Operations

Clients

Operations

Users

Operations

Personal

Operations

Online Multi-use Listings

Operations

Notifications

Operations

Get notifications for the logged-in user

Request

Query
before_idinteger(int64)>= 0

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

after_idinteger(int64)>= 0

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

limitinteger(int64)[ 1 .. 50 ]

The maximum number of notifications to return

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

Responses

OK

Bodyapplication/jsonArray [
createdstring(date-time)required
Example: "2019-12-25T10:00:00Z"
descriptionstringrequired
Example: "Buyer has joined transaction for 'Soccer ticket'"
idinteger(int64)required
Example: 1990
readstring(date-time)
targetstringrequired
Example: "basic/1309"
user_idstringrequired
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
]
Response
application/json
[ { "created": "2019-12-25T10:00:00Z", "description": "Buyer has joined transaction for 'Soccer ticket'", "id": 1990, "target": "basic/1309", "user_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7" } ]

Get a notification by its ID

Request

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

Responses

OK

Bodyapplication/json
createdstring(date-time)required
Example: "2019-12-25T10:00:00Z"
descriptionstringrequired
Example: "Buyer has joined transaction for 'Soccer ticket'"
idinteger(int64)required
Example: 1990
readstring(date-time)
targetstringrequired
Example: "basic/1309"
user_idstringrequired
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
Response
application/json
{ "created": "2019-12-25T10:00:00Z", "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

Request

Path
notification_idinteger(int64)required
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/notifications/{notification_id}/mark_as_read' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
createdstring(date-time)required
Example: "2019-12-25T10:00:00Z"
descriptionstringrequired
Example: "Buyer has joined transaction for 'Soccer ticket'"
idinteger(int64)required
Example: 1990
readstring(date-time)
targetstringrequired
Example: "basic/1309"
user_idstringrequired
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
Response
application/json
{ "created": "2019-12-25T10:00:00Z", "description": "Buyer has joined transaction for 'Soccer ticket'", "id": 1990, "target": "basic/1309", "user_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7" }

Online Single-use Listings

Operations

F2F Transactions

Operations

F2F Multi-use Listings

Operations

F2F Single-use Listings

Operations

Subscriptions

Operations