Search…
Attaching a payment method to a cart or customer
Learn how to attach a payment method to a cart or customer.

Attaching a payment method to an order or cart

The following example shows how to attach a payment method to an order or cart.
POST /v1/shoppers/me/carts/active/apply-payment-method
1
{
2
"paymentMethod": {
3
"sourceId": "e7ba0595-059c-460c-bad8-2812123b9313"
4
}
5
}
Copied!

Attaching a payment method to a customer

The following example shows how to attach a payment option to a customer.
POST /v1/shoppers/me/payment-options
1
{
2
"paymentOption": {
3
"nickName": "My Visa Card",
4
"isDefault": "true",
5
"sourceId": "61033d62-c0f4-4a7e-b844-07daf26ba84e"
6
}
7
}
Copied!
Last modified 2mo ago