CreditCard2AccountAdd_API
Description |
Parameters |
|
---|---|---|
Passed |
Returned |
|
This method adds a credit card for a specific account. |
24 | 1 |
Syntax
Copy
ItemResult BM::CreditCard2AccountAdd_API(
Int CustomerID;
Str(40) CardHolderName;
Str(20) CardNumber;
Str(30) PaySystem;
Str(5) ExpDate;
Str(4) Cvv;
Str(5) StartDate
Str(4) IssueNumber
Str(100) Email;
Str(80) Address1;
Str(80) Address2;
Str(40) City;
Str(80) State;
Str(10) Zip;
Str(2) Country;
Str(4) PhCountryCode;
Str(10) PhAreaCode;
Str(20) PhNumber;
Str(10) PhExtention;
Str(4) FaxCountryCode;
Str(10) FaxAreaCode;
Str(20) FaxNumber;
Str(10) FaxExtention;
Int UseForAutoPayments.
)
returns
Copy
Int CardID- payment method ID.
Special Notes
Important: Sensitive data is passed to the method. To avoid logging of sensitive data, the CardNumber argument must be escaped as this described in the section Important: Avoid Sensitive Data Logging. Avoiding sensitive data is obligatory, otherwise sensitive data will be logged.
- Int CustomerID – customer account ID. Account must already exist in Billing;
- Str(40) CardHolderName – card holder name (as specified on the card);
- Str(20) CardNumber – credit card number (15 or 16 digits, no separators between them);
- Str(30) PaySystem – payment system name (Visa, Mastercard and the like). Payment system must be already set up in Billing;
- Str(5) ExpDate – credit card expiration date (MM/YY);
- Str(4) Cvv – credit card CVV code (3 or 4 digits depending on the card type);
- Str(5) StartDate – credit card start date. If it is not applicable, pass empty value;
- Str(4) IssueNumber – credit card issue number. It is required for some card types, for example, Solo and Switch. If it is not applicable, pass empty value;
- Str(100) Email – customer account e-mail address;
- Str(80) Address1 – customer account address (line 1/2);
- Str(80) Address2 – customer account address (line 2/2);
- Str(40) City – customer account address: city;
- Str(80) State – customer account address: state;
- Str(10) Zip – customer account address: zip code. It will be verified through country specific regular expression. You could modify regular expression under countries list in Billing control panel at System > Settings > Internationalization > Countries;
- Str(2) Country – two-letter country code, verified against countries list in Billing control panel at System > Settings > Internationalization > Countries;
- Str(4) PhCountryCode – customer account contact information: phone country code.
- Str(10) PhAreaCode – customer account contact information: phone area code.
- Str(20) PhNumber – customer account contact information: phone number.
- Str(10) PhExtention – customer account contact information: phone extension.
- Str(4) FaxCountryCode – customer account contact information: fax country code.
- Str(10) FaxAreaCode – customer account contact information: fax area code.
- Str(20) FaxNumber – customer account contact information: fax number.
- Str(10) FaxExtention – customer account contact information: fax extension.
- Int UseForAutoPayments – defines whether new credit card should be used for automatic payments. Available options are:
- 1 – mark new credit card as default payment method;
- 2 – do NOT mark new credit card as default payment method.