paymentServiceCardId, in every other API call.
This keeps card data off your servers and out of the commerce APIs, which reduces your PCI DSS scope. For background on how payments work in Kibo, see Payments: A Conceptual Guide.
How It Works
- The shopper enters card details in your checkout or account page.
- The shopper’s browser sends the details directly to the PCI payments host.
- The payment service returns a card
idand a masked card number,numberPart. - Your storefront sends the
idaspaymentServiceCardId, withnumberPart, to the commerce APIs:- to save the card to a customer account, or
- to pay for a checkout or order.
The PCI Payments Host
Card requests go to the PCI payments host, not to your tenant host. This is the same host you set aspciHost in the TypeScript SDK or as KIBO_PCI_HOST in the Nuxt.js storefront.
For example, a sandbox tenant at https://t1000000.sb.usc1.gcp.kibocommerce.com uses the PCI payments host https://payments-sb.usc1.gcp.kibocommerce.com. If you do not know the PCI payments host for your environment, contact Kibo Support.
The card endpoints are:
Send your tenant ID in the
x-vol-tenant header and your site ID in the x-vol-site header. These requests do not take an access token, so the shopper’s browser can call them without your application credentials.
Create a Card
Send the card details in the request body.
For
VISA, MC, AMEX, DISCOVER, and JCB cards, the payment service checks the card number and expiration date before it stores the card. An invalid card returns an error.
A successful request returns 200 OK:
Keep both
id and numberPart. The commerce APIs need both to identify the card, and the payment service needs numberPart when it authorizes a payment.
Save the Card to a Customer Account
To let a shopper reuse the card, add it to their account with Add Account Card (POST /api/commerce/customer/accounts/{accountId}/cards). Set the card id to the paymentServiceCardId.
contactId is the ID of the billing contact on the customer account. For a full example, see Add a Saved Credit Card in the Customer API developer guide.
Pay with the Card
To pay for a checkout or an order, create a payment action with aCreatePayment action name. Use Create Payment Action for a checkout or Create Payment Action for an order. Put the card in newBillingInfo.card:
cardNumberPartOrMask to the numberPart value from the create response. For a card saved on the customer account, use the account card’s id and cardNumberPart. For every field in billingInfo, see Payment Types API Reference.
Update a Card
To change a stored card, such as a new expiration date, sendPUT to the card’s ID with the fields you want to change. Fields you leave out keep their current values. Always include cardNumber: to keep the stored number, send the masked numberPart from the create response.
id does not change.
If the card is saved to a customer account, also update the account card with Update Account Card so the account shows the same details.
Delete a Card
To remove a card from the payment service, sendDELETE to the card’s ID. A successful request returns 204 No Content.
Related Guides
- Payment Types API Reference: the
BillingInfoobject for each payment type. - Payment Actions: authorizing, capturing, voiding, and crediting payments.
- Customer API Developer Guide: customer accounts, contacts, and saved cards.
- Payments: A Conceptual Guide: how the payment subsystem works.

