Files

4669 lines
102 KiB
HTML
Raw Permalink Normal View History

2026-11-17 16:15:01 -05:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>billing - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="Actions.html">Actions</a><ul class='methods'><li data-type='method'><a href="Actions.html#triggerAction">triggerAction</a></li><li data-type='method'><a href="Actions.html#triggerPM2Action">triggerPM2Action</a></li><li data-type='method'><a href="Actions.html#triggerScopedAction">triggerScopedAction</a></li></ul></li><li><a href="Auth.html">Auth</a><ul class='methods'><li data-type='method'><a href="Auth.html#register">register</a></li><li data-type='method'><a href="Auth.html#revoke">revoke</a></li></ul></li><li><a href="Bucket.html">Bucket</a><ul class='methods'><li data-type='method'><a href="Bucket.html#claimTrial">claimTrial</a></li><li data-type='method'><a href="Bucket.html#destroy">destroy</a></li><li data-type='method'><a href="Bucket.html#removeInvitation">removeInvitation</a></li><li data-type='method'><a href="Bucket.html#removeUser">removeUser</a></li><li data-type='method'><a href="Bucket.html#retrieveCharges">retrieveCharges</a></li><li data-type='method'><a href="Bucket.html#sendFeedback">sendFeedback</a></li><li data-type='method'><a href="Bucket.html#setNotificationState">setNotificationState</a></li><li data-type='method'><a href="Bucket.html#setUserRole">setUserRole</a></li><li data-type='method'><a href="Bucket.html#transferOwnership">transferOwnership</a></li><li data-type='method'><a href="Bucket.html#update">update</a></li><li data-type='method'><a href="Bucket.html#updateUserOptions">updateUserOptions</a></li></ul></li><li><a href="Bucket.alert.html">alert</a><ul class='methods'><li data-type='method'><a href="Bucket.alert.html#create">create</a></li><li data-type='method'><a href="Bucket.alert.html#delete">delete</a></li><li data-type='method'><a href="Bucket.alert.html#deleteEvent">deleteEvent</a></li><li data-type='method'><a href="Bucket.alert.html#get">get</a></li><li data-type='method'><a href="Bucket.alert.html#list">list</a></li><li data-type='method'><a href="Bucket.alert.html#sendReport">sendReport</a></li><li data-type='method'><a href="Bucket.alert.html#triggerSample">triggerSample</a></li><li data-type='method'><a href="Bucket.alert.html#update">update</a></li><li data-type='method'><a href="Bucket.alert.html#updateAlert">updateAlert</a></li><li data-type='method'><a href="Bucket.alert.html#updateSlack">updateSlack</a></li><li data-type='method'><a href="Bucket.alert.html#updateWebhooks">updateWebhooks</a></li></ul></li><li><a href="Bucket.alert.analyzer.html">analyzer</a><ul class='methods'><li data-type='method'><a href="Bucket.alert.analyzer.html#editState">editState</a></li><li data-type='method'><a href="Bucket.alert.analyzer.html#list">list</a></li><li data-type='method'><a href="Bucket.alert.analyzer.html#updateConfig">updateConfig</a></li></ul></li><li><a href="Bucket.application.html">application</a><ul class='methods'><li data-type='method'><a href="Bucket.application.html#create">create</a></li><li data-type='method'><a href="Bucket.application.html#delete">delete</a></li><li data-type='method'><a href="Bucket.application.html#get">get</a></li><li data-type='method'><a href="Bucket.application.html#getPreview">getPreview</a></li><li data-type='method'><a href="Bucket.application.html#getReports">getReports</a></li><li data-type='method'><a href="Bucket.application.html#list">list</a></li><li data-type='method'><a href="Bucket.application.html#update">update</a></li></ul></li><li><a href="Bucket.billing.html">billing</a><ul class='methods'><li data-type='method'><a href="Bucket.billing.html#attachBankAccount">attachBankAccount</a></li><li data-type='method'><a href="Bucket.billing.html#attachCreditCard">attachCreditCard</a></li><li data-type='method'><a href="Bucket.billing.html#deleteBankAccount">deleteBankAccount</a></li><li data-type='method'><a href="Bucket.billing.html#deleteCreditCard">deleteCreditCard</a></li><li data-type='method'><a href="Bucket.billing.html#fetchBankAccount">fetchBankAccount</a></li><li data-type='method'><a href="Bucket.billing.html#fetchCreditCard">fetchCreditCard</a>
</nav>
<div id="main">
<h1 class="page-title">billing</h1>
<section>
<header>
<h2>
<span class="ancestors"><a href="Bucket.html">Bucket</a>.</span>
billing
</h2>
</header>
<article>
<div class="container-overview">
<dl class="details">
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="attachBankAccount"><span class="type-signature">(route) </span>attachBankAccount<span class="signature">(:id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">POST</td>
<td class="name last">/api/bucket/:id/payment/banks</td>
</tr>
</table>
Add a bank account to the bucket customer
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Body Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">iban</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="description last">the iban used to recognize the account</td>
</tr><tr>
<td class="name">type</td>
<td class="type">String</td>
<td class="attributes"></td>
<td class="description last">the type of the bank account (currently only sepa is available)</td>
</tr><tr>
<td class="name">name</td>
<td class="type">String</td>
<td class="attributes"></td>
<td class="description last">name of the bank account owner</td>
</tr>
</table>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">data</td>
<td class="type">Object</td>
<td class="description last">stripe credit card Object</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">400</td>
<td class="description last">missing parameters</td>
</tr><tr>
<td class="type">500</td>
<td class="description last">stripe error</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully added the account</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
</tbody>
</table>
<h4 class="name" id="attachCreditCard"><span class="type-signature">(async, route) </span>attachCreditCard<span class="signature">(:id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">POST</td>
<td class="name last">/api/bucket/:id/payment/cards</td>
</tr>
</table>
Add a credit card to the bucket customer
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Body Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">token</td>
<td class="type">String</td>
<td class="description last">card token generated by stripe</td>
</tr>
</table>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">data</td>
<td class="type">Object</td>
<td class="description last">stripe credit card Object</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">400</td>
<td class="description last">missing parameters</td>
</tr><tr>
<td class="type">500</td>
<td class="description last">stripe error</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully added the card</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
</tbody>
</table>
<h4 class="name" id="deleteBankAccount"><span class="type-signature">(route) </span>deleteBankAccount<span class="signature">(:id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">DELETE</td>
<td class="name last">/api/bucket/:id/payment/banks</td>
</tr>
</table>
Delete the bank account connected to one bucket
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">.</td>
<td class="type">Object</td>
<td class="description last">stripe source object</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">500</td>
<td class="description last">stripe error</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully retieved the card</td>
</tr><tr>
<td class="type">404</td>
<td class="description last">the user doesn't have any default account</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
</tbody>
</table>
<h4 class="name" id="deleteCreditCard"><span class="type-signature">(async, route) </span>deleteCreditCard<span class="signature">(:id, :card_id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">DELETE</td>
<td class="name last">/api/bucket/:id/payment/card/:card_id</td>
</tr>
</table>
Delete a specific credit card of the bucket customer
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr><tr>
<td class="name">:card_id</td>
<td class="type">String</td>
<td class="description last">the stripe id of the card</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">.</td>
<td class="type">Object</td>
<td class="description last">stripe card object</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">500</td>
<td class="description last">stripe error</td>
</tr><tr>
<td class="type">400</td>
<td class="description last">missing parameters card_id</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully retieved the card</td>
</tr><tr>
<td class="type">403</td>
<td class="description last">the user must have one card active when having a subscription</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
<tr>
<td class="name"><code>:card_id</code></td>
<td class="type">
</td>
<td class="description last">the stripe id of the card</td>
</tr>
</tbody>
</table>
<h4 class="name" id="fetchBankAccount"><span class="type-signature">(route) </span>fetchBankAccount<span class="signature">(:id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">GET</td>
<td class="name last">/api/bucket/:id/payment/banks</td>
</tr>
</table>
Fetch the bank account connected to a bucket
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">data</td>
<td class="type">Object</td>
<td class="description last">stripe source object</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">500</td>
<td class="description last">stripe error</td>
</tr><tr>
<td class="type">404</td>
<td class="description last">the user doesn't have any default account</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully retieved the card</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
</tbody>
</table>
<h4 class="name" id="fetchCreditCard"><span class="type-signature">(route) </span>fetchCreditCard<span class="signature">(:id, :card_id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">GET</td>
<td class="name last">/api/bucket/:id/payment/card/:card_id</td>
</tr>
</table>
Fetch a specific credit card of the bucket customer
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr><tr>
<td class="name">:card_id</td>
<td class="type">String</td>
<td class="description last">the stripe id of the card</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">data</td>
<td class="type">Array</td>
<td class="description last">stripe card object</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">500</td>
<td class="description last">stripe error</td>
</tr><tr>
<td class="type">400</td>
<td class="description last">missing parameters card_id</td>
</tr><tr>
<td class="type">404</td>
<td class="description last">the user doesn't have any default card</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully retieved the card</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
<tr>
<td class="name"><code>:card_id</code></td>
<td class="type">
</td>
<td class="description last">the stripe id of the card</td>
</tr>
</tbody>
</table>
<h4 class="name" id="fetchCreditCards"><span class="type-signature">(route) </span>fetchCreditCards<span class="signature">(:id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">GET</td>
<td class="name last">/api/bucket/:id/payment/cards</td>
</tr>
</table>
List the credits card that the bucket customer have
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">data</td>
<td class="type">Array</td>
<td class="description last">list of stripe cards object</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">500</td>
<td class="description last">stripe error</td>
</tr><tr>
<td class="type">404</td>
<td class="description last">the user doesn't have any default card</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully retieved the charges</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
</tbody>
</table>
<h4 class="name" id="fetchDefaultCreditCard"><span class="type-signature">(async, route) </span>fetchDefaultCreditCard<span class="signature">(:id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">GET</td>
<td class="name last">/api/bucket/:id/payment/card</td>
</tr>
</table>
Fetch the default credit card of the bucket customer
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">data</td>
<td class="type">Array</td>
<td class="description last">stripe card object</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">500</td>
<td class="description last">stripe error</td>
</tr><tr>
<td class="type">404</td>
<td class="description last">the user doesn't have any default card</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully retieved the card</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
</tbody>
</table>
<h4 class="name" id="fetchMetadata"><span class="type-signature">(route) </span>fetchMetadata<span class="signature">(:id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">GET</td>
<td class="name last">/api/bucket/:id/payment</td>
</tr>
</table>
Fetch stripe metadata for a bucket customer
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">.</td>
<td class="type">Object</td>
<td class="description last">stripe metadata object</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">500</td>
<td class="description last">stripe error</td>
</tr><tr>
<td class="type">400</td>
<td class="description last">missing parameters card_id</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully retrieved the metadata</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
</tbody>
</table>
<h4 class="name" id="getInvoices"><span class="type-signature">(route) </span>getInvoices<span class="signature">(:id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">GET</td>
<td class="name last">/api/bucket/:id/payment/invoices</td>
</tr>
</table>
Retrieve the invoices for a given bucket
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">.</td>
<td class="type">Array</td>
<td class="description last">array of invoices</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">400</td>
<td class="description last">Missing/invalid parameters</td>
</tr><tr>
<td class="type">404</td>
<td class="description last">This bucket hasn't invoices</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully returns invoices</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
</tbody>
</table>
<h4 class="name" id="getReceipts"><span class="type-signature">(route) </span>getReceipts<span class="signature">(:id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">GET</td>
<td class="name last">/api/bucket/:id/payment/receipts</td>
</tr>
</table>
Retrieve the receipts for a given bucket
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">.</td>
<td class="type">Array</td>
<td class="description last">array of receipts</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">400</td>
<td class="description last">Missing/invalid parameters</td>
</tr><tr>
<td class="type">404</td>
<td class="description last">This bucket hasn't receipts</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully returns receipts</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
</tbody>
</table>
<h4 class="name" id="getSubcription"><span class="type-signature">(route) </span>getSubcription<span class="signature">(:id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">GET</td>
<td class="name last">/api/bucket/:id/payment/subscription</td>
</tr>
</table>
Retrieve the subscription for the bucket
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">.</td>
<td class="type">Object</td>
<td class="description last">subscription object</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">404</td>
<td class="description last">the bucket doesnt have any subscription</td>
</tr><tr>
<td class="type">500</td>
<td class="description last">database error</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully retrieved the subscription</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
</tbody>
</table>
<h4 class="name" id="getSubcriptionState"><span class="type-signature">(async, route) </span>getSubcriptionState<span class="signature">(:id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">GET</td>
<td class="name last">/api/bucket/:id/payment/subscription/state</td>
</tr>
</table>
Retrieve the state of the subscription (current or past)
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">status</td>
<td class="type">String</td>
<td class="description last">stripe state of the subscription</td>
</tr><tr>
<td class="name">plan</td>
<td class="type">String</td>
<td class="description last">stripe plan name of the subscription</td>
</tr><tr>
<td class="name">canceled_at</td>
<td class="type">String</td>
<td class="description last">if he sub has been cancelled, add the date</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">404</td>
<td class="description last">the bucket doesnt have any subscription</td>
</tr><tr>
<td class="type">500</td>
<td class="description last">database error</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully retrieved the subscription</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
</tbody>
</table>
<h4 class="name" id="paymentIntentSucceed"><span class="type-signature">(async, route) </span>paymentIntentSucceed<span class="signature">(:id, :paymentIntent)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">POST</td>
<td class="name last">/api/bucket/:id/payment/subscribe/:paymentIntent</td>
</tr>
</table>
Call when payment intent succeeded (after 3D secure)
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Body Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">plan</td>
<td class="type">String</td>
<td class="description last">name of the plan to upgrade to</td>
</tr>
</table>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr><tr>
<td class="name">:paymentIntent</td>
<td class="type">String</td>
<td class="description last">paymentIntent id</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">bucket</td>
<td class="type">Object</td>
<td class="description last">the bucket object</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">400</td>
<td class="description last">missing/invalid parameters</td>
</tr><tr>
<td class="type">500</td>
<td class="description last">stripe/database error</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully upgraded</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
<tr>
<td class="name"><code>:paymentIntent</code></td>
<td class="type">
</td>
<td class="description last">paymentIntent id</td>
</tr>
</tbody>
</table>
<h4 class="name" id="setDefaultCard"><span class="type-signature">(async, route) </span>setDefaultCard<span class="signature">(:id, :card_id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">POST</td>
<td class="name last">/api/bucket/:id/payment/card/:card_id/default</td>
</tr>
</table>
Set a specific credit card as the bucket customer default card
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr><tr>
<td class="name">:card_id</td>
<td class="type">String</td>
<td class="description last">the stripe id of the card</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">data</td>
<td class="type">Object</td>
<td class="description last">stripe card object</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">500</td>
<td class="description last">stripe error</td>
</tr><tr>
<td class="type">400</td>
<td class="description last">missing parameters card_id</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully set the card as default</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
<tr>
<td class="name"><code>:card_id</code></td>
<td class="type">
</td>
<td class="description last">the stripe id of the card</td>
</tr>
</tbody>
</table>
<h4 class="name" id="startTrial"><span class="type-signature">(async, route) </span>startTrial<span class="signature">(:id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">PUT</td>
<td class="name last">/api/bucket/:id/payment/trial</td>
</tr>
</table>
Launch a trial for the bucket
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Body Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">plan</td>
<td class="type">String</td>
<td class="description last">Plan to trial</td>
</tr>
</table>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">duration</td>
<td class="type">String</td>
<td class="description last">the duration of the trial</td>
</tr><tr>
<td class="name">plan</td>
<td class="type">String</td>
<td class="description last">the plan of the trial</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">400</td>
<td class="description last">can't claim trial</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">trial launched</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
</tbody>
</table>
<h4 class="name" id="subscribe"><span class="type-signature">(async, route) </span>subscribe<span class="signature">(:id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">POST</td>
<td class="name last">/api/bucket/:id/payment/subscribe</td>
</tr>
</table>
Subscribe to a plan
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Body Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">plan</td>
<td class="type">String</td>
<td class="attributes"></td>
<td class="description last">name of the plan to upgrade to</td>
</tr><tr>
<td class="name">stripe_token</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="description last">a card token created by stripe</td>
</tr><tr>
<td class="name">coupon_id</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="description last">the id of the stripe coupon</td>
</tr>
</table>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">bucket</td>
<td class="type">Object</td>
<td class="description last">the bucket object</td>
</tr><tr>
<td class="name">subscription</td>
<td class="type">Object</td>
<td class="description last">the subscription object attached to the subscription</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">400</td>
<td class="description last">missing/invalid parameters</td>
</tr><tr>
<td class="type">403</td>
<td class="description last">need a credit card OR not allowed to subscribe to the plan</td>
</tr><tr>
<td class="type">500</td>
<td class="description last">stripe/database error</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully upgraded</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
</tbody>
</table>
<h4 class="name" id="updateCreditCard"><span class="type-signature">(route) </span>updateCreditCard<span class="signature">(:id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">PUT</td>
<td class="name last">/api/bucket/:id/payment/card</td>
</tr>
</table>
Update a credit card of the bucket customer
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Body Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">id</td>
<td class="type">String</td>
<td class="attributes"></td>
<td class="description last">stripe card id</td>
</tr><tr>
<td class="name">address_line1</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="description last"></td>
</tr><tr>
<td class="name">address_country</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="description last"></td>
</tr><tr>
<td class="name">address_zip</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="description last"></td>
</tr><tr>
<td class="name">address_city</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="description last"></td>
</tr>
</table>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">data</td>
<td class="type">Array</td>
<td class="description last">stripe card object</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">500</td>
<td class="description last">stripe error</td>
</tr><tr>
<td class="type">400</td>
<td class="description last">missing parameters, you need to specify a card</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully updated the card</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
</tbody>
</table>
<h4 class="name" id="updateMetadata"><span class="type-signature">(async, route) </span>updateMetadata<span class="signature">(:id)</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description">
<h5>Route:</h5>
<table class="params">
<thead><tr><th>Method</th><th class="last">Path</th></tr></thead>
<tr>
<td class="type">PUT</td>
<td class="name last">/api/bucket/:id/payment</td>
</tr>
</table>
Update a stripe metadata of the bucket customer
<h5>Authentication</h5>
<p>A authentication is needed to access this endpoint</p>
<h5>Body Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">metadata</td>
<td class="type">Object</td>
<td class="attributes"></td>
<td class="description last">the metadata you can update</td>
</tr><tr>
<td class="name">metadata.vat_number</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="description last"></td>
</tr><tr>
<td class="name">metadata.company_name</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="description last"></td>
</tr><tr>
<td class="name">metadata.receipt_email</td>
<td class="type">String</td>
<td class="attributes">optional</td>
<td class="description last"></td>
</tr>
</table>
<h5>Header Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">Authorization</td>
<td class="type">String</td>
<td class="description last">bearer access token issued for the user</td>
</tr>
</table>
<h5>Route Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">:id</td>
<td class="type">String</td>
<td class="description last">bucket id</td>
</tr>
</table>
<h5>Response:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="name">data</td>
<td class="type">Array</td>
<td class="description last">stripe customer metadata object</td>
</tr>
</table>
<h5>Response Code:</h5>
<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tr>
<td class="type">500</td>
<td class="description last">stripe error</td>
</tr><tr>
<td class="type">400</td>
<td class="description last">missing parameters, you need to specify a card</td>
</tr><tr>
<td class="type">200</td>
<td class="description last">succesfully updated the card</td>
</tr>
</table>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>:id</code></td>
<td class="type">
</td>
<td class="description last">bucket id</td>
</tr>
</tbody>
</table>
</article>
</section>
</div>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Jun 13 2019 12:24:19 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>