dropto.run docs
Drop2Run.Api | v1

Subscriptions, seats and invoices, through the payment provider that is the merchant of record. Publishing is free with or without an account; what is bought here is room, a custom domain and a page with no badge.


Cancels at the end of the paid period. Does not refund.

POST
https://dropto.run
/api/billing/cancel
d2r_session (cookie)
or
Bearer

Cancels at the end of the paid period. Does not refund. › Responses

OK

Response of the billing actions that only ask the provider for something.
accepted
​boolean · required

Always true; the provider took the request.


Starts a hosted checkout for a paid plan.

POST
https://dropto.run
/api/billing/checkout
d2r_session (cookie)
or
Bearer

Starts a hosted checkout for a paid plan. › Request Body

Request body of `POST /api/billing/checkout`.
interval
​string · maxLength: 8 · required

Billing interval, month or year.

planId
​string · maxLength: 32 · required

Id of the plan to buy.

Starts a hosted checkout for a paid plan. › Responses

OK

Response of `POST /api/billing/checkout`.
checkoutUrl
​string · required

The provider-hosted page to send the buyer to.


Lists the invoices issued to the signed-in account.

GET
https://dropto.run
/api/billing/invoices
d2r_session (cookie)
or
Bearer

Lists the invoices issued to the signed-in account. › Responses

OK

Response of `GET /api/billing/invoices`.
​InvoiceRow[] · required

The account's invoices, newest first.


Moves an existing subscription onto a different plan, at the next renewal or immediately with the unused remainder credited.

POST
https://dropto.run
/api/billing/plan
d2r_session (cookie)
or
Bearer

Moves an existing subscription onto a different plan, at the next renewal or immediately with the unused remainder credited. › Request Body

Request body of `POST /api/billing/plan`.
interval
​string · maxLength: 8 · required

Billing interval, month or year.

planId
​string · maxLength: 32 · required

Id of the plan to move onto.

timing
​null | string · maxLength: 16

now, or absent, which means the same thing: the change is applied immediately and the difference is settled against the unused remainder of the current period. Kept in the contract only so that period_end — which this route offered until the provider was found to have no way of deferring anything — can be refused by name instead of being read as now and charging a customer who was told nothing would be charged.

Moves an existing subscription onto a different plan, at the next renewal or immediately with the unused remainder credited. › Responses

OK

One subscription, as the billing page renders it.
cancelAtPeriodEnd
​boolean · required

Whether it stops at the end of the current period.

currentPeriodEnd
​null | string · date-time · required

When the paid period ends; null while paused.

graceUntil
​null | string · date-time · required

When the grace window on a failed payment runs out, or null.

interval
​string · required

The billing interval.

pausedAt
​null | string · date-time · required

When it was paused, or null.

pendingInterval
​null | string · required

The interval it switches to at the next renewal, or null.

pendingPlanId
​null | string · required

The plan it switches to at the next renewal, or null.

planId
​string · required

The plan currently paid for.

seats
​integer | string · int32 · pattern: ^-?(?:0|[1-9]\d*)$ · required

How many seats are being paid for; one on every tier not sold by the seat.

status
​string · required

One of the SubscriptionStatus names.


Lists every tier the signed-in account has been on, newest first.

GET
https://dropto.run
/api/billing/plan-history
d2r_session (cookie)
or
Bearer

Lists every tier the signed-in account has been on, newest first. › Responses

OK

Response of `GET /api/billing/plan-history`.
​PlanChangeRow[] · required

The account's tier changes, newest first.


GET
https://dropto.run
/api/billing/portal
d2r_session (cookie)
or
Bearer

OK

Response of `GET /api/billing/portal`.
portalUrl
​string · required

Where to send the customer to manage their card and receipts.


Keeps a subscription that was going to stop, on its existing period.

POST
https://dropto.run
/api/billing/resume
d2r_session (cookie)
or
Bearer

Keeps a subscription that was going to stop, on its existing period. › Responses

OK

One subscription, as the billing page renders it.
cancelAtPeriodEnd
​boolean · required

Whether it stops at the end of the current period.

currentPeriodEnd
​null | string · date-time · required

When the paid period ends; null while paused.

graceUntil
​null | string · date-time · required

When the grace window on a failed payment runs out, or null.

interval
​string · required

The billing interval.

pausedAt
​null | string · date-time · required

When it was paused, or null.

pendingInterval
​null | string · required

The interval it switches to at the next renewal, or null.

pendingPlanId
​null | string · required

The plan it switches to at the next renewal, or null.

planId
​string · required

The plan currently paid for.

seats
​integer | string · int32 · pattern: ^-?(?:0|[1-9]\d*)$ · required

How many seats are being paid for; one on every tier not sold by the seat.

status
​string · required

One of the SubscriptionStatus names.


Changes how many seats a subscription sold by the seat is billed for, settling the difference in either direction today.

POST
https://dropto.run
/api/billing/seats
d2r_session (cookie)
or
Bearer

Changes how many seats a subscription sold by the seat is billed for, settling the difference in either direction today. › Request Body

Request body of `POST /api/billing/seats`.
seats
​integer | string · int32 · pattern: ^-?(?:0|[1-9]\d*)$ · required

How many seats to be billed for from now on — the total, not a difference. A delta would make the request depend on what the client last read, so two owners pressing "add a seat" at once would buy two seats each.

Changes how many seats a subscription sold by the seat is billed for, settling the difference in either direction today. › Responses

OK

One subscription, as the billing page renders it.
cancelAtPeriodEnd
​boolean · required

Whether it stops at the end of the current period.

currentPeriodEnd
​null | string · date-time · required

When the paid period ends; null while paused.

graceUntil
​null | string · date-time · required

When the grace window on a failed payment runs out, or null.

interval
​string · required

The billing interval.

pausedAt
​null | string · date-time · required

When it was paused, or null.

pendingInterval
​null | string · required

The interval it switches to at the next renewal, or null.

pendingPlanId
​null | string · required

The plan it switches to at the next renewal, or null.

planId
​string · required

The plan currently paid for.

seats
​integer | string · int32 · pattern: ^-?(?:0|[1-9]\d*)$ · required

How many seats are being paid for; one on every tier not sold by the seat.

status
​string · required

One of the SubscriptionStatus names.


Reads the signed-in account's subscription, if it has one.

GET
https://dropto.run
/api/billing/subscription
d2r_session (cookie)
or
Bearer

Reads the signed-in account's subscription, if it has one. › Responses

OK

Response of `GET /api/billing/subscription`.
​required
​required