1. Payments
Documentation
  • Back to home
  • StripeKit
  • Installation
  • Getting Started
  • Choosing a Mode
  • Type Reference
  • Setup
    • Configuration
    • Timezones
    • Storage Adapter
    • Money and Currency
    • Error Handling
  • Stripe
    • Elements
  • Modules
    • Overview
    • Customers
      • Overview
      • List
      • Retrieve
      • Find or Create by Email
      • Create
      • Update
      • Sync
      • Delete
    • Payment Methods
      • Overview
      • Create Setup Intent
      • List
      • Attach
      • Detach
      • Set Default
      • Sync
    • Payments
      • Overview
      • Pay With Saved Method
      • Create
      • Retrieve
      • Confirm
      • Cancel
      • Sync
    • Checkout
      • Overview
      • Get
      • Create
      • Submit Fields
      • Apply Coupon
      • Mark Complete
    • Subscriptions
      • Overview
      • Create
      • Retrieve
      • Cancel
      • Resume
      • Toggle Collection Method
      • Update Fields
      • Apply Promotion Code
      • List By Customer
      • Find By Metadata
      • Sync
    • Invoices
      • Overview
      • Retrieve
      • List By Customer
      • List By Subscription
      • Pay With Saved Method
      • Void
      • Finalize
      • Sync
    • Coupons
      • Overview
      • Create
      • Validate
      • Apply To Subscription
      • List
      • Deactivate
    • Webhooks
      • Overview
      • Process
      • Events Reference
    • Sync
      • Overview
  1. Payments

Confirm

$kit->payments->confirm()#

Confirms a PaymentIntent server-side. Mostly useful for payment methods that don't require any customer interaction on the frontend at all.

Signature#

Example request#

Example response#

Same KitPaymentRecord shape as retrieve(), with status reflecting the outcome of confirmation, for example 'succeeded' or 'requires_action'.

Errors#

ExceptionWhen
StripeOperationErrorThe PaymentIntent cannot be confirmed, for example the card was declined, or it was already confirmed.

Notes#

If the payment method requires additional authentication (3D Secure), status comes back as requires_action and you still need to complete that step on the frontend using the PaymentIntent's clientSecret, which this method does not return, call retrieve() if you need it.
The result is persisted via savePayment() when a storage adapter is configured.
Most Elements-based flows should let Stripe.js confirm the PaymentIntent directly in the browser instead of calling this method from the server. Use this for genuinely server-driven confirmations, such as saved-method charges you're not routing through payWithSavedMethod() for some reason.
Previous
Retrieve
Next
Cancel
Built with