commerce/customer/accounts/cards

Use the Cards subresource to manage stored credit cards for customer accounts. Kibo eCommerce stores limited card data in the Customer service for expedited ordering purposes; however, the complete card data is stored in the Payment service.

JSON Example

Card Properties

Property Description
cardNumberPart

type: string

The masked credit card number part returned from the payment gateway.

cardType

type: string

The type of credit card, such as Visa or Amex.

contactId

type: int

Unique identifier of the customer account contact associated with the credit card.

expireMonth

type: short

The two-digit month a credit card expires for a payment method.

expireYear

type: short

The four-digit year the credit card expires for a payment method.

id

type: string

Unique identifier of the source property, such as a catalog, discount, order, or email template.

For a product field it will be the name of the field.

For a category ID, must be a positive integer not greater than 2000000. By default, Kibo eCommerce auto-generates a category ID when categories are created. If you want to specify an ID during creation (which preserves category link relationships when migrating tenant data from one sandbox to another), you must also include the useProvidedId query string in the endpoint. For example, api/commerce/catalog/admin/categories/?useProvidedId=true. Then, use the id property to specify the desired category ID.

For a product attribute it will be the Attribute FQN.

For a document, the ID must be specified as a 32 character, case-insensitive, alphanumeric string. You can specify the ID as 32 sequential characters or as groups separated by dashes in the format 8-4-4-4-12. For example, bba0a1a885e2413bb097ceacf7bac366
or
bba0a1a8-85e2-413b-b097-ceacf7bac366.

For email templates, the ID must be one of the following values:
BackInStock
OrderChanged
OrderShipped
OrderFulfillmentDetailsChanged
ShopperLoginCreated
ShopperPasswordReset
ReturnCreated
ReturnAuthorized
ReturnUpdated
ReturnRejected
ReturnCancelled
ReturnClosed
RefundCreated
StoreCreditCreated
StoreCreditUpdated
GiftCardCreated

isDefaultPayMethod

type: bool

A boolean that signals whether this credit card is the default payment method for this customer account.

nameOnCard

type: string

The full name printed on a credit card. The name should match what is printed on the card exactly, used in validation during a payment.

Operations

Operation Name Request URI Description
AddAccountCard POST %7baccountId%7d%2fcards%3fresponseFields%3d%7bresponseFields%7d

Creates a new credit card record and stores it for the customer account.

DeleteAccountCard DELETE %7baccountId%7d%2fcards%2f%7bcardId%7d

Removes a stored credit card from a customer account.

GetAccountCard GET %7baccountId%7d%2fcards%2f%7bcardId%7d%3fresponseFields%3d%7bresponseFields%7d

Retrieves the details of a credit card stored with a customer account billing contact.

GetAccountCards GET %7baccountId%7d%2fcards%3fresponseFields%3d%7bresponseFields%7d

Retrieves all stored credit cards for the customer account.

UpdateAccountCard PUT %7baccountId%7d%2fcards%2f%7bcardId%7d%3fresponseFields%3d%7bresponseFields%7d

Update one or more properties of a credit card defined for a customer account.