PUT v1/Customers/Payment/Token
URI template
v1/Customers/Payment/TokenRequest Information
URI Parameters
None.
Body Parameters
The token Id we are saving
CustomerCreditCardTokenHeaderName | Description | Type | Additional information |
---|---|---|---|
CustomerId |
CustomerId, not empty, customer has to exist |
globally unique identifier |
Required |
ProviderType |
Payment Provider Type. 2 - ConnectedPayments; 4 - CreditCall; 6 - FreedomPay |
PaymentProviderType |
Required |
MaskedCardNumber |
MaskedCardNumber, not empty, 123456******1234 for ConnectedPayments (Mask can be *, x, X, ●, other characters will be ignored) |
string |
Required |
ExpirationDate |
Expiration Date, not empty, MM/YY and yyyy-MM-dd are supported. (Currently MM/YY is supported only for this call) |
string |
Required |
CardToken |
CardToken/AccountNumber, not empty, for Connected Payments, TokenType:TokenValue format is required (example 201:1234567890123456) |
string |
Required |
CardType |
CardType, 0 - American Express; 3 - Discover; 5 - JCB; 6 - Master Card; 7 - Visa |
CustomerPaymentMethodType |
Required |
CardHolderName |
CardHolderName, required for FreedomPay |
string |
None. |
Request Formats
application/json, text/json
{ "CustomerId": "82c6fdcb-534f-415a-9e28-87be989e461f", "ProviderType": 2, "MaskedCardNumber": "123456xxxxxx7890", "ExpirationDate": "2017-12-01", "CardToken": "201:1234567890123456", "CardType": 6, "CardHolderName": null }
application/xml, text/xml
<CustomerCreditCardTokenHeader xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1"> <CardHolderName i:nil="true" /> <CardToken>201:1234567890123456</CardToken> <CardType>MasterCard</CardType> <CustomerId>82c6fdcb-534f-415a-9e28-87be989e461f</CustomerId> <ExpirationDate>2017-12-01</ExpirationDate> <MaskedCardNumber>123456xxxxxx7890</MaskedCardNumber> <ProviderType>ConnectedPayments</ProviderType> </CustomerCreditCardTokenHeader>
Response Information
Resource Description
Known internal error is BadRequest, InternalServerError
globally unique identifierResponse Formats
application/json, text/json
"6923580e-33f9-4ed9-a143-44750b0a238a"
application/xml, text/xml
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">6923580e-33f9-4ed9-a143-44750b0a238a</guid>