Setup intents
The setup_intent object
A setup intent saves a payment method for a customer without charging it. Create one, send the customer to the returned link, and the payment method is saved when they finish. A setup intent can be retrieved for 30 days after it is created.
Attributes
idstringRequiredUnique identifier for the object.
objectstringRequiredString naming the object's type.
livemodebooleanRequiredtruewhen the setup intent was created in live mode,falsein test mode.createdtimestampRequiredTime the object was created, in Unix seconds.
customer_idstringRequiredID of the customer the payment method is saved for.
providerstringRequiredPayment provider that will store the payment method, such as
stripe.metadataobjectRequiredKey-value pairs you sent when creating the setup intent. Keys the payment provider added while starting the setup are left out.
next_actionarray of objectsSteps the customer must complete to finish the setup, such as a redirect; omitted when there are none.
Show child attributes
next_action.typestringRequiredThe kind of step. It decides which of
url,client_secret,payment_method,qr_dataandqr_image_urlare set.redirectSend the payer to
urlto finish the payment.share_linkSend the hosted payment link in
urlto the customer so they can complete authentication themselves.confirm_inlineShow the card form in your page and confirm the payment with
client_secret.show_qrShow
qr_dataas a QR code, or the image atqr_image_url, for the payer to scan.qrShow
qr_dataas a QR code for the payer to scan.otpAsk the payer for the one-time password their bank sent and submit it to confirm the payment.
next_action.titlestringRequiredShort heading for the step, in English, suitable to show the payer.
next_action.descriptionstringRequiredOne-sentence explanation of the step, in English, suitable to show the payer.
next_action.urlstringFor
redirect, the page to send the payer to: a 3-D Secure page, a wallet's approval page or a banking app link. Forshare_link, a hosted payment page you can send to the customer; the link is valid for 24 hours. Omitted for other types.next_action.client_secretstringFor
confirm_inline, the provider's client secret the card form uses to confirm or authenticate the payment. Forotp, the provider's reference of the payment that the one-time password confirms. Omitted for other types.next_action.payment_methodstringFor
confirm_inlineafter a payment was refused off-session, the provider's payment method to authenticate. Forshow_qr, the QR payment method the code is for, such asalipay,wechat_payorqr_cross_border. Omitted otherwise.next_action.qr_datastringFor
show_qrandqr, the raw QR payload to render as a QR code for the payer to scan. Omitted for other types.next_action.qr_image_urlstringFor
show_qr, a link to the provider's image of the QR code, for when the provider sends no raw payload (such as an Omise PromptPay charge): show the image for the payer to scan. Omitted when the provider sends none.next_action.cryptoobjectNullableShow child attributes
next_action.crypto.networkstringRequirednext_action.crypto.chain_idstringRequirednext_action.crypto.testnetbooleanRequirednext_action.crypto.deposit_addressstringRequirednext_action.crypto.token_currencystringRequirednext_action.crypto.token_contract_addressstringRequirednext_action.crypto.token_amountstringRequirednext_action.crypto.token_unitsintegerRequirednext_action.crypto.token_decimalsintegerRequirednext_action.crypto.exchange_ratestringnext_action.crypto.explorer_urlstringnext_action.crypto.expires_attimestampRequiredUnix timestamp in seconds.
countrystringRequiredTwo-letter code of the country the setup intent was created in.
statusenumRequiredrequires_payment_methoduntil the payer saves a method on the page innext_action, thensucceeded.requires_payment_methodThe payer has not saved a payment method yet.
succeededThe payment method is saved and can be charged.
payment_methodstringRequiredNullableID of the payment method the setup intent saved; null until it succeeds.