| POST | /payments/CreditCard/Verify | Performs 0 dollar verify of a credit card. | Validates the credit card type, expiration date and performs credit card address verification against the credit card networks. |
|---|
import 'package:servicestack/servicestack.dart';
class CreditCardVerifyReply implements IHaveErrorField, IConvertible
{
String? UniqueId;
int? ErrorCode;
String? ErrorMessage;
String? CardRef;
bool? IsError;
CreditCardVerifyReply({this.UniqueId,this.ErrorCode,this.ErrorMessage,this.CardRef,this.IsError});
CreditCardVerifyReply.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
UniqueId = json['UniqueId'];
ErrorCode = json['ErrorCode'];
ErrorMessage = json['ErrorMessage'];
CardRef = json['CardRef'];
IsError = json['IsError'];
return this;
}
Map<String, dynamic> toJson() => {
'UniqueId': UniqueId,
'ErrorCode': ErrorCode,
'ErrorMessage': ErrorMessage,
'CardRef': CardRef,
'IsError': IsError
};
getTypeName() => "CreditCardVerifyReply";
TypeContext? context = _ctx;
}
class SalesForceCreditCardVerify implements IConvertible
{
String? UniqueId;
int? ClientId;
String? GroupId;
String? UserId;
int? BhUserId;
String? Location;
String? CurrencyCode;
String? NameOnCard;
String? Address1;
String? Address2;
String? City;
String? State;
String? PostalCode;
bool? VerifyPostalCode;
String? Country;
String? CardType;
String? CardReferenceOrCardNumber;
int? ExpMonth;
int? ExpYear;
String? Cvv;
double? Amount;
String? ChapAndUser;
String? Description;
int? PayLinkID;
SalesForceCreditCardVerify({this.UniqueId,this.ClientId,this.GroupId,this.UserId,this.BhUserId,this.Location,this.CurrencyCode,this.NameOnCard,this.Address1,this.Address2,this.City,this.State,this.PostalCode,this.VerifyPostalCode,this.Country,this.CardType,this.CardReferenceOrCardNumber,this.ExpMonth,this.ExpYear,this.Cvv,this.Amount,this.ChapAndUser,this.Description,this.PayLinkID});
SalesForceCreditCardVerify.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
UniqueId = json['UniqueId'];
ClientId = json['ClientId'];
GroupId = json['GroupId'];
UserId = json['UserId'];
BhUserId = json['BhUserId'];
Location = json['Location'];
CurrencyCode = json['CurrencyCode'];
NameOnCard = json['NameOnCard'];
Address1 = json['Address1'];
Address2 = json['Address2'];
City = json['City'];
State = json['State'];
PostalCode = json['PostalCode'];
VerifyPostalCode = json['VerifyPostalCode'];
Country = json['Country'];
CardType = json['CardType'];
CardReferenceOrCardNumber = json['CardReferenceOrCardNumber'];
ExpMonth = json['ExpMonth'];
ExpYear = json['ExpYear'];
Cvv = json['Cvv'];
Amount = JsonConverters.toDouble(json['Amount']);
ChapAndUser = json['ChapAndUser'];
Description = json['Description'];
PayLinkID = json['PayLinkID'];
return this;
}
Map<String, dynamic> toJson() => {
'UniqueId': UniqueId,
'ClientId': ClientId,
'GroupId': GroupId,
'UserId': UserId,
'BhUserId': BhUserId,
'Location': Location,
'CurrencyCode': CurrencyCode,
'NameOnCard': NameOnCard,
'Address1': Address1,
'Address2': Address2,
'City': City,
'State': State,
'PostalCode': PostalCode,
'VerifyPostalCode': VerifyPostalCode,
'Country': Country,
'CardType': CardType,
'CardReferenceOrCardNumber': CardReferenceOrCardNumber,
'ExpMonth': ExpMonth,
'ExpYear': ExpYear,
'Cvv': Cvv,
'Amount': Amount,
'ChapAndUser': ChapAndUser,
'Description': Description,
'PayLinkID': PayLinkID
};
getTypeName() => "SalesForceCreditCardVerify";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'devapi.billhighway.com', types: <String, TypeInfo> {
'CreditCardVerifyReply': TypeInfo(TypeOf.Class, create:() => CreditCardVerifyReply()),
'SalesForceCreditCardVerify': TypeInfo(TypeOf.Class, create:() => SalesForceCreditCardVerify()),
});
Dart SalesForceCreditCardVerify DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /payments/CreditCard/Verify HTTP/1.1
Host: devapi.billhighway.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"UniqueId":"String","ClientId":0,"GroupId":"String","UserId":"String","BhUserId":0,"Location":"String","CurrencyCode":"String","NameOnCard":"String","Address1":"String","Address2":"String","City":"String","State":"String","PostalCode":"String","VerifyPostalCode":false,"Country":"String","CardType":"String","CardReferenceOrCardNumber":"String","ExpMonth":0,"ExpYear":0,"Cvv":"String","Amount":0,"ChapAndUser":"String","Description":"String","PayLinkID":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"UniqueId":"String","ErrorCode":0,"ErrorMessage":"String","CardRef":"String","IsError":false}