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

Online Single-use Listings

Operations

F2F Transactions

Operations

F2F Multi-use Listings

Operations

F2F Single-use Listings

Operations

Subscriptions

Operations

Get the billing period.

Request

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

Responses

OK

Bodyapplication/json
amount_releasedinteger(int64)
buyer_handover_confirmedstring(date-time)
charge_international_paymentinteger(int64)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
deliveredstring(date-time)
funds_releasedstring(date-time)
idinteger(int64)required

The identifier of the billing period.

Example: 1309
paidstring(date-time)
seller_handover_confirmedstring(date-time)
statusstringrequired
Example: "created"
subscription_idinteger(int64)required
trackedstring(date-time)
trackingobject(subscriptions.Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "885bb99f-85bf-47e1-be0d-15e7541c6123", "created": "2019-12-25T09:00:00Z", "id": 1309, "product_id": 1564, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "created" }

Confirm handover for the subscriptions's billing period.

Request

Path
billing_period_idinteger(int64)required
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/recurrent_payments/billing_periods/{billing_period_id}/confirm_handover' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
amount_releasedinteger(int64)
buyer_handover_confirmedstring(date-time)
charge_international_paymentinteger(int64)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
deliveredstring(date-time)
funds_releasedstring(date-time)
idinteger(int64)required

The identifier of the billing period.

Example: 1309
paidstring(date-time)
seller_handover_confirmedstring(date-time)
statusstringrequired
Example: "created"
subscription_idinteger(int64)required
trackedstring(date-time)
trackingobject(subscriptions.Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "885bb99f-85bf-47e1-be0d-15e7541c6123", "created": "2019-12-25T09:00:00Z", "id": 1309, "product_id": 1564, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "created" }

Input tracking details for the subscriptions's billing period.

Request

Path
billing_period_idinteger(int64)required
Bodyapplication/jsonrequired
carrierstringrequired
Example: "ups"
tracking_codestringrequired
Example: "***"
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/recurrent_payments/billing_periods/{billing_period_id}/track' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "carrier": "ups",
    "tracking_code": "***"
  }'

Responses

OK

Bodyapplication/json
amount_releasedinteger(int64)
buyer_handover_confirmedstring(date-time)
charge_international_paymentinteger(int64)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
deliveredstring(date-time)
funds_releasedstring(date-time)
idinteger(int64)required

The identifier of the billing period.

Example: 1309
paidstring(date-time)
seller_handover_confirmedstring(date-time)
statusstringrequired
Example: "created"
subscription_idinteger(int64)required
trackedstring(date-time)
trackingobject(subscriptions.Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "885bb99f-85bf-47e1-be0d-15e7541c6123", "created": "2019-12-25T09:00:00Z", "id": 1309, "product_id": 1564, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "created" }

Get the Trustap fee for a product

Request

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

Query
currencystringrequired

The currency that the price is specified in.

priceinteger(int64)required

The price of the goods being sold, in the currency's smallest unit. For example, if a tradingcard is being sold for $12.34 (with currency as usd), then the request for the charge for this product would be /recurrent_payments/charge?price=1234&currency=usd.

payment_methodstring

The payment method that will be used to pay for the product. This is necessary because different payment methods may result in different fees.

The default value is card.

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

Responses

OK

Bodyapplication/json
charge_buyerinteger(int64)required

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

Example: 78
charge_sellerinteger(int64)required

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

currencystringrequired
Example: "eur"
priceinteger(int64)required
Example: 1234
Response
application/json
{ "charge_buyer": 78, "charge_seller": 0, "currency": "eur", "price": 1234 }

Get subscriptions for the logged-in user

Request

Query
pageinteger(int64)
page_sizeinteger(int64)
Bodyapplication/jsonrequired
client_idsArray of strings
date_created_fromstring
date_created_tostring
exclude_statusstring
product_idinteger(int64)
sort_by_orderstring
statusesArray of strings
subscription_idinteger(int64)
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/recurrent_payments/me/subscriptions?page=0&page_size=0' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "client_ids": [
      "string"
    ],
    "date_created_from": "string",
    "date_created_to": "string",
    "exclude_status": "string",
    "product_id": 0,
    "sort_by_order": "string",
    "statuses": [
      "string"
    ],
    "subscription_id": 0
  }'

Responses

OK

