| POST | /fundingsources/creditcards |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CustomerId | body | string | Yes | The customer id the card is added to |
| CardholderName | body | string | No | The cardholder name |
| PaymentMethodToken | body | string | No | The payment method token if already vaulted |
| PaymentMethodNonce | body | string | No | The payment method nonce |
| IsDefault | body | bool | No | True to set the card as a default payment method. |
| RememberPaymentMethod | body | bool? | No | False to save credit card as disabled otherwise save as normal in Dynamics |
| RequestReference | body | RequestReference | No | Attribution values associated to the request if any |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CampaignId | form | string | No | |
| RetailChannelId | form | string | Yes | |
| ReferenceId | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CreditCardId | form | string | No | |
| CardToken | form | string | No | |
| Token | form | string | No | |
| CardholderName | form | string | No | |
| CardType | form | CreditCardType | No | |
| UniqueNumberIdentifier | form | string | No | |
| ExpirationMonth | form | string | No | |
| ExpirationYear | form | string | No | |
| Bin | form | string | No | |
| LastFour | form | string | No | The last 4 digits of the credit card number |
| IsDefault | form | bool | No | |
| Disabled | form | bool | No | |
| LastModified | form | DateTime | No |
| 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
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
}