Start payment process
Start a new payment process. The return status depends on the method type
.
POST /me/payments
Required scope:
- payments:rw
Parameters
type * required string
|
Payment type. Possible values:apple, google, microsoft, g2s, adyen, amazon, bitpay, paypal, unknown |
brand optional string
|
Brand of payment type. Only valid for |
issuer optional string
|
Issuer of brand payment type. Only valid for |
period * required string
|
Pro period duration. Possible values:monthly, yearly, 3-years |
level optional string
|
Paying users have different access depending on the subscription level. Possible values:pro, medici |
promo optional string
|
Promo code used with the payment. Discount is calculated by the backend. |
vat optional string
|
VAT information. |
receipt optional object
|
Payment receipt. Only valid for |
data * required string
|
Payment receipt data. |
signature optional string
|
Payment receipt signature. Required for |
perks optional array
|
One or more selected perks. Can be one |
type optional string
|
Perk type Possible values:t-shirt, bag |
size optional string
|
T-shirt size. Available only for type s, m, l, xl, xxl |
model optional string
|
T-shirt model. Available only for type woman, man |
address optional object
|
Address where perk will be shipped. Only available for payments that offer |
name optional string
|
Name of the person that will receive the perk. |
address * required string
|
Address where the perk will be sent. |
* denotes required field/parameter.
Request
$ curl https://api.toshl.com/me/payments \ -H "Authorization: Bearer T9cE5asGnuyYCCqIZFoWjFHvNbvVqHjl" \ -H "Content-Type: application/json" \ -X POST \ -d '{json}'