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

Get shipping details of the buyer from this transaction

Request

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

Responses

OK

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

Post shipping details of the buyer from this transaction

Request

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

Responses

OK

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

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

Request

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

Responses

OK

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

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

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