The process of checking that the credit card being used in a transaction contains sufficient funds to cover the amount of the transaction. Note that if sufficient funds are found, the amount is held for a given period of time, waiting to be withdrawn when settlement occurs (the period of time varies based on the issuing bank of the credit card).
API Url
Environment | Url | Method | Version |
---|---|---|---|
Production | https://api.payxpert.com/transaction/authorize/creditcard | POST | >= 0200 |
Authorize Request
Field | Type | Max Length | Requirement | Description | Version |
---|---|---|---|---|---|
customerIP | IP | 40 | M | Customer request IP | |
amount | N | 10 | M | Number in minor unit, e.g. cents; 100 dollar cent equals to 1 dollar | |
currency | C | 3 | M | ISO-4217 currency codes | |
orderID | S | 100 | M | Unique reference to current transaction request | |
Credit Card Payment fields | |||||
Field | Type | Max Length | Requirement | Description | Version |
cardNumber | S | 40 | M | Credit card number | |
cardSecurityCode | D | 4 | M | CVV number from credit card | |
cardHolderName | S | 80 | M | ||
cardExpireMonth | D | 2 | M | Month of the card expire: 09 | |
cardExpireYear | D | 4 | M | Year of the card expire ie: 2017 | |
Optional Shopper fields | |||||
Field | Type | Max Length | Requirement | Description | Version |
shopperName | S | 80 | M | Use ‘NA’ if unavailable | |
shopperAddress | S | 255 | M | Use ‘NA’ if unavailable | |
shopperZipcode | S | 10 | M | Use ‘NA’ if unavailable | |
shopperCity | S | 50 | M | Use ‘NA’ if unavailable | |
shopperState | C | 30 | M | ISO 3166-2 country subdivision codes if exist; 2 letters in USA, 3 letters in Australia, etc. Use ‘NA’ if unavailable | |
shopperCountryCode | C | 2 | M | ISO-3166-1 country codes. Use “ZZ” if the country is unknown | |
shopperPhone | S | 20 | M | Use ‘NA’ if unavailable | |
shopperEmail | E | 100 | M | Use ‘NA’ if unavailable | |
shopperBirthDate | S | 8 | O | Use format YYYYMMDD | >= 0206 |
shopperIDNumber | S | 32 | O | Customers document (passport number, ID number,taxpayer ID,… ) | >= 0206 |
Optional AVS fields | |||||
Field | Type | Max Length | Requirement | Description | Version |
AVSPolicy | AN | 20 | O | AVS and FS policy | |
FSPolicy | AN | 20 | O | AVS and FS policy | |
Optional e-commerce fields | |||||
Field | Type | Max Length | Requirement | Description | Version |
orderAmount | N | 10 | O | Number in minor unit, e.g. cents; 100 dollar cent equals to 1 dollar | |
productID | S | 32 | O | Unique ID of the ordered product (separate multiple IDs by commas). | |
comment | S | 255 | O | Merchant comments | |
shipToName | S | 80 | R | Name of shipping address | |
shipToAddress | S | 255 | R | Address of shipping address | |
shipToZipcode | S | 10 | R | Zip code of shipping address | |
shipToCity | S | 50 | R | City of shipping address | |
shipToState | C | 30 | R | ISO 3166-2 country subdivision codes if exist; 2 letters in USA, 3 letters in Australia, etc | |
shipToCountryCode | C | 2 | R | ISO-3166-1 country codes. | |
shipToPhone | S | 20 | R | Phone of shipping address | |
orderDescription | S | 500 | R | Order description | |
Optional 3D secure fields | |||||
Field | Type | Max Length | Requirement | Description | Version |
PaRes | S | 8192 | R | PaRes returned from 3D secure authentication, will take precedence on individual fields below. | >= 0207 |
ECI | D | 4 | R | Electronic Commerce Indicator returned from 3D secure authentication (Only to be used by special agreement) | |
XID | S | 28 | R | Xid returned from 3D secure authentication (Only to be used by special agreement) | |
CAVV | S | 40 | R | Cavv returned from 3D secure authentication (Only to be used by special agreement) | |
CAVVAlgorithm | S | 32 | O | CAVVAlgorithm returned from 3D secure authentication (Only to be used by special agreement) | |
Optional automated subscription fields | |||||
Field | Type | Max Length | Requirement | Description | Version |
offerID | N | 16 | O | Predefined price point with initial and rebill period | |
Optional manual subscription fields | |||||
Field | Type | Max Length | Requirement | Description | Version |
subscriptionType | C | 32 | R (see below) | can be normal, infinite, onetime or lifetime. (Only to be used by special agreement) | |
rebillAmount | N | 10 | R (see below) | Number in minor unit, e.g. cents; 100 dollar cent equals to 1 dollar. Amount to be rebilled after the initial period. (Only to be used by special agreement) | |
rebillPeriod | AN | 10 | R (see below) | Frequency of the iterations in ISO 8601 duration format. (Only to be used by special agreement) | |
rebillMaxIteration | N | 2 | R (see below) | Number of re-billing transaction that will be settled. Use 0 for unlimited rebill. (Only to be used by special agreement) | |
trialPeriod | AN | 10 | R (see below) | Duration of the trial period (if any) in ISO 8601 duration format. (Only to be used by special agreement) | |
Optional affiliate fields | |||||
Field | Type | Max Length | Requirement | Description | Version |
affiliateID | D | 16 | R | This is the affiliate id from your affiliate program. This variable help you and the Risk Management team to manage the transactions coming from your affiliates. | |
campaignName | S | 128 | O | Affiliate campaign name | |
Optional fraud fields | |||||
Field | Type | Max Length | Requirement | Description | Version |
threatmetrixSession | S | 100 | R | Threatmetrix session id generated on the payment page |
Subscription fields requirements
When using on the fly subscriptions (with prior agreement and activation), the subscription related fields requirements is depending of the subscription type.
The following table summarizes the composition of each subscription types.
Type of subscription | ||||
---|---|---|---|---|
normal | infinite | onetime | lifetime | |
subscriptionType | Set | Set | Set | Set |
rebillAmount | Set | Set | Set | Set |
rebillPeriod | Set | Set | Set | Not set |
rebillMaxIteration | Set | Not set | Not set | Not set |
trialPeriod | Optional | Optional | Not set | Not set |
Authorize Response
Field | Type | Max Length | Requirement | Description | Version |
---|---|---|---|---|---|
transactionID | N | 20 | M | Transaction reference returned by the system | |
errorCode | D | 3 | M | See Messages and error codes | |
errorMessage | S | 100 | M | See Messages and error codes | |
statementDescriptor | S | 50 | O | ie: onlinemerchant.com | |
paymentMeanInfo | O | N/A | C | Details of the payment mean. | |
Optional AVS fields | |||||
AVSResult | S | 20 | O | See Address Verification System (AVS) policy result codes | |
FSResult | S | 20 | O | See Fraud Screening (FS) policy result codes | |
FSStatus | S | 20 | O | See Fraud Screening (FS) policy result codes |
PHP Gateway Client
Transaction name : CCAuthorize
PHP Methods
Method name | Requirement |
---|---|
setTransactionInformation | M |
setCardInformation | M |
setShopperInformation | M |
setAVSPolicy | O |
setOrder | O |
setShippingAddress | O |
set3DSecure | O |
setAffiliate | O |
PHP Example
<?php
$client = new GatewayClient();
$transaction = $client->newTransaction('CCAuthorize', 'testMerchant', 'testPassword');
$transaction->setTransactionInformation(200, 'USD', 'order1456', '10.10.254.10');
$transaction->setCardInformation('4111111111111111', '000', 'John Smith', '10', '2014');
$transaction->setShopperInformation('John Smith', '334 Some Drive', '90001', 'Los Angeles', 'CA', 'US', '+1 213-XXX-XXXX', 'test@mail.com');
$response = $transaction->send();
if ('000' === $response->errorCode) {
$transactionID = $response->transactionID;
} else {
echo "Error {$response->errorCode} with message {$response->errorMessage}";
}
?>
Java Gateway Client
Java Methods
Connector method | doCCAuthorizeTransaction |
---|---|
Request class | CCAuthorizeRequest |
Response class | CCAuthorizeResponse |
Java Examples
PaymentGatewayConnector connector = new PaymentGatewayConnector(API_URL, ORIGINATOR, PASSWORD);
CCAuthorizeResponse response = null;
CCAuthorizeRequest request = new CCAuthorizeRequest();
request.setOrderId("order1456");
request.setCustomerIP("10.10.254.10");
request.setAmount(2000).setCurrency("USD");
request.setShopperName("John Smith").setShopperAddress("334 Some Drive");
request.setShopperZipcode("90001").setShopperCity("Los Angeles").setShopperState("CA").setShopperCountryCode("US");
request.setShopperPhone("+1 213-XXX-XXXX");
request.setShopperEmail("test@mail.com");
request.setCardNumber("4111111111111111").setCardSecurityCode("000");
request.setCardExpireMonth("10").setCardExpireYear("2014");
request.setCardHolderName("John Smith");
try {
response = connector.doCCAuthorizeTransaction(request);
} catch (Exception e) {
e.printStackTrace();
}
if (response != null) {
if (TransactionResultCode.TRANSACTION_SUCCESSFULLY.equals(response.getErrorCode()) {
System.out.println("Success: " + response.getErrorMessage());
} else {
System.out.println("Failure: " + response.getErrorMessage());
}
}