Billing
Get all available products.
Param | Type | Required | Description |
Authorization | string | yes | Bearer token containing API key |
{
"plans":[
{
"product_id":"prod_J2M8Yy44PsRsoZ",
"name":"Team",
"price":50000,
"price_id":"price_1IQHPvDoAelPEtRKMXDNXCAA",
"currency":"usd",
"base_value":0,
"attributes":{
"num_sources":5,
"num_collections":10,
"storage_gb":500,
"replay_gb":500,
"trial_available":false,
"trial_length_days":30
}
},
{
"product_id":"prod_J2M7C8Zgv9Ux42",
"name":"Personal",
"price":2000,
"price_id":"price_1IQHPZDoAelPEtRKT8tubp4t",
"currency":"usd",
"base_value":0,
"attributes":{
"num_sources":1,
"num_collections":1,
"storage_gb":10,
"replay_gb":10,
"trial_available":true,
"trial_length_days":14
}
},
{
"product_id":"prod_J2M8a2MYh1irDP",
"name":"Pro",
"price":10000,
"price_id":"price_1IQHPpDoAelPEtRKG8Msdaa2",
"currency":"usd",
"base_value":0,
"attributes":{
"num_sources":3,
"num_collections":3,
"storage_gb":100,
"replay_gb":100,
"trial_available":false,
"trial_length_days":30
}
}
],
"addons":[
{
"product_id":"prod_J2M8e17JvpNKvw",
"name":"Add-on: Replay",
"price":500,
"price_id":"price_1IQHQGDoAelPEtRK8WftMyA6",
"currency":"usd",
"base_value":0
},
{
"product_id":"prod_J2M8Q4ydjUnteb",
"name":"Add-on: Collection",
"price":1000,
"price_id":"price_1IQHQKDoAelPEtRKFGqd07CB",
"currency":"usd",
"base_value":0
},
{
"product_id":"prod_JjPGScLp2jTLpe",
"name":"Add-on: Hosted Plumber Source",
"price":5000,
"price_id":"price_1J5wRtDoAelPEtRKcFcGSajZ",
"currency":"usd",
"base_value":0
},
{
"product_id":"prod_J2M8qTgNQ4cVW4",
"name":"Add-on: Storage",
"price":500,
"price_id":"price_1IQHQCDoAelPEtRKFNJ50PzP",
"currency":"usd",
"base_value":0
}
]
}
Get added payment methods.
Param | Type | Required | Description |
Authorization | string | yes | Bearer token containing API key |
[
{
"id":"pm_1IV3aCDoAelPEtRKg21R1a1i",
"brand":"visa",
"exp_month":4,
"exp_year":2024,
"fingerprint":"2pgisdQqqgiQSldH",
"last4":"4242",
"billing_details":{
"name":"",
"city":"",
"country":"",
"line1":"",
"line2":"",
"postal_code":"42424",
"state":""
},
"default":true,
"customer_id":"cus_J7I9QVCOmJPUU6"
}
]
Update a payment method's expiration and billing zipcode.
Param | Type | Required | Description |
Authorization | string | yes | Bearer token containing API key |
Param | Type | Required | Description |
id | string | yes | ID of the payment method you want to update |
Param | Type | Required | Description |
card_id | string | yes | ID of the payment method (card) you are updating |
card_exp_month | no | Updated card expiration month | |
card_exp_year | no | Updated card expiration year | |
billing_details | object | no | Object containing one or more updated fields |
⌞ name | string | no | Name on the card |
⌞ city | string | no | Billing city |
⌞ country | string | no | Billing country |
⌞ line1 | string | no | Billing address line 1 |
⌞ line2 | string | no | Billing address line 2 |
⌞ postal_code | int | no | Billing zip code |
⌞ state | string | no | Billing state |
{
"id":"pm_1IV3aCDoAelPEtRKg21R1a1i",
"brand":"visa",
"exp_month":4,
"exp_year":2024,
"fingerprint":"2pgisdQqqgiQSldH",
"last4":"4242",
"billing_details":{
"name":"",
"city":"",
"country":"",
"line1":"",
"line2":"",
"postal_code":"42424",
"state":""
},
"default":false,
"customer_id":"cus_J7I9QVCOmJPUU6"
}
Attach a payment method to a customer ID.
Param | Type | Required | Description |
Authorization | string | yes | Bearer token containing API key |
{
"id":"pm_1J5zrFDoAelPEtRKqaMijdQj",
"object":"payment_method",
"billing_details":{
"address":{
"city":null,
"country":null,
"line1":null,
"line2":null,
"postal_code":"42424",
"state":null
},
"email":null,
"name":null,
"phone":null
},
"card":{
"brand":"visa",
"checks":{
"address_line1_check":null,
"address_postal_code_check":null,
"cvc_check":null
},
"country":"US",
"exp_month":4,
"exp_year":2024,
"funding":"credit",
"generated_from":null,
"last4":"4242",
"networks":{
"available":[
"visa"
],
"preferred":null
},
"three_d_secure_usage":{
"supported":true
},
"wallet":null
},
"created":1624569190,
"customer":null,
"livemode":false,
"type":"card"
}
{
"id":"pm_1J5zrFDoAelPEtRKqaMijdQj",
"brand":"visa",
"exp_month":4,
"exp_year":2024,
"fingerprint":"2pgisdQqqgiQSldH",
"last4":"4242",
"billing_details":{
"name":"",
"city":"",
"country":"",
"line1":"",
"line2":"",
"postal_code":"42424",
"state":""
},
"default":false,
"customer_id":"cus_J7I9QVCOmJPUU6"
}
Delete an existing payment method.
Param | Type | Required | Description |
Authorization | string | yes | Bearer token containing API key |
Param | Type | Required | Description |
id | uuid | yes | ID of the source you want to delete |
{
"message":"successfully deleted payment method"
}
Update subscription.
Param | Type | Required | Description |
Authorization | string | yes | Bearer token containing API key |
Param | Type | Required | Description |
TODO | uuid | yes | ID of the source you want to fetch |
{}
Get current subscription.
Param | Type | Required | Description |
Authorization | string | yes | Bearer token containing API key |
{}
Get upcoming invoice.
Param | Type | Required | Description |
Authorization | string | yes | Bearer token containing API key |
{}
Get invoice history.
Param | Type | Required | Description |
Authorization | string | yes | Bearer token containing API key |
{}
Update used addons.
Param | Type | Required | Description |
Authorization | string | yes | Bearer token containing API key |
Param | Type | Required | Description |
addons | array | yes | array containing one or more addon objects |
- product_id | string | yes | ID of the addon you want to update |
- quantity | int | yes | Update subscription to contain this many addons |
{
"created": 1,
"updated": 1,
"deleted": 0
}
Last modified 1yr ago