Billing
Start checkout
Start a Stripe Checkout session for a credit top-up.
POST
/
v1
/
billing
/
checkout
Start checkout
curl --request POST \
--url https://api.getmillwork.dev/v1/billing/checkout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"topup_usd": 26
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({topup_usd: 26})
};
fetch('https://api.getmillwork.dev/v1/billing/checkout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"checkout_url": "<string>"
}{
"instance": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": 123,
"title": "<string>",
"type": "<string>",
"current_offer": {
"content_markdown": "<string>",
"display_label": "<string>",
"document_id": "<string>",
"offer_id": "<string>",
"published_url": "<string>",
"source_sha256": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"version_id": "<string>"
},
"current_organization": {
"legal_entity_name": "<string>",
"profile_revision": 2
},
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
],
"reason": "agreement_terminated",
"retry_after_s": 123
}{
"instance": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": 123,
"title": "<string>",
"type": "<string>",
"current_offer": {
"content_markdown": "<string>",
"display_label": "<string>",
"document_id": "<string>",
"offer_id": "<string>",
"published_url": "<string>",
"source_sha256": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"version_id": "<string>"
},
"current_organization": {
"legal_entity_name": "<string>",
"profile_revision": 2
},
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
],
"reason": "agreement_terminated",
"retry_after_s": 123
}Authorizations
bearerAuthsessionCookie
Organization API key for application requests.
Body
application/json
Response
Default Response
Stripe-hosted Checkout page to redirect the browser to.
⌘I
Start checkout
curl --request POST \
--url https://api.getmillwork.dev/v1/billing/checkout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"topup_usd": 26
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({topup_usd: 26})
};
fetch('https://api.getmillwork.dev/v1/billing/checkout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"checkout_url": "<string>"
}{
"instance": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": 123,
"title": "<string>",
"type": "<string>",
"current_offer": {
"content_markdown": "<string>",
"display_label": "<string>",
"document_id": "<string>",
"offer_id": "<string>",
"published_url": "<string>",
"source_sha256": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"version_id": "<string>"
},
"current_organization": {
"legal_entity_name": "<string>",
"profile_revision": 2
},
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
],
"reason": "agreement_terminated",
"retry_after_s": 123
}{
"instance": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": 123,
"title": "<string>",
"type": "<string>",
"current_offer": {
"content_markdown": "<string>",
"display_label": "<string>",
"document_id": "<string>",
"offer_id": "<string>",
"published_url": "<string>",
"source_sha256": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"version_id": "<string>"
},
"current_organization": {
"legal_entity_name": "<string>",
"profile_revision": 2
},
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
],
"reason": "agreement_terminated",
"retry_after_s": 123
}