Overview
API calls defined in the initiate request can specify replacements. A replacement defines a source and a destination for collected PII or credit card data. The source can be a previous API call or "internal" data fields collected during checkout. The destination describes where the data will be injected into the API call body.
Replacement Examples
Example of a XML and JSON API call replacement. XML uses xpath field selectors while JSON uses dot notation.
{
"source": "CREDIT_CARD",
"sourceField": "number",
"sourceType": "INTERNAL",
"sourceKey": "",
"destinationField": "CreditCardPaymentDetails.CardNumber",
"destinationType": "JSON",
"destinationKey": "",
"operation": "REPLACE"
}
API Call Sources
In some cases API calls will need data from a previous API call. This data can be described in a replacement by using the call name as the source. An example of this is when the payment is done after the reservation is made and needs to reference the reservation id from the previous call.
{
"source": "ReservationAPICall",
"sourceField": "ReservationID",
"sourceType": "JSON",
"sourceKey": "",
"destinationField": "ReservationID",
"destinationType": "JSON",
"destinationKey": "",
"operation": "REPLACE"
}
Internal Replacement Sources
Data colleced during checkout is available for replacements on any API call. All replacements using an internal source should specify sourceType: INTERNAL
CREDIT_CARD
Credit card data collected: source: "CREDIT_CARD"
| sourceField | Description | Notes |
|---|---|---|
| name | Name on card | |
| number | The credit card number | |
| expDateCompact | Expiration in MMYY | |
| expDate | Expiration in MM/YY | |
| expDate2 | Expiration in MM-YYYY | |
| expDate3 | Expiration in YYYY-MM-LASTDAY (2024-02-29) | IQWare |
| expDate4 | Expiration in MM/YYYY | HAXML |
| expMonth | Expiration Month MM | |
| expYear | Expiration Year YYYY | |
| cvv | Card Verification Value | |
| lastFour | Last 4 digits of the credit card number | |
| cardType | User defined card type enum | |
| cardType1 | Visa, Mastercard, Discover, American Express | LiveRez |
| cardType2 | VISA, MC, DISC, AMEX, JCB | LDResCore |
| cardType3 | 1, 2, 4, 3 | Streamline |
| cardType4 | VI, MC, DS, AX, JC | Escapia |
| cardType5 | 2, 3, 4, 1 | VRM |
| cardType6 | Visa, Mastercard, Discover, Amex | VRM |
| cardType7 | 1, 2, 3, 4 | Barefoot |
| cardType8 | Visa, MasterCard, Discover, | RTR |
ACH
Credit card data collected: source: "ACH"
| sourceField | Description |
|---|---|
| type | "checking" or "savings" |
| type2 | "Checking" or "Savings" |
| type3 | VRM checking = 2, savings = 3 |
| type4 | Track personal-checking, personal-savings |
| account | Checking or savings account number |
| routing | Routing number |
APTEXX
Tokenization data: source: "APTEXX"
Using a replacement that has APTEXX as the source will enable APTEXX tokenization and expose the following replacements.
The tokenization is actually a set of 3 calls, createAccountPerson, createVaultSession, and finally createCardMethod.
GDE is in possession of a single API key and targetId for authenticating to Aptexx's API. That is we can tokenize data for any of our partners using this one key and targetId.
| sourceField | Description |
|---|---|
| accountPersonId | Id from createAccountPerson |
| methodId | The tokenized credit card |
APTEXX_WALLET
When using payment type of WALLET these replacements are available: source: "APTEXX_WALLET"
| sourceField | Description |
|---|---|
| amount | Invoice total |
| grossAmount | Invoice total |
| methodId | WalletMethodId from initiateRequest |
| paypalOrderId | Value from successful PayPal session |
| paymentId | Result from createVisitorPayment |
| transactionId | Result from createVistiorPayment |
| digital_wallet_type | One of PAYPAL, APPLE_PAY_CREDIT |
BILLING_ADDRESS
Billing address information collected: source: "BILLING_ADDRESS"
| sourceField | Description |
|---|---|
| firstName | First Name |
| lastName | Last Name |
| address1 | Address Line One |
| address2 | Address Line Two |
| city | City |
| province | province |
| postalCode | Zip Code |
| country | Country |
GUEST_ADDRESS
Guest/Default address information collected: source: "GUEST_ADDRESS". Used in Google
checkouts where the primary guest address is collected on SPS.
| sourceField | Description |
|---|---|
| firstName | First Name |
| lastName | Last Name |
| fullName | First + " " + Last |
| Email Address | |
| phone | Phone Number |
| secondaryPhone | Secondary Phone Number |
| address1 | Address Line One |
| address2 | Address Line Two |
| city | City |
| province | province |
| postalCode | Zip Code |
| country | Country |
COMMENTS
Comments & special requests: source: "COMMENTS". Used in Google
checkouts where comments are collected on SPS.
| sourceField | Description |
|---|---|
| guestComments | Comments |
SECURITY
SEON related data. source: SECURITY
| sourceField | Description |
|---|---|
| clientIP | IP of the guest |
| seonSession | session fingerprint |
SPS
SPS session information: source: SPS
| sourceField | Description |
|---|---|
| token | The SPS session token from checkout request |
| paymentType | One of CC, ACH, MOR, WALLET |
CUSTOM_EVRN
Custom EVRN-specific replacements for token-based authentication: source: CUSTOM_EVRN
| sourceField | Description |
|---|---|
| tokenTime | Current Unix timestamp in milliseconds |
| tokenDigest | MD5 hash of tokenTime + secret for EVRN |