> For the complete documentation index, see [llms.txt](https://docs.loomgate.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.loomgate.io/en/introduction.md).

# Introduction

Accept card, Apple Pay and Google Pay payments on your website with Loomgate.

Loomgate lets your website accept payments by card, Apple Pay and Google Pay, in USD or EUR. The card form runs in an iframe served by the payment partner (PCI DSS compliant): card numbers go straight from the buyer's browser to the partner and never pass through your server.

## How a payment works

```mermaid
sequenceDiagram
    participant B as Buyer's browser
    participant S as Your server
    participant L as Loomgate
    S->>L: Create payment (secret key)
    L-->>S: payment + client_secret
    S-->>B: client_secret
    B->>L: loomgate.js shows the card form, buyer clicks Pay
    L-->>B: succeeded / processing / error
    L->>S: Webhook payment_intent.succeeded (signed)
    S->>S: Verify the signature, then fulfill the order
```

1. Your server creates a **payment** (payment intent) with your secret key, including the amount and the order details.
2. The browser shows the card form with `loomgate.js`, using your publishable key and that payment's `client_secret`.
3. The buyer clicks pay. `loomgate.js` confirms the payment, including the 3-D Secure step when the bank requires it.
4. Loomgate sends a `payment_intent.succeeded` webhook to your server. Verify the signature before you fulfill the order.

## Where to start

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h4><i class="fa-bolt">:bolt:</i></h4></td><td><strong>Quickstart</strong></td><td>From API key to your first payment, step by step.</td><td><a href="/en/getting-started/quickstart.md">Quickstart</a></td></tr><tr><td><h4><i class="fa-cart-shopping">:cart-shopping:</i></h4></td><td><strong>WooCommerce</strong></td><td>Install the plugin, enter your keys, done. No code required.</td><td><a href="/en/integrations/woocommerce.md">WooCommerce</a></td></tr><tr><td><h4><i class="fa-bell">:bell:</i></h4></td><td><strong>Webhooks</strong></td><td>Receive payment and refund results, verify signatures.</td><td><a href="/en/webhooks.md">Webhooks</a></td></tr><tr><td><h4><i class="fa-code">:code:</i></h4></td><td><strong>API reference</strong></td><td>Every endpoint, parameter, response and error code.</td><td><a href="/en/api-reference.md">API reference</a></td></tr></tbody></table>

## Before you start

{% hint style="warning" %}
**There is no test environment yet.** All keys are `sk_live_…` / `pk_live_…` and every payment charges real money. When you test your integration, use small amounts and then refund them. Transaction fees are not refunded, even when you refund the payment.
{% endhint %}

* **Amounts** are always integers in the currency's smallest unit (cents): `10000` is 100.00 USD. Supported currencies: `usd`, `eur`. See [Amounts, currencies and fees](/en/concepts/amounts-and-fees.md).
* **API address** (base URL): `https://api.loomgate.io`. All integration API routes live under `/partner/v1`.
* **Account**: your merchant account is created by Loomgate or by your reseller. You receive an invitation link, set a password, then sign in to the merchant dashboard to get API keys, create webhooks and view payments.
* **The source of truth for a payment** is the `payment_intent.succeeded` webhook (or the `succeeded` status when you retrieve the payment). Don't fulfill an order just because the browser reports success.

## Developer resources

* [**Merchant dashboard**](https://app.loomgate.io): where you create and revoke [API keys](https://app.loomgate.io/api-keys), set up [webhooks](https://app.loomgate.io/webhooks), register domains for [Apple Pay and Google Pay](https://app.loomgate.io/wallet-domains) and view payments. Its [Tài liệu & ví dụ](https://app.loomgate.io/docs) (Docs & examples) page gathers these links.
* [**loomgate-examples repository**](https://github.com/loomgroup/loomgate-examples) (open source, MIT license): complete checkout pages built with the JS SDK, the `loomgate.js` script tag, the UMD build and the React SDK, each with the server part that creates the payment.
* [**Playground**](https://examples.loomgate.io): try a fee quote, create a payment, pay with a real card, see the fee breakdown and refund, using your own merchant keys, with the code of each step.

{% hint style="warning" %}
The playground uses real money: there is no test mode, and fees are not refunded. Your secret key is typed into the page, so when you are done, create a new key pair and revoke the old one, or run the playground locally from the repository.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.loomgate.io/en/introduction.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
