Skip to content

DocsAdd to your app

Take payments in your app

Your app can take payments through Stripe, straight into your own Stripe account: one-off payments, subscriptions or a customer portal. PeerMake is not in the middle of the money and takes no fee.

Take payments with Stripe in apps you build

PeerMake builds and hosts web apps from plain words. When an app you build needs to take payments, PeerMake connects it to Stripe for you:

  1. Sign in to PeerMake and start an app, or open one you already have.
  2. Ask for payments in the chat, or press Turn on payments in the app’s Payments. PeerMake creates a Stripe test account for the app, with no Stripe sign-up, and test payments work in the preview at once.
  3. To take real payments, claim that test account on Stripe, into a new or an existing Stripe account. Stripe installs PeerMake’s Stripe App on your live account.
  4. Confirm the account in Payments and publish your app: it takes real payments straight into your own Stripe account.
Start building

Payments need a paid PeerMake plan. PeerMake takes no fee on your payments. See pricing.

Turn on payments

Ask for it in the chat, for example “let people pay for a booking”. The agent asks which country your business is in if it doesn’t know, turns payments on, adds the checkout to your app and shows a Payments ready card. You can also open Payments in your app’s menu, choose where your business is and press Turn on payments.

Once payments are on, Payments shows your Next steps, the current one highlighted:

  • Add a way to pay: Ask the agent to add a way to pay puts a starter request in the chat box. Fill in what people pay for and the price, then send it; nothing is sent until you do.
  • Try a test payment in the preview, with Stripe’s test card (see below).
  • Go live (when you’re ready): press Show the steps to see them.

Above the steps, Previews and Published app say where payments work right now. If turning payments on was cut off before Stripe’s test account was ready, the first step says Setup didn’t finish: press Try again.

You don’t need a Stripe account to start: PeerMake makes a Stripe test account for your app, and you claim it when you go live. Stripe offers these ready-made test accounts in 58 countries; for anywhere else, see your own Stripe keys below.

Test payments in the preview

The preview always runs in Stripe’s Test mode: nobody is charged, and only Stripe’s test cards work. Pay with the card number 4242 4242 4242 4242, any future date and any three digits.

  • In the preview, Stripe’s payment page opens in a new window; if your browser blocks it, the app shows a link that opens the page. When the payment is done it shows Payment finished, or Payment canceled if you cancel; press Close window to go back to your app.
  • While a request is still running, the preview shows its draft. A payment there goes through, but the draft doesn’t receive payment updates, so your app won’t show it: the page after paying says so. Try the payment again once the request finishes.
  • Your customers pay on Stripe’s own pages. Your app never shows card fields, and Stripe’s secret keys stay on your app’s server and never reach the browser.
  • The test payments show in your Stripe test account once you claim it.

Go live

Real payments run on your published app. In Payments, Go live (when you’re ready) has the steps:

  1. Press Claim your Stripe account and sign in to Stripe, or create an account. The test account PeerMake made becomes yours.
  2. Finish Stripe’s setup: Stripe asks for your business and bank details and installs PeerMake’s app on your live account. If you stop halfway, Continue on Stripe takes you back.
  3. Stripe sends you back to Payments, which shows the Stripe account ID that was connected. Check it’s yours (it’s the account ID in your Stripe dashboard, under Settings → Business) and press Confirm it’s my account: live payments start only once you confirm, so they never go to an account that isn’t yours.
  4. Payments now shows Connected. Publish your app, and it takes real payments into your Stripe account. The preview stays in test mode.

Stripe checks your identity and business, pays you out, and handles disputes and tax settings. PeerMake never sees your bank or identity details.

If PeerMake’s app is removed from your Stripe account, your published app stops taking real payments and Payments shows Disconnected: live payments stopped. To reconnect, press Install on Stripe in Payments and install PeerMake’s Stripe App on the same account again; live payments start again by themselves.

A test account you don’t claim expires after a while, and its test payments stop. Press Create a new Stripe test account in Payments to start again with a new one.

Use your own Stripe keys

Where Stripe has no ready-made test accounts, or when you prefer your own Stripe account from the start, press Use my own Stripe keys instead (or Use my own Stripe keys when your country needs them). Then add your keys in the steps, from Stripe’s Developers → API keys: Add your Stripe test key, and later Add your live key under Go live.

  • A test key for previews; it starts with sk_test_ or rk_test_.
  • A live key for the published app; it starts with sk_live_ or rk_live_.

A secret key or a restricted key both work. Each is saved as a secret and never shown again: Replace it with a new one or Remove it. Only the workspace’s owner and admins see and change the keys.

You can switch either way later, from the first step, with a short confirm:

  • Use my own Stripe keys instead: the Stripe test account PeerMake made stays yours to claim, but your app stops using it. Previews keep its key until you add your test key. While real payments run through a Stripe account you confirmed, keep that account instead.
  • Use a Stripe test account instead, where Stripe offers them: PeerMake uses the earlier test account again while previews still use its key, or makes a new one. The keys you pasted are removed from the app.

How your app hears about payments

Stripe tells PeerMake when something happens, such as a completed checkout or a renewed subscription, and PeerMake passes each event on to your app, signed, in the preview and on the published app alike. Your app then records the order or unlocks what was bought. If your app doesn’t answer, PeerMake tries again for up to 3 days.

Recent events in Payments lists the latest events, test or live, and whether your app received them. If your app answered 404, it has no webhook route yet: Ask the agent puts the request to add it in the chat box.

With your own keys, PeerMake adds the webhook endpoint in your Stripe account for you. A restricted key may not be allowed to: then add the address shown under Webhook address in Stripe yourself, in Stripe’s Developers → Webhooks, with these events, and paste the endpoint’s signing secret with Paste a signing secret:

  • checkout.session.completed
  • checkout.session.expired
  • checkout.session.async_payment_succeeded
  • checkout.session.async_payment_failed
  • customer.subscription.created
  • customer.subscription.updated
  • customer.subscription.deleted
  • invoice.paid
  • invoice.payment_failed

Publishing and fees

Before an app with real payments goes live, Publish asks for a terms page, a privacy page and a refund page, so your customers know what they agree to. Ask the agent to add them. An app that is already published needs them too before real payments start on it (when you confirm your Stripe account or add your live key).

PeerMake takes no fee on your payments: you pay Stripe’s standard rates to Stripe. Payments use no credits of their own; your app’s requests and builds use credits as always, and each event delivered to your app is one request to it (credits).

Your data

PeerMake keeps only what it needs to run payments in your apps: your Stripe account identifiers, whether they are connected, and each event until your app receives it. It never sees card numbers or your bank or identity details, never sells this data, and deletes it with your app or account, or when you ask. The details are in the privacy policy.

Help

Questions about payments in your apps, or about PeerMake’s Stripe App? Email support@peermake.app. We answer within one business day.

Something missing or wrong here? Write to support@peermake.app.