Lodol Docs

Stripe

API actions for the Stripe integration.

Stripe

Accept payments and automate billing workflows with the Stripe API.


Confirm a payment intent

Confirm a payment intent with a payment method to complete the payment.

Parameters

ParameterTypeRequiredDescription
payment_intent_idstringYesStripe payment intent ID
payment_methodstringYesPayment method ID (e.g., pm_card_visa for test mode)

Response

{
  "id": "pi_123",
  "status": "succeeded"
}

Create a Stripe customer

Create a new Stripe customer with contact details.

Parameters

ParameterTypeRequiredDescription
emailstringYesCustomer email
namestringNoCustomer name
descriptionstringNoCustomer description
phonestringNoCustomer phone number

Response

{
  "email": "customer@example.com",
  "id": "cus_123",
  "name": "Example Customer"
}

Create a payment intent

Create a payment intent for a custom charge.

Parameters

ParameterTypeRequiredDescription
amountnumberYesAmount in the smallest currency unit
currencystringYesCurrency code
customer_idstringNoOptional customer to link
descriptionstringNoPayment description

Response

{
  "amount": 500,
  "currency": "usd",
  "id": "pi_123"
}

Generate a payment link for a price.

Parameters

ParameterTypeRequiredDescription
price_idstringYesStripe price ID
quantitynumberNoQuantity 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

ParameterTypeRequiredDescription
product_idstringYesStripe product ID
unit_amountnumberYesPrice amount in the smallest currency unit
currencystringYesCurrency code (e.g. usd)
intervalstringNoRecurring interval (day, week, month, year)
interval_countnumberNoNumber of intervals for recurring prices

Response

{
  "currency": "usd",
  "id": "price_123",
  "unit_amount": 500
}

Create a Stripe product

Create a product to sell with Stripe.

Parameters

ParameterTypeRequiredDescription
namestringYesProduct name
descriptionstringNoProduct description

Response

{
  "id": "prod_123",
  "name": "Example Product"
}

List Stripe customers

List recent Stripe customers with an optional limit.

Parameters

ParameterTypeRequiredDescription
limitnumberNoMaximum 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 intent, optionally partially.

Parameters

ParameterTypeRequiredDescription
payment_intent_idstringYesStripe payment intent ID
amountnumberNoAmount to refund in the smallest currency unit

Response

{
  "amount": 200,
  "id": "re_123"
}

Retrieve a Stripe customer

Fetch a Stripe customer by ID.

Parameters

ParameterTypeRequiredDescription
customer_idstringYesStripe customer ID

Response

{
  "email": "customer@example.com",
  "id": "cus_123"
}

On this page