# More integrations: email, Alipay, Stripe | Creght AI Documentation

> A website that sends email or takes money needs someone else's service: Resend for email, Alipay for CNY, Stripe for cards.…

[AI](/docs/ai/quick-create-first-website.md) [Visual](/docs/get-start.md) [General](/docs/shared/baidu-search-submit-indexing.md)

Getting Started

- [Create Your First Website in 5 Minutes](/docs/ai/quick-create-first-website.md)
- [AI Website Prompt Writing Guide](/docs/ai/ai-create-website-guide.md)
- [Direct Editing: Update Content Without Credits](/docs/ai/ai-edit-content-guide.md)
- [Use Pick to Bring a Section from Another Template into Your Site](/docs/ai/pick-element-in-tpl.md)
- [Prompt Library](/docs/ai/prompt-lib.md)
- [AI Credits Guide](/docs/ai/ai-credits-guide.md)
- [How to Choose an AI Model](/docs/ai/ai-model-guide.md)
- [Creght Skill](/docs/ai/creght-skill.md)
- [Platform Limits](/docs/ai/platform-limits.md)

Backend

- [Add Login, Bookings, Private Pages, and More to Your Website](/docs/ai/backend-database-guide.md)
- [Configure OAuth Login: Google and GitHub](/docs/ai/backend-auth-guide.md)
- [More integrations: email, Alipay, Stripe](/docs/ai/more-integrations.md)
- [Take payments with Alipay](/docs/ai/alipay-payment.md)

Site Setting

- [Multilingual Website Setup Guide](/docs/ai/localization.md)
- [Domain Binding Guide](/docs/ai/custom-domain.md)
- [Alibaba Cloud Domain Purchase Guide (Beginner Version)](/docs/ai/aliyun-domain-registration-guide.md)
- [Redirect Setup Guide](/docs/ai/redirects.md)
- [Missing Pages: Redirect or 404?](/docs/ai/redirect-or-404.md)
- [Meta Pixel Integration Guide](/docs/ai/facebook-meta-pixel.md)

Advanced Usage

- [Configure Different Default Languages for Different Domains](/docs/ai/domain-locale-routing.md)

[Help Center](/help.md)/Backend

# 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** — 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**. The code it writes contains **no keys at all**.

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](https://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](https://open.alipay.com); requires a business-verified account |
| **Stripe** (payments) | Take cards, Apple Pay and more from international buyers; multi-currency, refundable | [Stripe dashboard](https://dashboard.stripe.com); requires an account in a supported country |

All three work the same way, in three steps:

1. Get the key from the provider
2. Paste it into **Backend → Integrations** in the editor ("Add app", then pick one)
3. 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.

## 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](/docs/ai/alipay-payment.md). **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:

1. Open [Stripe → Developers → API keys](https://dashboard.stripe.com/apikeys) and copy the **Secret key**. Use the `sk_test_` one while testing and the `sk_live_` one for real money. Do **not** copy the publishable key.
2. Paste it into **Backend → Integrations → Stripe** and set the "live mode" switch. **It has to agree with the key**: on for `sk_live_`, off for `sk_test_`. Saving fails if they disagree.
3. 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. The AI will tell you which address to use.

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.

## 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 — 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".

If what it writes looks wrong — it asks you for environment variables, or a key shows up in the code — send it the matching developer page and it will correct itself:

| Integration | Link to send the AI |
| --- | --- |
| Email | [Send email and verification codes with an integration](/api/func-email-integration.md) |
| Alipay | [Take Alipay payments with an integration](/api/func-alipay-integration.md) |
| Stripe | [Take Stripe payments with an integration](/api/func-stripe-integration.md) |

Those pages are written for developers and for the AI. **You do not need to read them** — just paste the link.

## 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, 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 — that 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 error-prone parts — signing and signature verification — are up to the AI to implement, where a mistake does not raise an error, it just leaves you insecure. **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.

[PreviousConfigure OAuth Login: Google and GitHub](/docs/ai/backend-auth-guide.md) [NextTake payments with Alipay](/docs/ai/alipay-payment.md)

On this page

- [What is supported today](#what-is-supported-today)
- [Email: Resend](#email-resend)
- [CNY: Alipay](#cny-alipay)
- [International: Stripe](#international-stripe)
- [How to ask so it goes well](#how-to-ask-so-it-goes-well)
- [Check these once the AI is done](#check-these-once-the-ai-is-done)
- [Common questions](#common-questions)

> Full page index: [/llms.txt](/llms.txt)
