The addCreditCard actor-chain is used to add a new credit card within a customer profile.

Parameter

Description

creditCardType

The type of credit card to add.

creditCardNumber

The credit card number.

expirationMonth

The month the credit card expires.

expirationYear

The year the credit card expires.

billingAddressRepositoryId

The ID of the billing address repository.

firstName

The first name of the customer associated with this billing address.

middleName

The middle name or initial of the customer associated with this billing address.

lastName

The last name of the customer associated with this billing address.

address1

The first address field of the billing address.

address2

The second address field of the billing address.

city

The city of the billing address.

state

The state or province of the billing address.

postalCode

The postal code of the billing address.

country

The country of the billing address.

phoneNumber

The phone number associated with this billing address.

setBillingAddress

Boolean value that sets the address as the default billing address.

setShippingAddress

Boolean value that sets the address as the default shipping address.

defaultCreditCardSetDefault

If this property is set to true, this becomes the default credit card.

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"}

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices