Newsletter with paid tiers
Readers subscribe for free or pay monthly. Paid issues go to paying readers first, and open to everyone after 30 days.
Built into Typestate.
Take one-off payments, deposits and subscriptions on your own Stripe account.
Add Stripe payments to my backend on Typestate.
Stripe is on, through set_payment_provider.
Open a payment page, Open the billing page, Refund a payment
Your key goes in the cockpit, never through me.
Ready on Sandbox after the next deploy.
Events from Stripe that start an action of your backend.
| Field the action gets | Type | What it is |
|---|---|---|
event | text | Which event it is, such as payment.succeeded. |
id | text | The same for every run of one event, so an action can tell a repeat. |
person | text | The account of the person who paid, when they were signed in. |
product | text | The product's name, as it was declared. |
reference | text | What the action that opened the payment page gave as its reference, such as a booking's id. |
payment | text | The payment, for a refund. |
subscription | text | The subscription, for a subscription event. |
refund | text | The refund, for a refund event. |
status | text | The state after the event. |
amount | integer | How much, in the smallest unit of the currency (cents). |
currency | text | Three letters, such as EUR. |
An example
{
"amount": 2000,
"currency": "EUR",
"event": "payment.succeeded",
"id": "evt_8Fq2",
"payment": "pay_7Kd",
"person": "usr_41c",
"product": "Deposit",
"reference": "bkg_19",
"refund": null,
"status": "paid",
"subscription": null
}| Field the action gets | Type | What it is |
|---|---|---|
event | text | Which event it is, such as payment.succeeded. |
id | text | The same for every run of one event, so an action can tell a repeat. |
person | text | The account of the person who paid, when they were signed in. |
product | text | The product's name, as it was declared. |
reference | text | What the action that opened the payment page gave as its reference, such as a booking's id. |
payment | text | The payment, for a refund. |
subscription | text | The subscription, for a subscription event. |
refund | text | The refund, for a refund event. |
status | text | The state after the event. |
amount | integer | How much, in the smallest unit of the currency (cents). |
currency | text | Three letters, such as EUR. |
An example
{
"amount": 2000,
"currency": "EUR",
"event": "payment.failed",
"id": "evt_8Fq2",
"payment": "pay_7Kd",
"person": "usr_41c",
"product": "Deposit",
"reference": "bkg_19",
"refund": null,
"status": "failed",
"subscription": null
}| Field the action gets | Type | What it is |
|---|---|---|
event | text | Which event it is, such as payment.succeeded. |
id | text | The same for every run of one event, so an action can tell a repeat. |
person | text | The account of the person who paid, when they were signed in. |
product | text | The product's name, as it was declared. |
reference | text | What the action that opened the payment page gave as its reference, such as a booking's id. |
payment | text | The payment, for a refund. |
subscription | text | The subscription, for a subscription event. |
refund | text | The refund, for a refund event. |
status | text | The state after the event. |
amount | integer | How much, in the smallest unit of the currency (cents). |
currency | text | Three letters, such as EUR. |
An example
{
"amount": 500,
"currency": "EUR",
"event": "subscription.started",
"id": "evt_8Fq2",
"payment": null,
"person": "usr_41c",
"product": "Monthly",
"reference": null,
"refund": null,
"status": "active",
"subscription": "sub_3Rb"
}| Field the action gets | Type | What it is |
|---|---|---|
event | text | Which event it is, such as payment.succeeded. |
id | text | The same for every run of one event, so an action can tell a repeat. |
person | text | The account of the person who paid, when they were signed in. |
product | text | The product's name, as it was declared. |
reference | text | What the action that opened the payment page gave as its reference, such as a booking's id. |
payment | text | The payment, for a refund. |
subscription | text | The subscription, for a subscription event. |
refund | text | The refund, for a refund event. |
status | text | The state after the event. |
amount | integer | How much, in the smallest unit of the currency (cents). |
currency | text | Three letters, such as EUR. |
An example
{
"amount": 500,
"currency": "EUR",
"event": "subscription.changed",
"id": "evt_8Fq2",
"payment": null,
"person": "usr_41c",
"product": "Monthly",
"reference": null,
"refund": null,
"status": "active",
"subscription": "sub_3Rb"
}| Field the action gets | Type | What it is |
|---|---|---|
event | text | Which event it is, such as payment.succeeded. |
id | text | The same for every run of one event, so an action can tell a repeat. |
person | text | The account of the person who paid, when they were signed in. |
product | text | The product's name, as it was declared. |
reference | text | What the action that opened the payment page gave as its reference, such as a booking's id. |
payment | text | The payment, for a refund. |
subscription | text | The subscription, for a subscription event. |
refund | text | The refund, for a refund event. |
status | text | The state after the event. |
amount | integer | How much, in the smallest unit of the currency (cents). |
currency | text | Three letters, such as EUR. |
An example
{
"amount": 500,
"currency": "EUR",
"event": "subscription.ended",
"id": "evt_8Fq2",
"payment": null,
"person": "usr_41c",
"product": "Monthly",
"reference": null,
"refund": null,
"status": "ended",
"subscription": "sub_3Rb"
}| Field the action gets | Type | What it is |
|---|---|---|
event | text | Which event it is, such as payment.succeeded. |
id | text | The same for every run of one event, so an action can tell a repeat. |
person | text | The account of the person who paid, when they were signed in. |
product | text | The product's name, as it was declared. |
reference | text | What the action that opened the payment page gave as its reference, such as a booking's id. |
payment | text | The payment, for a refund. |
subscription | text | The subscription, for a subscription event. |
refund | text | The refund, for a refund event. |
status | text | The state after the event. |
amount | integer | How much, in the smallest unit of the currency (cents). |
currency | text | Three letters, such as EUR. |
An example
{
"amount": 500,
"currency": "EUR",
"event": "subscription.trial_ending",
"id": "evt_8Fq2",
"payment": null,
"person": "usr_41c",
"product": "Monthly",
"reference": null,
"refund": null,
"status": "trialing",
"subscription": "sub_3Rb"
}| Field the action gets | Type | What it is |
|---|---|---|
event | text | Which event it is, such as payment.succeeded. |
id | text | The same for every run of one event, so an action can tell a repeat. |
person | text | The account of the person who paid, when they were signed in. |
product | text | The product's name, as it was declared. |
reference | text | What the action that opened the payment page gave as its reference, such as a booking's id. |
payment | text | The payment, for a refund. |
subscription | text | The subscription, for a subscription event. |
refund | text | The refund, for a refund event. |
status | text | The state after the event. |
amount | integer | How much, in the smallest unit of the currency (cents). |
currency | text | Three letters, such as EUR. |
An example
{
"amount": 2000,
"currency": "EUR",
"event": "refund.succeeded",
"id": "evt_8Fq2",
"payment": "pay_7Kd",
"person": "usr_41c",
"product": "Deposit",
"reference": "bkg_19",
"refund": "re_2Hs",
"status": "refunded",
"subscription": null
}| Field the action gets | Type | What it is |
|---|---|---|
event | text | Which event it is, such as payment.succeeded. |
id | text | The same for every run of one event, so an action can tell a repeat. |
person | text | The account of the person who paid, when they were signed in. |
product | text | The product's name, as it was declared. |
reference | text | What the action that opened the payment page gave as its reference, such as a booking's id. |
payment | text | The payment, for a refund. |
subscription | text | The subscription, for a subscription event. |
refund | text | The refund, for a refund event. |
status | text | The state after the event. |
amount | integer | How much, in the smallest unit of the currency (cents). |
currency | text | Three letters, such as EUR. |
An example
{
"amount": 2000,
"currency": "EUR",
"event": "refund.failed",
"id": "evt_8Fq2",
"payment": "pay_7Kd",
"person": "usr_41c",
"product": "Deposit",
"reference": "bkg_19",
"refund": "re_2Hs",
"status": "paid",
"subscription": null
}What an action of your backend asks Stripe to do.
| Parameter | Type | Needed | What it is |
|---|---|---|---|
product | text | yes | The product's name, as declared. |
email | text | no | For a guest who is not signed in. |
quantity | integer | no | How many, 1 by default. |
reference | text | no | Anything the payment event should carry back, such as a booking's id. |
return_path | text | no | The page of your site the person comes back to. |
expires_in | integer | no | Minutes until the page stops taking payment. |
What it answers, for example
{
"checkout": "chk_5Tq",
"expires_at": "2026-10-02T09:30:00Z",
"url": "https://checkout.stripe.com/c/pay/cs_test_a1"
}It takes nothing.
What it answers, for example
{
"url": "https://billing.stripe.com/p/session/test_b2"
}| Parameter | Type | Needed | What it is |
|---|---|---|---|
payment | text | yes | The payment to refund, from its payment event. |
amount | integer | no | Cents to refund. Left out, the whole of what is left. |
reason | text | no | Why, for your own records. |
What it answers, for example
{
"status": "requested"
}| Parameter | Type | Needed | What it is |
|---|---|---|---|
subscription | text | yes | The subscription, from its event. |
when | text | yes | now, period_end, or a date. |
What it answers, for example
{
"status": "requested"
}What an action of your backend reads from Stripe.
| Parameter | Type | Needed | What it is |
|---|---|---|---|
person | text | no | Whose subscriptions, for a staff role. Left out, the signed-in person's own. |
What it answers, for example
[
{
"product": "Monthly",
"status": "active"
}
]Your agent declares your products, names the action for each event, and sends you a link where you paste your Stripe key. Changes on Live wait for a person to approve them.
Add Stripe payments to my backend on Typestate.Choose a planReaders subscribe for free or pay monthly. Paid issues go to paying readers first, and open to everyone after 30 days.
People sign in with Google, pick a plan, and pay on Stripe. Your app asks which plan a person has before it opens a feature.
Guests register for your events with free or paid tickets, and you check them in at the door by their code.
Send email from your own address: sign-in links, receipts, reminders.
Send email through your own Amazon Web Services account, at volume.
Send email through your own SendGrid account.
Made by Typestate, and not by Stripe. Stripe does not endorse Typestate. Stripe's own site