Create

View as Markdown
Creates a payment method for an individual customer.

Authentication

x-api-keystring

Application API Scope — server-to-server, sent in the x-api-key header. See Authentication.

OR
authorizationstring

Storefront API Scope — client-side, scoped to one customer, sent as a signature in the authorization header. See Authentication.

Request

This endpoint expects an object.
customerstringRequired
Customer ID
cc_number_endingstringRequired
Last four digits of credit card number
token_idstringRequired
Token ID
cc_holderstringOptional
Credit card holder. Required depending on integration.
cc_exp_datestringOptional

Credit card expiration date (format: MM/YYYY or MM/YY). Required depending on integration.

billing_addressstringOptional
Billing address record ID
labelstringOptional
Payment label
cc_typeintegerOptional
Credit card type code
payment_methodstringOptional

Method of payment - “paypal”, “credit card”, “applepay”, or “googlepay”

Response

200
customerstringOptional
billing_addressstringOptional
cc_number_endingstring or nullOptional
public_idstringOptional
labelstring or nullOptional
token_idstringOptional
cc_holderstring or nullOptional
cc_typeintegerOptionalDefaults to 0
cc_exp_datestringOptional
payment_methodstringOptional
livebooleanOptionalDefaults to true
createdstringOptional
last_updatedstringOptional

Errors

400
Bad Request Error
403
Forbidden Error