Toshl Developer

Update payment

Update a payment. Only the listed parameters can be updated. If you update anything else it will be ignored.

PUT /me/payments/{id}

Required scope:

Parameters

vat
optional
string

VAT information.

perks
optional
array

One or more selected perks. Can be one t-shirt and one bag max.

type
optional
string

Perk type

Possible values: t-shirt, bag
size
optional
string

T-shirt size. Available only for type t-shirt, ignored otherwise.

Possible values: s, m, l, xl, xxl
model
optional
string

T-shirt model. Available only for type t-shirt, ignored otherwise.

Possible values: woman, man
address
optional
object

Address where perk will be shipped. Only available for payments that offer perks.

name
optional
string

Name of the person that will receive the perk.

address
required
string

Address where the perk will be sent.

make_refund
optional
boolean

Set to true to receive a refund. This will also cancel the pro account for the user.

Default value: false
cancel_subscription
optional
boolean

Set to true to cancel subscription for payment. This will not cancel the pro account for the user.

Default value: false

Request

$ curl https://api.toshl.com/me/payments \
  -H "Authorization: Bearer T9cE5asGnuyYCCqIZFoWjFHvNbvVqHjl" \
  -H "Content-Type: application/json" \
  -X PUT \
  -d '{json}'

Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": "42",
  "type": "apple",
  "period": "monthly",
  "amount": 1.99,
  "currency": "USD",
  "discount": 10,
  "status": "completed",
  "modified": "2012-09-04T13:55:15Z",
  "refund": false,
  "subscription": true
}