> For the complete documentation index, see [llms.txt](https://docs.planetcrust.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.planetcrust.com/human-connections/stripe/stripe.md).

# Stripe

<p align="center"><a class="button primary" data-icon="circle-caret-right">Try @Human</a><a class="button primary" data-icon="check">Buy @Human Subscription</a><a class="button primary" data-icon="comments">Join @Human Community</a></p>

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

<h3 align="center">Put Stripe to Work with @Human Automations and @Human Agents</h3>

<p align="center">The Stripe Connection documents all Triggers, Actions and Query Operations available for creating automations via the Stripe API.</p>

{% embed url="<https://www.youtube.com/watch?v=CyuUuaBSZzA>" %}

#### What can you do with the \[Name] Connection?

* Connect to the Stripe API in a few clicks
* Use the related Stripe Operations (see below) in @Human Automations or @Human Agents

### Related Operations

#### Trigger Operations

**Customer Created**

Triggers on: customers/customer.created

Triggered when a new customer is created in Stripe.

**Customer Updated**

Triggers on: customers/customer.updated

Triggered when an existing customer is updated in Stripe.

**Charge Succeeded**

Triggers on: charges/charge.succeeded

Triggered when a charge is successfully completed in Stripe.

**Subscription Created**

Triggers on: subscriptions/customer.subscription.created

Triggered when a new customer subscription is created in Stripe.

**Payment Intent Succeeded**

Triggers on: payment\_intents/payment\_intent.succeeded

Triggered when a payment intent has successfully completed in Stripe.

**Invoice Paid**

Triggers on: invoices/invoice.paid

Triggered when an invoice is fully paid in Stripe.

**Checkout Session Completed**

Triggers on: checkout\_sessions/checkout.session.completed

Triggered when a Checkout Session has been successfully completed in Stripe.

#### Action Operations

[Action: Cancel Subscription](/human-connections/stripe/stripe/action-cancel-subscription.md)

[Action: Create Checkout Session](/human-connections/stripe/stripe/action-create-checkout-session.md)

[Action: Create an Invoice](/human-connections/stripe/stripe/action-create-an-invoice.md)

[Action: Create a Payment Link](/human-connections/stripe/stripe/action-create-a-payment-link.md)

[Action: Create a Product](/human-connections/stripe/stripe/action-create-a-product.md)

[Action: Confirm a Payment Intent](/human-connections/stripe/stripe/action-confirm-a-payment-intent.md)

[Action: Create a Customer](/human-connections/stripe/stripe/action-create-a-customer.md)

[Action: Create a Payment Intent](/human-connections/stripe/stripe/action-create-a-payment-intent.md)

[Action: Create a Price](/human-connections/stripe/stripe/action-create-a-price.md)

[Action: Create a Subscription](/human-connections/stripe/stripe/action-create-a-subscription.md)

[Action: Update a Customer](/human-connections/stripe/stripe/action-update-a-customer.md)

#### Query Operations

Example link

### Related Automations

Example link

### Obtaining Access Credentials <a href="#obtaining-access-credentials" id="obtaining-access-credentials"></a>

To obtain a **Stripe system-to-system Personal Access Token (PAT)**, follow these steps:

#### **Required Values (Request from User)**

1. **Stripe Account Email** (Admin/Owner access required)
2. **Stripe Account Password** (if not already logged in)

#### **Steps to Generate the Token**

1. **Log in** to the Stripe Dashboard: → <https://dashboard.stripe.com> *(Use the provided **Stripe Account Email** and **Password**.)*
2. **Navigate to Developers → API Keys**:
   * Click **"Developers"** in the left sidebar.
   * Select **"API Keys"** under the *API* section.
3. **Create a Restricted Key (Recommended for System-to-System Access)**:
   * Under **"Standard keys"**, click **"Create restricted key"**.
   * Provide a **name** (e.g., `System-Integration-PAT`).
   * Under **"Restrict by resource type"**, select the required permissions (e.g., `Read/Write` for `Charges`, `Customers`, etc.).
   * Click **"Create key"**.
4. **Copy the Token**:
   * The **Secret Key** (e.g., `sk_live_...`) will appear **once**. Copy it immediately.
   * *(This is your **PAT**—treat it as a secret.)*
5. **Secure the Token**:
   * Store it securely (e.g., secrets manager, encrypted config).
   * **Never commit it to version control.**

**Token Format**: `sk_live_<random_string>` (for live mode) or `sk_test_<random_string>` (for test mode).

### Configuring Webhooks

1. **Log in** to the Stripe Dashboard: → <https://dashboard.stripe.com>
2. **Navigate to Developers → Webhooks**:
   * Click **"Developers"** in the top navigation or left sidebar.
   * Select **"Webhooks"** (you may need to open the **Webhooks** tab within the **Workbench** section if available).
3. **Add a Webhook Endpoint**:
   * Click **"Add endpoint"** (or **"Create an event destination"**).
   * In the **"Endpoint URL"** field, provide your publicly accessible HTTPS URL.
   * Click **"Select events"** and choose the required event types (e.g., `checkout.session.completed`).
   * Click **"Add endpoint"**.
4. **Retrieve and Secure the Signing Secret**:
   * On the endpoint's details page, click **"Reveal"** in the **Signing secret** section.
   * Copy the secret (starts with `whsec_...`) and store it securely in your application's environment.

### Code (Apache v2.0): Service Connectivity and Metadata

```
{
  "handle": "stripe-api-v1",
  "status": "active",
  "meta": {
    "short": "Stripe API",
    "description": "Connects to the Stripe API for payment processing and financial operations.",
    "icon": "stripe",
    "tags": ["payment", "finance", "api", "stripe"]
  },
  "service": {
    "baseURL": {
      "value": "https://api.stripe.com/v1"
    },
    "protocol": "https",
    "contentType": "application/x-www-form-urlencoded",
    "headers": {
      "Stripe-Version": {
        "value": "2023-10-16"
      }
    },
    "auth": {
      "method": "api_token",
      "params": {
        "apiToken": {
          "token": {
            "value": "{{apiKey}}",
            "placeholders": [
              {
                "name": "apiKey",
                "type": "String",
                "description": "Stripe API key for authentication",
                "required": true
              }
            ]
          },
          "headerName": {
            "value": "Authorization",
            "placeholders": []
          }
        }
      }
    }
  }
}

```

### Code (Apache v2.0): List of External Resources and Internal Mapping

```
[
  {
    "handle": "customers",
    "meta": {
      "short": "Customers",
      "description": "Manage customer information and payment details."
    },
    "endpoint": {
      "value": "/v1/customers",
      "placeholders": []
    },
    "fields": [
      {
        "name": "id",
        "type": "String",
        "selector": ["id"],
        "meta": {}
      },
      {
        "name": "name",
        "type": "String",
        "selector": ["name"],
        "meta": {}
      },
      {
        "name": "email",
        "type": "String",
        "selector": ["email"],
        "meta": {}
      },
      {
        "name": "created",
        "type": "Integer",
        "selector": ["created"],
        "meta": {}
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the customer to retrieve.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      },
      "create": {
        "method": "POST",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"name\": \"{{name}}\", \"email\": \"{{email}}\"}",
          "placeholders": [
            {
              "name": "name",
              "type": "String",
              "description": "The name of the customer.",
              "required": true
            },
            {
              "name": "email",
              "type": "String",
              "description": "The email address of the customer.",
              "required": true
            }
          ]
        }
      },
      "update": {
        "method": "POST",
        "path": {
          "value": "/{{id}}",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the customer to update.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"name\": \"{{name}}\", \"email\": \"{{email}}\"}",
          "placeholders": [
            {
              "name": "name",
              "type": "String",
              "description": "The updated name of the customer.",
              "required": false
            },
            {
              "name": "email",
              "type": "String",
              "description": "The updated email address of the customer.",
              "required": false
            }
          ]
        }
      },
      "delete": {
        "method": "DELETE",
        "path": {
          "value": "/{{id}}",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the customer to delete.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      }
    },
    "webhooks": [
      {
        "event": "customer.created",
        "path": "/webhooks/stripe/customer-created",
        "payload": [
          {
            "name": "id",
            "type": "String",
            "selector": ["data", "object", "id"],
            "meta": {}
          },
          {
            "name": "email",
            "type": "String",
            "selector": ["data", "object", "email"],
            "meta": {}
          }
        ]
      },
      {
        "event": "customer.updated",
        "path": "/webhooks/stripe/customer-updated",
        "payload": [
          {
            "name": "id",
            "type": "String",
            "selector": ["data", "object", "id"],
            "meta": {}
          },
          {
            "name": "email",
            "type": "String",
            "selector": ["data", "object", "email"],
            "meta": {}
          }
        ]
      }
    ]
  },
  {
    "handle": "charges",
    "meta": {
      "short": "Charges",
      "description": "Create and manage payments."
    },
    "endpoint": {
      "value": "/v1/charges",
      "placeholders": []
    },
    "fields": [
      {
        "name": "id",
        "type": "String",
        "selector": ["id"],
        "meta": {}
      },
      {
        "name": "amount",
        "type": "Integer",
        "selector": ["amount"],
        "meta": {}
      },
      {
        "name": "currency",
        "type": "String",
        "selector": ["currency"],
        "meta": {}
      },
      {
        "name": "status",
        "type": "String",
        "selector": ["status"],
        "meta": {}
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the charge to retrieve.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      },
      "create": {
        "method": "POST",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"amount\": {{amount}}, \"currency\": \"{{currency}}\", \"source\": \"{{source}}\"}",
          "placeholders": [
            {
              "name": "amount",
              "type": "Integer",
              "description": "The amount to charge.",
              "required": true
            },
            {
              "name": "currency",
              "type": "String",
              "description": "The currency to use for the charge.",
              "required": true
            },
            {
              "name": "source",
              "type": "String",
              "description": "The payment source (e.g., a token).",
              "required": true
            }
          ]
        }
      }
    },
    "webhooks": [
      {
        "event": "charge.succeeded",
        "path": "/webhooks/stripe/charge-succeeded",
        "payload": [
          {
            "name": "id",
            "type": "String",
            "selector": ["data", "object", "id"],
            "meta": {}
          },
          {
            "name": "amount",
            "type": "Integer",
            "selector": ["data", "object", "amount"],
            "meta": {}
          }
        ]
      }
    ]
  },
  {
    "handle": "subscriptions",
    "meta": {
      "short": "Subscriptions",
      "description": "Manage recurring payments and subscriptions."
    },
    "endpoint": {
      "value": "/v1/subscriptions",
      "placeholders": []
    },
    "fields": [
      {
        "name": "id",
        "type": "String",
        "selector": ["id"],
        "meta": {}
      },
      {
        "name": "customer",
        "type": "String",
        "selector": ["customer"],
        "meta": {}
      },
      {
        "name": "status",
        "type": "String",
        "selector": ["status"],
        "meta": {}
      },
      {
        "name": "current_period_end",
        "type": "Integer",
        "selector": ["current_period_end"],
        "meta": {}
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the subscription to retrieve.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      },
      "create": {
        "method": "POST",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"customer\": \"{{customer}}\", \"items\": [{\"price\": \"{{price}}\"}]}",
          "placeholders": [
            {
              "name": "customer",
              "type": "String",
              "description": "The ID of the customer.",
              "required": true
            },
            {
              "name": "price",
              "type": "String",
              "description": "The ID of the price.",
              "required": true
            }
          ]
        }
      },
      "delete": {
        "method": "DELETE",
        "path": {
          "value": "/{{id}}",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the subscription to delete.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      }
    },
    "webhooks": [
      {
        "event": "customer.subscription.created",
        "path": "/webhooks/stripe/subscription-created",
        "payload": [
          {
            "name": "id",
            "type": "String",
            "selector": ["data", "object", "id"],
            "meta": {}
          },
          {
            "name": "customer",
            "type": "String",
            "selector": ["data", "object", "customer"],
            "meta": {}
          }
        ]
      }
    ]
  },
  {
    "handle": "payment_intents",
    "meta": {
      "short": "Payment Intents",
      "description": "Manage the lifecycle of a payment flow."
    },
    "endpoint": {
      "value": "/v1/payment_intents",
      "placeholders": []
    },
    "fields": [
      {
        "name": "id",
        "type": "String",
        "selector": ["id"],
        "meta": {}
      },
      {
        "name": "amount",
        "type": "Integer",
        "selector": ["amount"],
        "meta": {}
      },
      {
        "name": "currency",
        "type": "String",
        "selector": ["currency"],
        "meta": {}
      },
      {
        "name": "status",
        "type": "String",
        "selector": ["status"],
        "meta": {}
      },
      {
        "name": "customer",
        "type": "String",
        "selector": ["customer"],
        "meta": {}
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the payment intent.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      },
      "create": {
        "method": "POST",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"amount\": {{amount}}, \"currency\": \"{{currency}}\"}",
          "placeholders": [
            {
              "name": "amount",
              "type": "Integer",
              "description": "Amount intended to be collected.",
              "required": true
            },
            {
              "name": "currency",
              "type": "String",
              "description": "Three-letter ISO currency code.",
              "required": true
            }
          ]
        }
      },
      "update": {
        "method": "POST",
        "path": {
          "value": "/{{id}}",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the payment intent to update.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"amount\": {{amount}}}",
          "placeholders": [
            {
              "name": "amount",
              "type": "Integer",
              "description": "Amount intended to be collected.",
              "required": false
            }
          ]
        }
      },
      "confirm": {
        "method": "POST",
        "path": {
          "value": "/{{id}}/confirm",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the payment intent to confirm.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      }
    },
    "webhooks": [
      {
        "event": "payment_intent.succeeded",
        "path": "/webhooks/stripe/payment-intent-succeeded",
        "payload": [
          {
            "name": "id",
            "type": "String",
            "selector": ["data", "object", "id"],
            "meta": {}
          },
          {
            "name": "amount",
            "type": "Integer",
            "selector": ["data", "object", "amount"],
            "meta": {}
          }
        ]
      }
    ]
  },
  {
    "handle": "products",
    "meta": {
      "short": "Products",
      "description": "Manage products representing physical or digital goods."
    },
    "endpoint": {
      "value": "/v1/products",
      "placeholders": []
    },
    "fields": [
      {
        "name": "id",
        "type": "String",
        "selector": ["id"],
        "meta": {}
      },
      {
        "name": "name",
        "type": "String",
        "selector": ["name"],
        "meta": {}
      },
      {
        "name": "description",
        "type": "String",
        "selector": ["description"],
        "meta": {}
      },
      {
        "name": "active",
        "type": "Boolean",
        "selector": ["active"],
        "meta": {}
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the product.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      },
      "create": {
        "method": "POST",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"name\": \"{{name}}\"}",
          "placeholders": [
            {
              "name": "name",
              "type": "String",
              "description": "The product's name.",
              "required": true
            }
          ]
        }
      },
      "update": {
        "method": "POST",
        "path": {
          "value": "/{{id}}",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the product to update.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"name\": \"{{name}}\", \"active\": {{active}}}",
          "placeholders": [
            {
              "name": "name",
              "type": "String",
              "description": "The product's name.",
              "required": false
            },
            {
              "name": "active",
              "type": "Boolean",
              "description": "Whether the product is active.",
              "required": false
            }
          ]
        }
      },
      "delete": {
        "method": "DELETE",
        "path": {
          "value": "/{{id}}",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the product to delete.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      }
    },
    "webhooks": []
  },
  {
    "handle": "prices",
    "meta": {
      "short": "Prices",
      "description": "Manage prices which map to products."
    },
    "endpoint": {
      "value": "/v1/prices",
      "placeholders": []
    },
    "fields": [
      {
        "name": "id",
        "type": "String",
        "selector": ["id"],
        "meta": {}
      },
      {
        "name": "product",
        "type": "String",
        "selector": ["product"],
        "meta": {}
      },
      {
        "name": "currency",
        "type": "String",
        "selector": ["currency"],
        "meta": {}
      },
      {
        "name": "unit_amount",
        "type": "Integer",
        "selector": ["unit_amount"],
        "meta": {}
      },
      {
        "name": "active",
        "type": "Boolean",
        "selector": ["active"],
        "meta": {}
      },
      {
        "name": "type",
        "type": "String",
        "selector": ["type"],
        "meta": {}
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the price.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      },
      "create": {
        "method": "POST",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"product\": \"{{product}}\", \"currency\": \"{{currency}}\", \"unit_amount\": {{unit_amount}}}",
          "placeholders": [
            {
              "name": "product",
              "type": "String",
              "description": "The ID of the product.",
              "required": true
            },
            {
              "name": "currency",
              "type": "String",
              "description": "Three-letter ISO currency code.",
              "required": true
            },
            {
              "name": "unit_amount",
              "type": "Integer",
              "description": "The unit amount in cents.",
              "required": true
            }
          ]
        }
      },
      "update": {
        "method": "POST",
        "path": {
          "value": "/{{id}}",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the price to update.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"active\": {{active}}}",
          "placeholders": [
            {
              "name": "active",
              "type": "Boolean",
              "description": "Whether the price is active.",
              "required": false
            }
          ]
        }
      }
    },
    "webhooks": []
  },
  {
    "handle": "invoices",
    "meta": {
      "short": "Invoices",
      "description": "Manage customer invoices."
    },
    "endpoint": {
      "value": "/v1/invoices",
      "placeholders": []
    },
    "fields": [
      {
        "name": "id",
        "type": "String",
        "selector": ["id"],
        "meta": {}
      },
      {
        "name": "customer",
        "type": "String",
        "selector": ["customer"],
        "meta": {}
      },
      {
        "name": "status",
        "type": "String",
        "selector": ["status"],
        "meta": {}
      },
      {
        "name": "total",
        "type": "Integer",
        "selector": ["total"],
        "meta": {}
      },
      {
        "name": "currency",
        "type": "String",
        "selector": ["currency"],
        "meta": {}
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the invoice.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      },
      "create": {
        "method": "POST",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"customer\": \"{{customer}}\"}",
          "placeholders": [
            {
              "name": "customer",
              "type": "String",
              "description": "The ID of the customer.",
              "required": true
            }
          ]
        }
      },
      "update": {
        "method": "POST",
        "path": {
          "value": "/{{id}}",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the invoice to update.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"description\": \"{{description}}\"}",
          "placeholders": [
            {
              "name": "description",
              "type": "String",
              "description": "An arbitrary string attached to the object.",
              "required": false
            }
          ]
        }
      },
      "delete": {
        "method": "DELETE",
        "path": {
          "value": "/{{id}}",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the invoice to delete.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      },
      "pay": {
        "method": "POST",
        "path": {
          "value": "/{{id}}/pay",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the invoice to pay.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      }
    },
    "webhooks": [
      {
        "event": "invoice.paid",
        "path": "/webhooks/stripe/invoice-paid",
        "payload": [
          {
            "name": "id",
            "type": "String",
            "selector": ["data", "object", "id"],
            "meta": {}
          },
          {
            "name": "customer",
            "type": "String",
            "selector": ["data", "object", "customer"],
            "meta": {}
          }
        ]
      }
    ]
  },
  {
    "handle": "checkout_sessions",
    "meta": {
      "short": "Checkout Sessions",
      "description": "Manage Stripe Checkout sessions."
    },
    "endpoint": {
      "value": "/v1/checkout/sessions",
      "placeholders": []
    },
    "fields": [
      {
        "name": "id",
        "type": "String",
        "selector": ["id"],
        "meta": {}
      },
      {
        "name": "url",
        "type": "String",
        "selector": ["url"],
        "meta": {}
      },
      {
        "name": "status",
        "type": "String",
        "selector": ["status"],
        "meta": {}
      },
      {
        "name": "customer",
        "type": "String",
        "selector": ["customer"],
        "meta": {}
      },
      {
        "name": "payment_intent",
        "type": "String",
        "selector": ["payment_intent"],
        "meta": {}
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the checkout session.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      },
      "create": {
        "method": "POST",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"success_url\": \"{{success_url}}\", \"mode\": \"{{mode}}\"}",
          "placeholders": [
            {
              "name": "success_url",
              "type": "String",
              "description": "The URL to which Stripe should send customers when payment or setup is complete.",
              "required": true
            },
            {
              "name": "mode",
              "type": "String",
              "description": "The mode of the Checkout Session.",
              "required": true
            }
          ]
        }
      }
    },
    "webhooks": [
      {
        "event": "checkout.session.completed",
        "path": "/webhooks/stripe/checkout-session-completed",
        "payload": [
          {
            "name": "id",
            "type": "String",
            "selector": ["data", "object", "id"],
            "meta": {}
          },
          {
            "name": "payment_intent",
            "type": "String",
            "selector": ["data", "object", "payment_intent"],
            "meta": {}
          }
        ]
      }
    ]
  },
  {
    "handle": "payment_links",
    "meta": {
      "short": "Payment Links",
      "description": "A Payment Link is a shareable URL that will take your customers to a hosted payment page."
    },
    "endpoint": {
      "value": "/v1/payment_links",
      "placeholders": []
    },
    "fields": [
      {
        "name": "id",
        "type": "String",
        "selector": ["id"],
        "meta": {}
      },
      {
        "name": "url",
        "type": "String",
        "selector": ["url"],
        "meta": {}
      },
      {
        "name": "active",
        "type": "Boolean",
        "selector": ["active"],
        "meta": {}
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the payment link.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": null
      },
      "create": {
        "method": "POST",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"line_items\": [{\"price\": \"{{price}}\", \"quantity\": {{quantity}}}]}",
          "placeholders": [
            {
              "name": "price",
              "type": "String",
              "description": "The ID of the Price or Plan object.",
              "required": true
            },
            {
              "name": "quantity",
              "type": "Integer",
              "description": "The quantity of the line item being purchased.",
              "required": true
            }
          ]
        }
      },
      "update": {
        "method": "POST",
        "path": {
          "value": "/{{id}}",
          "placeholders": [
            {
              "name": "id",
              "type": "String",
              "description": "The ID of the payment link to update.",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"active\": {{active}}}",
          "placeholders": [
            {
              "name": "active",
              "type": "Boolean",
              "description": "Whether the payment link is active.",
              "required": false
            }
          ]
        }
      }
    },
    "webhooks": []
  }
]

```

<p align="center"><a class="button primary" data-icon="square-caret-right">Try @Human</a><a class="button primary" data-icon="check">Buy @Human Subscription</a><a class="button primary" data-icon="comments">Join @Human Community</a></p>


---

# 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.planetcrust.com/human-connections/stripe/stripe.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.
