More integrations: email, Alipay, Stripe
A website that sends email or takes money needs someone else's service: Resend for email, Alipay for CNY, Stripe for cards. Each one needs a key, and only you can get that key, because it decides who gets paid and whose sending quota is used, so the provider only lets the account owner do it.
Creght turns this into an "integration": you fetch the key once, paste it into the editor, and from then on you just tell the AI what you want.
Why make it an integration at all? Because the code behind one is written by the platform and has been verified over and over. Without it the AI can still produce code that looks like it works, but signing, signature verification and key handling are all left for it to implement from scratch, and that kind of code usually fails silently: the page still redirects, the button still works, the money just never arrives, or a forged notification is enough for someone to walk away with the goods. Using the integration swaps the most error-prone part for one that is already proven.
This page covers three things: which integrations exist today, what each one lets your site do, and how to ask the AI for it once you are connected.
What is supported today
| Integration | What it lets your site do | Where to get the key |
|---|---|---|
| Resend (email) | Send email to users, send sign-in/sign-up verification codes, notify yourself when a form is submitted | resend.com; you need a domain of your own to send from |
| Alipay (payments) | PC website payment: the buyer scans to pay, and your site fulfils the order once the money arrives | Alipay Open Platform; requires a business-verified account |
| Stripe (payments) | Take cards, Apple Pay and more from international buyers; multi-currency, refundable | Stripe dashboard; requires an account in a supported country |
| OpenAI (AI) | Translate, rewrite, summarise, turn a sentence into structured data, generate images, or run a simple question and answer helper | OpenAI dashboard, or any compatible model service |
| Azure Speech (narration) | Read text aloud: article narration, audiobooks, podcasts, with a choice of voice and speed | Azure portal, create a Speech service resource |
They all work the same way, in three steps:
- Get the key from the provider
- Paste it into Backend → Integrations in the editor ("Add app", then pick one)
- Go back to the editor and tell the AI what you want built
Saving calls the provider for real to check what you entered. A wrong value fails right there, instead of surfacing when a customer tries to pay or an email never arrives.
What if the service you need is not listed
An integration is only the code we wrote for you. It is not a permission list. Func runs JavaScript on the backend, so any service with an API can be connected by asking the AI for it: search, payments, a CMS, SMS, maps, parcel tracking, all the same.
For example:
Use Meilisearch for full text search over my articles. The host and key are in my environment variables. Highlight the matched keywords on the search page.
Add WeChat Pay native QR payments using the merchant id and key from my environment variables, and mark the order as paid once the payment succeeds.
The only difference is this: for the services with an integration, the platform holds the keys and does the signing and verification. For the ones you connect yourself, the AI writes that part too. So be more specific when you ask, especially anywhere money or identity is involved. Keys still do not belong in the code: put them in Backend → Environment variables and the AI reads them from process.env.
For what Func can do and how it is written, see Func backend capabilities.
Email: Resend
Once connected, your site can:
- Send verification codes for sign-up and password reset (expiry, attempt limits and rate limiting are handled by the platform)
- Send a confirmation email after an order, a booking or a form submission
- Notify you when someone submits a contact form
You need a Resend account and a domain of your own: the from address has to live on that domain (e.g. hello@yourdomain.com) and be verified in Resend. A free mailbox (Gmail, QQ) cannot be used as the sender. That is true of every sending service.
Once saved, ask the AI:
I have set up the email integration. Add email verification codes to the sign-up flow.
The more specific you are about when it fires, who receives it and what it says, the better:
I have set up the email integration. When someone submits the booking page, send them a confirmation email with the time and service they booked, and send a notification to me at me@example.com.
CNY: Alipay
Once connected: the buyer clicks "buy", an order is created, they are sent to Alipay, and when they have paid your site marks the order paid and unlocks whatever they bought.
Alipay needs several values (an APPID, two keys and a receiving-account PID) whose names look confusingly alike, so it has its own illustrated walkthrough: Take payments with Alipay. Follow that page for Alipay. It is not repeated here.
Once saved, ask the AI:
I have connected Alipay. Add a "Buy now" button to the course detail page. Show a success message after payment, and let me see all orders in the admin area.
International: Stripe
Stripe covers international buyers: cards, Apple Pay, Google Pay and more. Buyers pay on a Stripe-hosted checkout page and come back to your site afterwards.
There is much less to collect than with Alipay:
- Open Stripe → Developers → API keys and copy the Secret key. Use the
sk_test_one while testing and thesk_live_one for real money. Do not copy the publishable key. - Paste it into Backend → Integrations → Stripe and set the "live mode" switch. It has to agree with the key: on for
sk_live_, off forsk_test_. Saving fails if they disagree. - Fill in where buyers land after paying or cancelling (any page on your site will do for now; the AI can change it later).
Leave the webhook signing secret empty for now. It can only be created once your site is published and has a real address, so the order is: save the integration → let the AI write the code → publish → create the webhook in the Stripe dashboard → come back and paste the secret.
Stripe will ask for an endpoint URL at that step. The shape is your production domain + /func/ + the Func file and method, for example https://example.com/func/stripe.webhook. It has to be a published production domain; a preview domain receives no events. If you are unsure of the exact path, ask the AI in the editor: "what is my Stripe webhook URL".
Then ask:
I have connected Stripe. Add a buy button for this product at $29. After payment, unlock the download for that user.
If you take money more than one way, ask for both:
I have connected both Alipay and Stripe. On the purchase page give buyers two buttons, "Pay with Alipay" and "Pay by card", each going through its own flow, with both recorded in the same orders table.
AI: OpenAI
Once connected, your site can call a model from the backend: translate a passage, condense a long article, turn a sentence somebody typed into structured data, generate an illustration, or run a small assistant that answers questions.
There is only one thing to fetch:
- Sign in to the OpenAI dashboard, API keys, create a key and copy the
sk-string. It is shown once and cannot be read again after you close the dialog. - Paste it into Backend → Integrations → OpenAI in the editor and set a default model, for example
gpt-4o-mini, which is cheap and fast enough for translation and summaries. - If you use a compatible service rather than OpenAI itself, change the base URL to the one they gave you. Nothing else changes.
Then ask:
I have connected OpenAI. Add a "Translate to English" button on the article page. Show the translation underneath, and do not touch the original in the database.
I have connected OpenAI. When someone writes a free-form message, pull out the name, phone number and preferred time and save them as a booking. Leave a field empty when it is not there rather than guessing.
I have connected OpenAI. Generate a 1024x1024 cover image for every new article and store it in the site's own space.
About cost: it is your key and your bill. Creght takes no cut and does not meter it for you. To keep it under control, set a spending limit in the OpenAI dashboard and ask the AI to call the model only where it is actually needed, not on every page view.
Narration: Azure Speech
Turn text into audio. Good for article narration, audiobooks and podcasts, and for spoken prompts on a page.
- Sign in to the Azure portal and create a Speech service resource. The free tier is enough to try it.
- Open Keys and Endpoint, copy KEY 1, and note the region, something like
eastusorsoutheastasia. - Paste both into Backend → Integrations → Azure Speech. The region is the short form
eastus. Do not paste the whole endpoint URL, which is the mistake people make most often.
Then ask:
I have connected Azure Speech. Add a "Listen" button on the article page that plays the article as audio. Do not regenerate the same article twice, reuse what was generated before.
I have connected Azure Speech. Use the en-US-JennyNeural voice at a slightly slower rate and build a bedtime story page.
About cost: your bill again. Speech is billed per character, so "do not regenerate the same article twice" is worth saying every time. The AI will store the audio it generated and reuse it.
How to ask so it goes well
"Add payments" will work, but saying these three things saves a round trip or two:
- Start with "I have already connected X." This matters, because without it the AI may assume you have not, and write code that asks you to supply keys yourself.
- Say what you sell, what it costs, and what the buyer gets. "A 199 CNY course, and after paying they can watch the videos" beats "add payments".
- Say which page it starts from, e.g. "the button on the course detail page".
You do not need to send the AI any documentation, because it looks up the platform's own doc index and knows which capability to use. If it does go astray (asking you for environment variables, or putting a key in the code), saying "use the platform integration, do not ask me for keys" is enough.
The pages below are written for developers and for the AI. They are listed only if you want the details yourself; you will not need them day to day:
| Integration | Developer page (optional reading) |
|---|---|
| Send email and verification codes with an integration | |
| Alipay | Take Alipay payments with an integration |
| Stripe | Take Stripe payments with an integration |
Check these once the AI is done
For anything that takes money, these three are the safety floor. The AI handles them by default, and you can ask it to confirm:
- Prices come from server-side product data, never from the browser, otherwise customers set their own price.
- Only a payment the provider confirmed counts. Landing back on your page is not proof.
- Notifications for one order arrive more than once, so fulfilling must take effect only once.
Also: republish the site after any change to payment or email code. Provider callbacks only reach a published production domain, never a preview one.
Common questions
Can a key leak? No. Keys live on the server, calls are made by the platform, and site code, runtime logs and the browser never see them. Payment integrations are stricter still: the platform refuses to expose a payment key to code, so it cannot appear in what the AI writes either.
Can I connect just one of them? Yes. They are independent, so connect only what you need.
Can I connect two accounts of the same service? Yes. For two Alipay or two Stripe accounts, add two integrations with different channel tags and tell the AI which page uses which tag. Note that for payments the same tag cannot be used by two configs, which is an error because an order and a receiving account must match one to one.
Can I take payments without an integration? Technically yes: put the keys in Backend → Environment variables and have the AI use them. But then the key sits somewhere code can read, and the parts described at the top, the ones that fail silently when written wrong, are left for the AI to implement from scratch. Use the integration when you can.
Will there be more? Yes. Whatever appears under Backend → Integrations → Add app in the editor is the current list; trust that over this page.
