# Create New Sub-Account (Zapier Example)

This is for users who want to use an alternative payment system different than Stripe to automatically create new customer sub-accounts for you.

For this example we will be using Gumroad and Zapier to simulate a "new subscription" and the automation for creating a new sub-account.

<figure><img src="/files/tl8CGmH38JLE3zyDc0Ni" alt=""><figcaption></figcaption></figure>

### Zapier

**Step 1.** Create the trigger step for your payment gateway (this could be PayPal, Gumroad, LemonSqueezy, Shopify etc.)

**Step 2.** Create the action step for "POST in Webhooks by Zapier"

<figure><img src="/files/DP44IpES7z1uq58vEHhO" alt=""><figcaption></figcaption></figure>

### Stammer

**Step 3**. From the Stammer.ai dashboard you will need to copy your API token&#x20;

<figure><img src="/files/FhxIMdFRIfUpiBNVfDyO" alt=""><figcaption></figcaption></figure>

**Step 4**. Next, from the Stammer.ai dashboard, copy the API endpoint URL that is for creating a new sub-account.&#x20;

<figure><img src="/files/33FCV5SIu0KjbXd6Omhv" alt=""><figcaption></figcaption></figure>

**Step 5.** Back in Zapier, paste in the values from Stammer into their corresponding fields.

* **URL** = paste in your white label API endpoint URL
* **Payload Type** = json
* **Data**
  * email (Type: Email, Required)&#x20;
    * Email address of the SubAccount
  * first\_name (Type: String, Optional)&#x20;
    * First name of the SubAccount
  * last\_name (Type: String, Optional)&#x20;
    * Last name of the SubAccount
  * password (Type: String, Optional)&#x20;
    * Password of the SubAccount. If not provided, it will be autogenerated.
  * package\_tier (Type: Choice, Optional)&#x20;
    * Package Tier (basic, pro, premium) of the SubAccount, if applicable.
  * subscription\_id (Type: String, Optional)&#x20;
    * Subscription ID of the SubAccount, required only if a package plan is selected.
* Wrap Request in Array = No
* File = N/A
* Unflatten = Yes
* Basic Auth = N/A
* Headers = Authorization Token \[Your API Token]

<figure><img src="/files/BEVZj8eAZLXsyNRGn9Kx" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/hO3MLUXTy9J70syMMry6" alt=""><figcaption></figcaption></figure>

**Step 6.** After you have tested the webhook you should see a successful message that says "sub-account created successfully."

<figure><img src="/files/QuVk08zoYvD0ZTUfdv48" alt=""><figcaption></figcaption></figure>

You have now an automation setup to automatically create a new sub-account every time someone makes a purchase in Gumroad.&#x20;


---

# Agent Instructions: 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:

```
GET https://docs.stammer.ai/stammer.ai-docs/white-label/white-label-api/examples/create-new-sub-account-zapier-example.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
