Setup intents are part of Accept, which is in early access and subject to change. To request
Accept access, contact hi@natural.com.
mdt_*) that you charge or hold under while the payer is away.
Create a setup intent
Create a setup intent with the mandate’s terms interms:
description: what you charge for, shown to the payer. For example, “Damage deposit for your stay”.amountTypeandamount:fixedcharges exactlyamount;variablecharges up toamount, in cents.usage:singleUseallows one paid charge.multiUseallows any number of charges, each withinamount, untilvalidUntil. AsingleUsemandate refuses a new hold or charge while one is open.validUntil: when the mandate ends.
expiresAt on the setup intent itself is when the link closes. It defaults to validUntil and can’t be later.
Send the payer to setupUrl, or pass clientSecret to natural.js to show the form on your page. The payer types a card and accepts the terms, and verifies their phone only if they keep Save my information on. Natural verifies the card with a zero-amount check. The setup intent doesn’t return the terms. Once it completes, get the mandate to read them.
A setup intent takes a Visa or Mastercard that the payer types in. It doesn’t take other networks such as Amex, saved cards, Apple Pay or Google Pay.
Statuses
open: waiting for the payer, and again after a card fails.completed: the card is saved and the mandate is active.relationships.mandatelinks the mandate. If the bank later says the card is dead, the mandate staysactivebut its charges fail.declined: five cards failed on the link, because the bank declined them or they aren’t a Visa or Mastercard. It saves no more.canceled: you canceled it.expired:expiresAtpassed while it was open.
Permissions
paymentIntents.create lets you create, get and cancel setup intents. To get its mandate, grant mandates.read.
Events
setupIntent.completed fires when the payer saves a card, along with mandate.created for its mandate. setupIntent.canceled fires when you cancel it. No event fires when a setup intent is declined or expires.