“On session” is when the customer pays on your app/website, while “off session” is when the payment is initiated automatically or by the merchant. This terminology is specific to Stripe to try and represent how the payment attempt was created and better understand what actions can or can’t happen during the payment process.
When a payment is made “on session”, the customer is present on your website or mobile application and is trying to pay you. If the payment fails, they can try again with a different payment method. If the payment requires an additional action (going through 3D Secure, being redirected to a partner like Klarna, etc.) they can go through those steps immediately to complete the payment.
By default, payments in our API are “on session”. You do not have to pass any specific parameter to indicate this, but if you want to be explicit you can pass the off_session
parameter set as false
(which is the default) when confirming the PaymentIntent.
When a payment is made “off session”, the customer is not present on your website or application to confirm the payment. Here are some examples of “off session” payments:
If any action is needed after the confirmation of an “off session” payment, you would need to get the customer back “on session” to go through with the next action.
For an “off session” payment, you need to pass the off_session
parameter set as true
when confirming the PaymentIntent. For Billing-related renewal payments, this is set automatically for you.
Why does it matter to indicate when a payment is off session?
For an "off session" payment, the customer is not present to confirm that payment. With card payments for example, it means they can not go through 3D Secure. Similarly, the customer couldn’t go through a captcha, or do any extra verification or manual action we need from them.
By indicating that the payment you’re initiating is "off session", you allow Stripe to either skip some of those steps, or claim an exemption with the partner (card networks, BNPL, etc.). For example, Stripe can claim an exemption for card transactions by flagging the transaction as:
Note that setting off_session: true
might cause us to mark the transaction as recurring with the card network.