Skip to content

Stripe - Create Payment Intent

This module creates a Payment Intent, Stripe’s central object for handling payments. It allows you to configure the amount, currency, customer, payment method, and capture options.

  • Secret Key: Stripe secret key
ParameterTypeRequiredDescription
credentials_idcredentialYesStripe credentials
amountnumberYesAmount in currency units (e.g.: 99.99)
currencystringNoCurrency code (default: usd)
customer_idstringNoCustomer ID
payment_methodstringNoPayment method ID
confirmbooleanNoConfirm immediately
payment_method_typesstringNoAllowed types (default: card)
descriptionstringNoPayment description
receipt_emailstringNoEmail to send receipt
statement_descriptorstringNoStatement descriptor text (max 22 chars)
capture_methodselectNoautomatic or manual
metadatastringNoCustom metadata (JSON)
{
"success": true,
"payment_intent": {...},
"payment_intent_id": "pi_3MtwBwLkdIwHu7ix28a3tqPa",
"client_secret": "pi_3MtwBw..._secret_YrKJUK...",
"status": "requires_payment_method",
"amount": 99.99,
"currency": "usd",
"message": "PaymentIntent pi_3MtwBw... creado (requires_payment_method)"
}
  • requires_payment_method: Needs a payment method
  • requires_confirmation: Needs confirmation
  • requires_action: Requires customer action (3DS)
  • processing: Processing
  • succeeded: Successful
  • canceled: Canceled
{
"amount": 99.99,
"currency": "usd"
}
{
"amount": 150.00,
"currency": "mxn",
"customer_id": "cus_NffrFeUfNV2Hib",
"payment_method": "pm_1234567890",
"confirm": true
}
{
"amount": 500.00,
"currency": "eur",
"customer_id": "cus_NffrFeUfNV2Hib",
"capture_method": "manual",
"description": "Reserva de hotel",
"metadata": "{\"booking_id\": \"HTL-12345\"}"
}
  • The amount is automatically converted to cents
  • For 3D Secure payments, the customer needs to complete authentication
  • client_secret is used on the frontend to confirm the payment
  • Manual capture allows authorizing first and capturing later
  • StripeGetPaymentIntents - Get and search existing Payment Intents
  • StripeCreateRefund - Create refunds for completed payments
  • StripeGetCustomers - Get payment customer data
  • StripeCreateCustomer - Create the customer before charging