# n8n (/en/integrations/n8n)



Connect your existing Yolfi organization to n8n to create payment checkouts and pass signed
payment results to your workflows.

<Callout type="info">
  Yolfi is a verified integration available on **n8n Cloud** and self-hosted n8n.
  Open the [official Yolfi integration page](https://n8n.io/integrations/yolfi/).
  This guide covers package version **0.1.2**.
</Callout>

Install and connect [#install-and-connect]

You need a Yolfi account with an organization and receiving wallets configured, plus an n8n
owner or admin who can install nodes.

1. In the n8n workflow editor, select **+**, search for **Yolfi**, and choose the result
   marked **Verified**. Select **Install**.
2. Add the **Yolfi** action node. In its credential selector, create a **Yolfi API** credential.
3. Sign in to [Yolfi](https://app.yolfi.com), open **Settings → API Keys**, and copy your
   organization's API key into the credential's **API Key** field.
4. Save and test the credential, then select it in the node.

On self-hosted n8n, you can also install `n8n-nodes-yolfi` through **Settings → Community
Nodes → Install**. If installation is unavailable, ask the n8n owner or admin to enable
verified community nodes for the instance.

The nodes use `https://app.yolfi.com/api`. Keep the API key in n8n credentials. Customer and
payment records returned by the nodes may be stored in n8n execution history, so use
appropriate access and retention settings.

Try Create Checkout Session, then Get [#try-create-checkout-session-then-get]

Build this small workflow: **Manual Trigger → Yolfi → Yolfi**. You can verify the connection
without making a payment.

1. In the first Yolfi node, select **Resource: Checkout Session** and **Operation: Create**.
   Use these example values:

   | Field                                 | Value                                    |
   | :------------------------------------ | :--------------------------------------- |
   | Amount                                | `1.00` as a decimal string               |
   | Currency                              | `USD`                                    |
   | Idempotency Key                       | `n8n:checkout:demo-order-1042:attempt-1` |
   | Additional Fields → Merchant Order ID | `demo-order-1042`                        |

2. Run the first node. It returns the Checkout Session `id`, beginning with `ycs_`, and a
   hosted payment `url`.

3. In the second Yolfi node, select **Resource: Checkout Session** and **Operation: Get**.
   Switch **Checkout Session ID** to an expression and enter `{{ $json.id }}`.

4. Run the workflow. The second node retrieves the same session and its status. Before any
   payment invoice is created, `payment` is `null`. Keep the hosted checkout unpaid for this
   connection check; creating and retrieving a session does not transfer funds.

Use a stable **Idempotency Key** of **16-200 characters** for each logical order attempt.
Reuse the same key and request data on retries. Reusing a key with different data causes a
conflict. Create a new key only when you intend to create a different checkout attempt.
Do not use a random value or the execution ID as an automatic retry key.

For real orders, calculate the final amount in your trusted order system. Supported pricing
currencies are **USD, EUR, CNY, RUB, INR, TRY, KRW, and JPY**. The buyer chooses from the
payment networks and cryptocurrencies available to your Yolfi organization.

Available operations [#available-operations]

| Resource         | Operations                     | Use                                                                                             |
| :--------------- | :----------------------------- | :---------------------------------------------------------------------------------------------- |
| Checkout Session | Create, Get                    | Create a one-time checkout for an order and retrieve its payment status.                        |
| Payment Link     | Create, Get, Get Many, Disable | Create reusable one-time payment links, retrieve links, or disable new payments through a link. |
| Customer         | Get, Get Many                  | Retrieve customer details and payment summaries.                                                |
| Subscription     | Get                            | Retrieve an existing subscription's status, customer, and payment records.                      |

**Get Many** returns each record as a separate n8n item and supports a limit or **Return All**.
Payment Link outputs include `checkoutUrl`. Checkout Session **Create** returns `url`;
**Get** returns session and payment details, without a checkout URL field.

Payment Link creation has no idempotency guarantee. Use Checkout Sessions for order workflows
that may retry. Version 0.1.2 creates only one-time payment links and does not create recurring
links or cancel subscriptions.

Payment and subscription events [#payment-and-subscription-events]

Add **Yolfi Trigger**, select your **Yolfi API** credential, and choose the events that should
start the workflow:

| Event                    | When it runs                                                                                                                       |
| :----------------------- | :--------------------------------------------------------------------------------------------------------------------------------- |
| `payment.confirmed`      | Yolfi confirms a payment.                                                                                                          |
| `invoice.created`        | A payment invoice is created after the buyer selects a payment method. Creating a Checkout Session alone does not emit this event. |
| `invoice.overdue`        | A payment invoice expires without full payment.                                                                                    |
| `subscription.overdue`   | A subscription becomes overdue.                                                                                                    |
| `subscription.cancelled` | A subscription is cancelled.                                                                                                       |

Publishing or activating the workflow automatically registers a dedicated webhook endpoint
in Yolfi. Deactivating the workflow removes that trigger's endpoint. Manual listening uses
a separate temporary endpoint. You do not need to copy a callback URL or signing secret.

The n8n webhook URL must be publicly reachable over **HTTPS**. n8n Cloud provides a public
URL; configure your public webhook URL before activating a self-hosted workflow. A local
`localhost` URL cannot receive Yolfi deliveries.

Yolfi Trigger verifies every delivery using HMAC-SHA256 over the raw body and the
endpoint-specific signing secret. Signature verification is mandatory and handled by the
node. The output is the native event envelope:

```text
{ id, type, created, livemode, data }
```

The affected object is directly under `data`. Use `data.merchantOrderId` or
`data.checkoutSessionId` to find the order when those fields are present. Deliveries can
repeat: store and check the event `id` in a durable store before granting access, shipping
goods, or changing balances. A successful delivery acknowledges receipt; downstream actions
can still fail. Use n8n error workflows to handle those failures.

Dashboard test events have `livemode: false` and are ignored by default. Enable **Include
Test Events** on a workflow intended to receive them, start listening, and send a test from
Yolfi **Settings → Webhooks**. A test event checks delivery and workflow handling; it does
not pay an order or prove a real payment.

Connection and delivery checks [#connection-and-delivery-checks]

If the credential test fails, check the organization API key and select the intended
credential in both nodes. For missing events, check the chosen event types, workflow
activation, public HTTPS URL, and delivery results in Yolfi **Settings → Webhooks**.

If you change the public n8n URL, activation creates an endpoint for the new URL and leaves
the old endpoint untouched. Remove the obsolete endpoint in Yolfi after the migration.

See [Checkout Sessions](/en/checkout) for the payment flow and
[webhook events](/en/webhooks/webhook-details) for event fields.
