XM

Update Billing

Path:

PATCH /api-cart/cart/{cartID}/bill-to/{bill-toID}

Through this endpoint, your customer can easily update their billing details, by passing the cartId and billToId as path parameters.

Headers

x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox" }

x-api-key : d41d8cd98f00b204e9800998ecf8427e

Consumes

  • application/json

Produces

  • application/json

Parameters

Type: path

Name: cartId and Bill-to ID

Required: true

Type: body

Name: body

Required: true

Sample Request

Path:

https://{baseurl}/api-cart/cart/5e99d75cfcef0314e06b64b8/bill-to/5e99dba9fcef0314e06b64fd

Body:

{
"paymentMethod":"Mastercard",
"cardIdentifier":"4242",
"amount":50,
"address": {
"phone": {
"number": "123-992-9404",
"kind": "Mobile"
},
"address1":"10400 NE 4th St ",
"city":"Bellevue",
"state":"WA",
"country": "United States",
"zipCode":"98004",
"kind":"shipping",
"name":{
"first":"John",
"last":"Doe"
},
"email": "[email protected]"
}
}

Response Code: 200

Message: OK

Description: You will see this message when the billing details are successfully updated.

Sample

{
"_id": "5e99dba9fcef0314e06b64fd",
"address": {
"phone": {
"number": "123-992-9404",
"kind": "Mobile"
},
"address1": "10400 NE 4th St ",
"city": "Bellevue",
"state": "WA",
"country": "United States",
"zipCode": "98004",
"kind": "shipping",
"name": {
"first": "John",
"last": "Doe"
},
"email": "[email protected]"
},
"paymentMethod": "Mastercard",
"cardIdentifier": "4242",
"amount": 50,
"billToId": 13,
"cart": "5e99d75cfcef0314e06b64b8",
"createdAt": "2020-04-17T16:39:05.641Z",
"updatedAt": "2020-04-17T16:43:03.893Z",
"__v": 0
}

Changelog

  • July-2020 last updated