Skip to navigation

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

AuthorizationBearer
API Key authentication using Bearer token

Headers

Paid-BetaenumRequired

This endpoint is in the payments=v1 beta. Send this header to use it.

Allowed values:

Request

Body
customerstringRequired1-255 characters

The customer to add the card to: its cus_ ID, your externalId, or one of its aliases.

metadatamap from strings to stringsOptional

String key-value pairs of your own, up to 500 characters per value. Always updatable.

processorobjectOptional

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.

returnUrlstringOptionalformat: "uri"

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.

typeenumOptional

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).

Allowed values:

Response

201
idstring
The setup's ID.
objectenum

The type of object. Always paymentMethodSetup.

Allowed values:
createdAtdatetime
When the object was created.
customerstring1-255 characters

The customer the card is being added to, always as its cus_ ID.

lastErrorobject or null

Set when status is failed.

livemodeboolean

true for an object on a live account, false on a test account.

metadatamap from strings to strings

String key-value pairs of your own, up to 500 characters per value. Always updatable.

nextActionobject

Set while status is requiresPaymentMethod or requiresAction, otherwise null.

paymentMethodstring or null1-255 characters

The pm_ payment method, set as soon as the setup succeeds: in that response when Paid confirmed it, otherwise by the paymentMethodSetup.succeeded event.

processorobject
The setup at the processor.
returnUrlstring or nullformat: "uri"
Where the buyer comes back to after a redirect.
statusenum

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.

typeenum

What the setup collects: a card, or a usBankAccount the buyer links through the processor and authorises Paid to debit. Expect new values.

Allowed values:
updatedAtdatetime
When the object was last changed.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error