Stripe
API actions for the Stripe integration.
Stripe
Accept payments and automate billing workflows with Stripe.
Confirm a Stripe payment
Complete a payment by confirming it with a payment method.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
payment_intent_id | string | Yes | The ID of the Stripe payment to confirm. |
payment_method | string | Yes | The ID of the payment method to charge, for example pm_card_visa in test mode. |
Response
{
"id": "pi_123",
"status": "succeeded"
}Create a Stripe customer
Create a new Stripe customer with contact details.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Customer email |
name | string | No | Customer name |
description | string | No | Customer description |
phone | string | No | Customer phone number |
Response
{
"email": "customer@example.com",
"id": "cus_123",
"name": "Example Customer"
}Create a Stripe payment
Set up a payment to charge a customer a custom amount.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | The amount to charge, in the smallest currency unit, for example cents for USD (500 means $5.00). |
currency | string | Yes | The three-letter currency code, for example usd. |
customer_id | string | No | The ID of a customer to link this payment to (optional). |
description | string | No | A short note describing what the payment is for. |
Response
{
"amount": 500,
"currency": "usd",
"id": "pi_123"
}Create a Stripe payment link
Generate a payment link for a price.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
price_id | string | Yes | Stripe price ID |
quantity | number | No | Quantity to purchase |
Response
{
"id": "plink_123",
"url": "https://pay.stripe.com/test"
}Create a Stripe price
Create a one-time or recurring price for a product.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
product_id | string | Yes | Stripe product ID |
unit_amount | number | Yes | The price in the smallest currency unit, for example cents for USD (500 means $5.00). |
currency | string | Yes | The three-letter currency code, for example usd. |
interval | string | No | How often the customer is billed: day, week, month, or year. |
interval_count | number | No | The number of billing intervals between charges. For example, 3 with a monthly interval charges every 3 months. |
Response
{
"currency": "usd",
"id": "price_123",
"unit_amount": 500
}Create a Stripe product
Create a product to sell with Stripe.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Product name |
description | string | No | Product description |
Response
{
"id": "prod_123",
"name": "Example Product"
}List Stripe customers
List your most recent Stripe customers.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | number | No | Maximum customers to return |
Response
[
{
"email": "customer@example.com",
"id": "cus_123"
},
{
"email": "other@example.com",
"id": "cus_124"
}
]Refund a Stripe payment
Refund a payment, in full or in part.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
payment_intent_id | string | Yes | The ID of the Stripe payment to refund. |
amount | number | No | The amount to refund, in the smallest currency unit, for example cents for USD (200 means $2.00). Leave blank to refund the full payment. |
Response
{
"amount": 200,
"id": "re_123"
}Retrieve a Stripe customer
Look up a Stripe customer by their ID.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
customer_id | string | Yes | Stripe customer ID |
Response
{
"email": "customer@example.com",
"id": "cus_123"
}