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

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

Operations

Clients

Clients represent partner applications.

Operations

Users

Users represent users of the platform.

Operations

Personal

Personal endpoints are used for managing personal details for users, for "Know Your Customer" requirements.

Operations

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.

Request

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

Headers
Trustap-Userstring

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

curl -i -X GET \
  https://dev.stage.trustap.com/api/v1/me/profile/payout_status \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Trustap-User: string'

Responses

OK

Bodyapplication/json
statusstringrequired

Payout status will be one of the following:

  • complete: The user has completed their profile and payment information, and can accept payouts.
  • verifying: The user has submitted profile and payment information, which is currently being verified.
  • due: The user has not adequately filled out their payment information, or may need to update or ammend the provided information before they can accept payouts.
Enum"complete""verifying""due"
Example: "verifying"
Response
application/json
{ "status": "verifying" }

Add a new payout method to the current account using a payment method ID

Request

Bodyapplication/jsonrequired
payment_method_idstringrequired
curl -i -X POST \
  https://dev.stage.trustap.com/api/v1/me/stripe_financial_connections/add_account \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "payment_method_id": "string"
  }'

Responses

OK

Bodyapplication/json
bank_accountobject(personal.BankAccount)required
bank_account.​bank_namestringrequired
bank_account.​countrystringrequired
bank_account.​currency_alpha_2stringrequired
bank_account.​last4stringrequired
bank_account.​routingstring
cardobject(personal.Card)required
card.​last4stringrequired
card.​monthinteger(int64)required
card.​yearinteger(int64)required
Response
application/json
{ "bank_account": { "bank_name": "string", "country": "string", "currency_alpha_2": "string", "last4": "string", "routing": "string" }, "card": { "last4": "string", "month": 0, "year": 0 } }

Get ownership details from the given SetupIntent using Stripe Financial Connections

Request

Query
setup_intent_idstringrequired
curl -i -X GET \
  'https://dev.stage.trustap.com/api/v1/me/stripe_financial_connections/ownership?setup_intent_id=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
emailstringrequired
namestringrequired
raw_addressstringrequired
raw_phonestringrequired
Response
application/json
{ "email": "string", "name": "string", "raw_address": "string", "raw_phone": "string" }

Notifications

Notifications log updates for users.

Operations

F2F Transactions

F2F2 transactions are used when the goods are delivered in person.

Operations

Online Multi-use Listings

These endpoints are no longer supported. We do not recommend using these endpoints.

Operations

Online Single-use Listings

These endpoints are no longer supported. We do not recommend using these endpoints.

Operations

F2F Multi-use Listings

These endpoints are no longer supported. We do not recommend using these endpoints.

Operations

F2F Single-use Listings

These endpoints are no longer supported. We do not recommend using these endpoints.

Operations