Rsl.Lotteries

<back to all web services

AddCreditCard

Add a credit card to a customer if not already added

The following routes are available for this service:
POST/fundingsources/creditcards
AddCreditCard Parameters:
NameParameterData TypeRequiredDescription
CustomerIdbodystringYesThe customer id the card is added to
CardholderNamebodystringNoThe cardholder name
PaymentMethodTokenbodystringNoThe payment method token if already vaulted
PaymentMethodNoncebodystringNoThe payment method nonce
IsDefaultbodyboolNoTrue to set the card as a default payment method.
RememberPaymentMethodbodybool?NoFalse to save credit card as disabled otherwise save as normal in Dynamics
RequestReferencebodyRequestReferenceNoAttribution values associated to the request if any
RequestReference Parameters:
NameParameterData TypeRequiredDescription
CampaignIdformstringNo
RetailChannelIdformstringYes
ReferenceIdformstringNo
CreditCard Parameters:
NameParameterData TypeRequiredDescription
CreditCardIdformstringNo
CardTokenformstringNo
TokenformstringNo
CardholderNameformstringNo
CardTypeformCreditCardTypeNo
UniqueNumberIdentifierformstringNo
ExpirationMonthformstringNo
ExpirationYearformstringNo
BinformstringNo
LastFourformstringNoThe last 4 digits of the credit card number
IsDefaultformboolNo
DisabledformboolNo
LastModifiedformDateTimeNo
CreditCardType Enum:
Unknown
AmericanExpress
CarteBlanche
ChinaUnionPay
DinersClub
Discover
JCB
Laser
Maestro
MasterCard
Solo
Switch
Visa

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /fundingsources/creditcards HTTP/1.1 
Host: azs-stg-lotteries-web.azurewebsites.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	customerId: String,
	cardholderName: String,
	paymentMethodToken: String,
	paymentMethodNonce: String,
	isDefault: False,
	rememberPaymentMethod: False,
	requestReference: 
	{
		campaignId: String,
		retailChannelId: String,
		referenceId: String
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	creditCardId: String,
	cardToken: String,
	token: String,
	cardholderName: String,
	cardType: Unknown,
	uniqueNumberIdentifier: String,
	expirationMonth: String,
	expirationYear: String,
	bin: String,
	lastFour: String,
	isDefault: False,
	disabled: False,
	lastModified: 0001-01-01
}