Bodyapplication/json
dataArray of objects(subscriptions.Subscription)required
Example: [{"buyer_id":"885bb99f-85bf-47e1-be0d-15e7541c6123","created":"2019-12-25T09:00:00Z","id":1309,"product_id":1564,"seller_id":"ad5bb99f-85bf-47e1-be0d-15e7541c6ad7","status":"created"}]
data[].​buyer_idstringrequired
Example: "885bb99f-85bf-47e1-be0d-15e7541c6123"
data[].​cancelledstring(date-time)
data[].​createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
data[].​idinteger(int64)required

The identifier of the subscription.

Example: 1309
data[].​last_pausedstring(date-time)
data[].​last_resumedstring(date-time)
data[].​product_idinteger(int64)required
Example: 1564
data[].​seller_idstringrequired
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
data[].​statusstringrequired
Example: "created"
pageinteger(int64)required
page_sizeinteger(int64)required
total_countinteger(int64)required
total_pagesinteger(int64)required
Response
application/json
{ "data": [ {} ], "page": 0, "page_size": 0, "total_count": 0, "total_pages": 0 }

Get subscription's billing periods for the logged-in user

Request

Path
subscription_idinteger(int64)required
Query
pageinteger(int64)
page_sizeinteger(int64)
Bodyapplication/jsonrequired
exclude_statusstring
sort_by_orderstring
statusesArray of strings
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/recurrent_payments/me/subscriptions/{subscription_id}/billing_periods?page=0&page_size=0' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "exclude_status": "string",
    "sort_by_order": "string",
    "statuses": [
      "string"
    ]
  }'

Responses

OK

Bodyapplication/json
dataArray of objects(subscriptions.BillingPeriod)required
Example: [{"buyer_id":"885bb99f-85bf-47e1-be0d-15e7541c6123","created":"2019-12-25T09:00:00Z","id":1309,"product_id":1564,"seller_id":"ad5bb99f-85bf-47e1-be0d-15e7541c6ad7","status":"created"}]
data[].​amount_releasedinteger(int64)
data[].​buyer_handover_confirmedstring(date-time)
data[].​charge_international_paymentinteger(int64)
data[].​createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
data[].​deliveredstring(date-time)
data[].​funds_releasedstring(date-time)
data[].​idinteger(int64)required

The identifier of the billing period.

Example: 1309
data[].​paidstring(date-time)
data[].​seller_handover_confirmedstring(date-time)
data[].​statusstringrequired
Example: "created"
data[].​subscription_idinteger(int64)required
data[].​trackedstring(date-time)
data[].​trackingobject(subscriptions.Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
data[].​tracking_details_deadlinestring(date-time)
data[].​tracking_details_window_startedstring(date-time)
pageinteger(int64)required
page_sizeinteger(int64)required
total_countinteger(int64)required
total_pagesinteger(int64)required
Response
application/json
{ "data": [ {} ], "page": 0, "page_size": 0, "total_count": 0, "total_pages": 0 }

Create a new product

Request

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

Bodyapplication/jsonrequired
billing_intervalstring(subscriptions.BillingInterval)required
Enum"month""year""week""day"
Example: "month"
charge_buyerinteger(int64)required

The charge_buyer value returned from a request to /recurrent_payments/charge.

charge_sellerinteger(int64)required

The charge_seller value returned from a request to /recurrent_payments/charge.

client_idstring
currencystringrequired

The currency that the price is specified in.

descriptionstring

A description of the goods being sold.

escrow_enabledbooleanrequired
featuresArray of strings

The list of feature flags for this product. Accepted feature flags are -require_handover_confirmation -require_tracking

is_digitalbooleanrequired

Whether the goods are phisical or digital.

namestringrequired

The name of the goods being sold.

priceinteger(int64)required

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

seller_idstringrequired

The Id of the seller of the goods.

curl -i -X POST \
  https://dev.stage.trustap.com/api/v1/recurrent_payments/products \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "billing_interval": "month",
    "charge_buyer": 0,
    "charge_seller": 0,
    "client_id": "string",
    "currency": "string",
    "description": "string",
    "escrow_enabled": true,
    "features": [
      "string"
    ],
    "is_digital": true,
    "name": "string",
    "price": 0,
    "seller_id": "string"
  }'

Responses

Created

Bodyapplication/json
billing_intervalstring(subscriptions.BillingInterval)required
Enum"month""year""week""day"
Example: "month"
client_idstringrequired
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
deletedstring(date-time)
escrow_enabledbooleanrequired
featuresArray of strings
idinteger(int64)required

The identifier of the product.

