Skip to content

Start adding a card

The Paddle transaction that opens the form for the organization's card.

Updated

post

https://cloud.cahaves.com/api/billing/card

Authorization

cahaves.cloud.sessionstringcookierequired

The session cookie Cloud sets when a customer signs in to the console with GitHub or Google. It is HttpOnly, so scripts cannot read it, and there are no API keys or tokens yet.

Headers

X-Cloud-Organizationstring<uuid>

The id of the organization the request works in, one the signed-in customer owns. Left out or empty, the request works in their oldest organization. Any other value answers 404 with `reason: "organization"`. A customer with no organization yet gets 409 "Create an organization first." from every route that works in one.

Example: "2f6c8e0a-4b1d-4e7f-9a3c-5d7e9f1b3a5c"

Responses

application/json

The Paddle transaction to open.

transaction_idstringrequired

Paddle's transaction id, which the console opens in Paddle's form.

Answers the Paddle transaction the console opens in Paddle's form: a subscription at $0.00 a month that keeps the card for the charges Cloud makes on the 1st, for the organization the request works in. Each organization keeps a card of its own, and a checkout started in one is refused when it is confirmed in another. Paddle's form runs in the browser, so this is of use only inside the console. Add a card and read your bill walks through it.

An organization that already has a card answers 409 with "This organization already has a card. Change it instead.", and one billed by invoice with "This organization is billed by invoice, so it takes no card." At most 10 are accepted a minute per account, and 60 across the platform.