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 .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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: application/json
Content-Type: application/json
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: application/json
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-01T00:00:00.0000000"}