Create a payment method setup
Starts adding a new card to a customer. Without processor, it returns requiresPaymentMethod and the useProcessorSdk details the browser needs to collect and confirm the card. With processor, Paid confirms the card the browser already collected: the setup comes back succeeded with its paymentMethod, requiresAction with a nextAction for 3-D Secure, or failed with lastError.
Authentication
Headers
This endpoint is in the payments=v1 beta. Send this header to use it.
Request
The customer to add the card to: its cus_ ID, your externalId, or one of its aliases.
String key-value pairs of your own, up to 500 characters per value. Always updatable.
Send it to confirm a card collected with the processor’s SDK in one call. Leave it out to start the setup first: it returns useProcessorSdk with what the browser needs to collect and confirm the card.
Where the buyer comes back to if a card’s 3-D Secure step redirects. Optional: without it, 3-D Secure runs in the page through nextAction.useProcessorSdk.
What to collect. Defaults to card. A usBankAccount is linked in the processor’s form, instantly or by two microdeposits, and needs the account to accept ACH debits (payment_method_type_not_enabled otherwise).
Response
The type of object. Always paymentMethodSetup.
The customer the card is being added to, always as its cus_ ID.
Set when status is failed.
true for an object on a live account, false on a test account.
String key-value pairs of your own, up to 500 characters per value. Always updatable.
Set while status is requiresPaymentMethod or requiresAction, otherwise null.
The pm_ payment method, set as soon as the setup succeeds: in that response when Paid confirmed it, otherwise by the paymentMethodSetup.succeeded event.
requiresPaymentMethod: waiting for the card form. requiresAction: waiting for the buyer (3-D Secure). processing: the card network is still answering; it settles on its own, usually within seconds, and can’t be canceled. succeeded, failed and canceled are final. Expect new values.
What the setup collects: a card, or a usBankAccount the buyer links through the processor and authorises Paid to debit. Expect new values.