No body arguments required, user's email is inferred from Authorization token.
Retrieve a given user's Stripe details, specifically their customer, subscription, and an invoice. If they're lapsed, then it's the most recent failed invoice. If they're active, it's the upcoming invoice. For all Stripe details, if this user does not have Stripe, they will be null.
Body has no args, customer email is read via the Authorization token.
Main method to create a new account. If called as an API customer, you can only create a trial account. Card info can only ever be plugged in through the DappBot web interface.
The token here is produced by Stripe on dapp.bot and cannot be created by external API customers. If it is not provided, then the new account is automatically created with a two-week free trial that allows one standard dapp.
Type guard; only returns true for valid Args objects.
Factory to produce an Args object with empty strings for auth and a trial stripe plan. Useful for getting the correct shape as a value.
The subset of Stripe's types which we use, extracted into a convenient namespace. For more info about how the underlying objects look, check the official Stripe documentation -- it's excellent.
Array of subscription states which translate to an active payment status for the underlying user.
Used to update the customer's saved payment source, currently a credit card.
Like with SignUp, this token can only be produced on the dapp.bot website using Stripe's client-side plugin. This method cannot be successfully called by external API customers.
Type guard; only returns true
for valid Args
objects.
Factory to produce an Args object with an empty string. Useful for getting the correct shape as a value, without having to hardcode strings.
Update the number of allowed dapps for each type. This method can only be called by active accounts with a working payment source. Your account's next invoice will be prorated to reflect the updated capacity.
Type guard; only returns true for valid Args
objects.
Factory to produce an Args object with one standard dapp. Useful for getting the correct shape as a value, without having to hardcode strings.
Listing of how many dapps a customer has allowed for each tier. Note that all must be specified, including 0 values, for safety.
Factory to get a Stripe plan config that has ten standard dapps, the value allowed on free tier.
Type guard; only returns true for
valid StripePlans
objects.
Generated using TypeDoc
Cancel a given user's subscription to DappBot. This will immediately delete all the customer's dapps, zero out their dapp limits, cancel the subscription on Stripe, and leave the user in the CANCELLED state.