Example: 1309
is_digitalbooleanrequired
Example: true
namestringrequired

A name of the product being sold.

Example: "Surprise Box"
pricingobject(subscriptions.Pricing)required
pricing.​chargeobject(subscriptions.PricingCharge)required
pricing.​charge.​buyerinteger(int64)required
pricing.​charge.​sellerinteger(int64)required
pricing.​currencystringrequired

The currency that the price is specified in.

pricing.​priceinteger(int64)required

The price of the goods, in the currency's smallest unit.

seller_idstringrequired
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
Response
application/json
{ "billing_interval": "month", "created": "2019-12-25T09:00:00Z", "escrow_enabled": false, "id": 1309, "is_digital": true, "name": "Surprise Box", "pricing": { "charge": {}, "currency": "eur", "price": 1234 }, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7" }

Marks product as deleted

Request

A request to this endpoint will perform a soft delete of the product.

Path
product_idinteger(int64)required
curl -i -X DELETE \
  'https://dev.stage.trustap.com/api/v1/recurrent_payments/products/{product_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

No Content

Get the product by it's ID

Request

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

Responses

OK

Bodyapplication/json
billing_intervalstring(subscriptions.BillingInterval)required
Enum"month""year""week""day"
Example: "month"
client_idstringrequired
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
deletedstring(date-time)
escrow_enabledbooleanrequired
featuresArray of strings
idinteger(int64)required

The identifier of the product.

Example: 1309
is_digitalbooleanrequired
Example: true
namestringrequired

A name of the product being sold.

Example: "Surprise Box"
pricingobject(subscriptions.Pricing)required
pricing.​chargeobject(subscriptions.PricingCharge)required
pricing.​charge.​buyerinteger(int64)required
pricing.​charge.​sellerinteger(int64)required
pricing.​currencystringrequired

The currency that the price is specified in.

pricing.​priceinteger(int64)required

The price of the goods, in the currency's smallest unit.

seller_idstringrequired
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
Response
application/json
{ "billing_interval": "month", "created": "2019-12-25T09:00:00Z", "escrow_enabled": false, "id": 1309, "is_digital": true, "name": "Surprise Box", "pricing": { "charge": {}, "currency": "eur", "price": 1234 }, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7" }

Patch product properties

Request

Path
product_idinteger(int64)required
Bodyapplication/jsonrequired
billing_intervalstring
Example: "day"
charge_buyerinteger(int64)

The charge_buyer value returned from a request to /recurrent_payments/charge.

Example: 78
charge_sellerinteger(int64)

The charge_seller value returned from a request to /recurrent_payments/charge.

currencystring(Currency)
Enum"aud""eur""gbp""myr""pln""sek""usd""huf"
Example: "eur"
namestring
Example: "Surprise Box"
priceinteger(int64)

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

Example: 1234
curl -i -X PATCH \
  'https://dev.stage.trustap.com/api/v1/recurrent_payments/products/{product_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "billing_interval": "day",
    "charge_buyer": 78,
    "charge_seller": 0,
    "currency": "eur",
    "name": "Surprise Box",
    "price": 1234
  }'

Responses

OK

Bodyapplication/json
billing_intervalstring(subscriptions.BillingInterval)required
Enum"month""year""week""day"
Example: "month"
client_idstringrequired
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
deletedstring(date-time)
escrow_enabledbooleanrequired
featuresArray of strings
idinteger(int64)required

The identifier of the product.

Example: 1309
is_digitalbooleanrequired
Example: true
namestringrequired

A name of the product being sold.

Example: "Surprise Box"
pricingobject(subscriptions.Pricing)required
pricing.​chargeobject(subscriptions.PricingCharge)required
pricing.​charge.​buyerinteger(int64)required
pricing.​charge.​sellerinteger(int64)required
pricing.​currencystringrequired

The currency that the price is specified in.

pricing.​priceinteger(int64)required

The price of the goods, in the currency's smallest unit.

seller_idstringrequired
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
Response
application/json
{ "billing_interval": "month", "created": "2019-12-25T09:00:00Z", "escrow_enabled": false, "id": 1309, "is_digital": true, "name": "Surprise Box", "pricing": { "charge": {}, "currency": "eur", "price": 1234 }, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7" }

Create a new subscription from a product

Request

Path
product_idinteger(int64)required
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/recurrent_payments/products/{product_id}/subscriptions' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Created

Bodyapplication/json
buyer_idstringrequired
Example: "885bb99f-85bf-47e1-be0d-15e7541c6123"
cancelledstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
idinteger(int64)required

The identifier of the subscription.

Example: 1309
last_pausedstring(date-time)
last_resumedstring(date-time)
product_idinteger(int64)required
Example: 1564
seller_idstringrequired
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
statusstringrequired
Example: "created"
Response
application/json
{ "buyer_id": "885bb99f-85bf-47e1-be0d-15e7541c6123", "created": "2019-12-25T09:00:00Z", "id": 1309, "product_id": 1564, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "created" }

Cancel this subscription.

Request

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

Responses

OK

Bodyapplication/json
buyer_idstringrequired
Example: "885bb99f-85bf-47e1-be0d-15e7541c6123"
cancelledstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
idinteger(int64)required

The identifier of the subscription.

Example: 1309
last_pausedstring(date-time)
last_resumedstring(date-time)
product_idinteger(int64)required
Example: 1564
seller_idstringrequired
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
statusstringrequired
Example: "created"
Response
application/json
{ "buyer_id": "885bb99f-85bf-47e1-be0d-15e7541c6123", "created": "2019-12-25T09:00:00Z", "id": 1309, "product_id": 1564, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "created" }

Get the latest billing period for this subscription

Request

Path
subscription_idinteger(int64)required
curl -i -X GET \
  'https://dev.stage.trustap.com/api/v1/recurrent_payments/subscriptions/{subscription_id}/latest_billing_period' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
amount_releasedinteger(int64)
buyer_handover_confirmedstring(date-time)
charge_international_paymentinteger(int64)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
deliveredstring(date-time)
funds_releasedstring(date-time)
idinteger(int64)required

The identifier of the billing period.

Example: 1309
paidstring(date-time)
seller_handover_confirmedstring(date-time)
statusstringrequired
Example: "created"
subscription_idinteger(int64)required
trackedstring(date-time)
trackingobject(subscriptions.Tracking)
Example: {"carrier":"ups","tracking_code":"***"}
tracking_details_deadlinestring(date-time)
tracking_details_window_startedstring(date-time)
Response
application/json
{ "buyer_id": "885bb99f-85bf-47e1-be0d-15e7541c6123", "created": "2019-12-25T09:00:00Z", "id": 1309, "product_id": 1564, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "created" }

Pause this subscription.

Request

Path
subscription_idinteger(int64)required
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/recurrent_payments/subscriptions/{subscription_id}/pause' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
buyer_idstringrequired
Example: "885bb99f-85bf-47e1-be0d-15e7541c6123"
cancelledstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
idinteger(int64)required

The identifier of the subscription.

Example: 1309
last_pausedstring(date-time)
last_resumedstring(date-time)
product_idinteger(int64)required
Example: 1564
seller_idstringrequired
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
statusstringrequired
Example: "created"
Response
application/json
{ "buyer_id": "885bb99f-85bf-47e1-be0d-15e7541c6123", "created": "2019-12-25T09:00:00Z", "id": 1309, "product_id": 1564, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "created" }

Resume a paused subscription.

Request

Path
subscription_idinteger(int64)required
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/recurrent_payments/subscriptions/{subscription_id}/resume' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
buyer_idstringrequired
Example: "885bb99f-85bf-47e1-be0d-15e7541c6123"
cancelledstring(date-time)
createdstring(date-time)required
Example: "2019-12-25T09:00:00Z"
idinteger(int64)required

The identifier of the subscription.

Example: 1309
last_pausedstring(date-time)
last_resumedstring(date-time)
product_idinteger(int64)required
Example: 1564
seller_idstringrequired
Example: "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7"
statusstringrequired
Example: "created"
Response
application/json
{ "buyer_id": "885bb99f-85bf-47e1-be0d-15e7541c6123", "created": "2019-12-25T09:00:00Z", "id": 1309, "product_id": 1564, "seller_id": "ad5bb99f-85bf-47e1-be0d-15e7541c6ad7", "status": "created" }

Sets the default payment method of a subscription/customer.

Request

Path
subscription_idinteger(int64)required
Bodyapplication/jsonrequired
payment_method_idstringrequired
Example: "pm_xxxxxxxxxx"
curl -i -X POST \
  'https://dev.stage.trustap.com/api/v1/recurrent_payments/subscriptions/{subscription_id}/set_stripe_default_payment_method' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "payment_method_id": "pm_xxxxxxxxxx"
  }'

Responses

No Content