The addCreditCard
actor-chain is used to add a new credit card within a customer profile.
Parameter | Description |
---|---|
| The type of credit card to add. |
| The credit card number. |
| The month the credit card expires. |
| The year the credit card expires. |
| The ID of the billing address repository. |
| The first name of the customer associated with this billing address. |
| The middle name or initial of the customer associated with this billing address. |
| The last name of the customer associated with this billing address. |
| The first address field of the billing address. |
| The second address field of the billing address. |
| The city of the billing address. |
| The state or province of the billing address. |
| The postal code of the billing address. |
| The country of the billing address. |
| The phone number associated with this billing address. |
| Boolean value that sets the address as the default billing address. |
| Boolean value that sets the address as the default shipping address. |
| If this property is set to |
Add Credit Card to Customer Profile Example
curl -L -v -b agent_cookies.txt -H "Content-Type: application/json" -d "{ \"billingAddressRepositoryId\" : \"690024\", \"creditCardType\" : \"Visa\", \"creditCardNumber\" : \"4111111111111111\", \"expirationMonth\" : \"01\", \"expirationYear\" : \"2016\", \"firstName\" : \"Jack\", \"lastName\" : \"Dill\", \"address1\" : \"321 Willow Dr\", \"city\" : \"Beachside\", \"state\" : \"CA\", \"postalCode\" : \"99023\", \"phoneNumber\" : \"617-634-8687\", \"country\" : \"US\", \"createNewAddress\" : \"true\" }" "http://localhost:8280/rest/model/ atg/commerce/custsvc/repository/CreditCardActor/addCreditCard"
The server response may be similar to the following:
{"creditCardId" : "0012"}