Alternative Payment Methods (Non-Credit Card) Tests - Extensions

Alternative Payment Methods (Non-Credit Card) Tests

Non Credit Card orders include any alternative payment methods that can be used to pay partially or fully for an order including:

Below is an outline of recommended testing and mapping for each of the payment methods.

Gift Card Orders Gift Card Orders

Gift Card Mapping Gift Card Mapping

In order for our servers to correctly identify gift card orders, please send gift card as a payment instrument detail in the request. There should be a dedicated giftCard object payment array in the validation API documentation. The request should look something like:

function ForterGiftCard(auth, gc) { // optional object for gift card purchases
    this.merchantPaymentId = gc.paymentTransaction.transactionID;
    this.value = {};
    this.value.currency = auth.currency_code;
    this.value.amountUSD = auth.amount.toString();
    this.value.amountLocalCurrency = auth.amount.toString();
}

Gift Card Testing Gift Card Testing

Store Credit Store Credit

Store Credit Mapping Store Credit Mapping

Store Credit orders use an object identical to the gift card object formatting, please send store credit as a payment instrument detail in the request. There should be a dedicated giftCard object payment array in the validation API documentation. The request should look something like:

function ForterStoreCredit(auth, sc) { // optional object for purchases made with store credit
    this.merchantPaymentId = sc.paymentTransaction.transactionID; // customized based on gateway
    this.value = {};
    this.value.currency = auth.currency_code; // customized based on gateway
    this.value.amountUSD = auth.amount.toString(); // customized based on gateway
    this.value.amountLocalCurrency = auth.amount.toString(); // customized based on gateway
}

Store Credit Testing Store Credit Testing

Loyalty Points Loyalty Points

Loyalty Points Mapping Loyalty Points Mapping

function ForterLoyalty(auth, loyalty) { // optional object for purchases made with loyalty points
    this.loyaltyPointsCount = sc.paymentTransaction.loyaltyValue; // customized based on gateway
    this.loyaltyPointsSource = account.pointsLocation; // optional
    this.merchantPaymentId = auth.loyaltyCode; // optional
}

Loyalty Points Testing Loyalty Points Testing

ApplePay ApplePay

ApplePay Mapping ApplePay Mapping

ApplePay orders leverage a tokenized card object. Please send ApplePay orders as a payment instrument detail in the request. There should be a dedicated applePay object within payment array in the validation API documentation. The request should look something like:

function ForterApplePay(auth, ap) {
    var processorResponseCode = "";
    var processorResponseText = "";
    // format the expiration month. from 1 to 01, etc.
    if (ap.creditCardExpirationMonth.toString().length == 1) {
        var creditCardExpMonth = "0" + cc.creditCardExpirationMonth.toString();
    } else {
        var creditCardExpMonth = cc.creditCardExpirationMonth.toString();
    }
    this.nameOnCard = ap.creditCardHolder;
    this.cardBrand = ap.creditCardType;
    this.token = ap.token;
    this.lastFourDigits = ap.creditCardNumberLastDigits; // optional
    this.expirationMonth = creditCardExpMonth;
    this.expirationYear = cc.creditCardExpirationYear.toString();
    this.verificationResults = {};
    this.verificationResults.avsFullResult = auth.avs.toString(); // optional
    this.verificationResults.cvvResult = auth.cvd_code.toString(); // optional
    this.verificationResults.authorizationCode = auth.authorization_num.toString();
    processorResponseCode = auth.exact_resp_code.toString();
    processorResponseText = auth.exact_message.toString();
    this.verificationResults.processorResponseCode = processorResponseCode;
    this.verificationResults.processorResponseText = processorResponseText;
}

ApplePay Testing ApplePay Testing

Digital Wallets (e.g. AmazonPay, MetaPay) Digital Wallets (e.g. AmazonPay, MetaPay)

Digital Wallet Mapping Digital Wallet Mapping

The Digital Wallet object includes any of the following payment methods:

These orders use a digitalWallet method. Please send any of the above payment methods in the digitalWallet object and use one of the dedicated enums listed in our Order v3 Documentation.

function ForterDigitalWallet(auth) {
    this.digitalWalletName = "AMAZONPAY"; // select "AMAZONPAY" enum
    this.underlyingPaymentMethod.underlyingPaymentMethodName = "CREDITCARD"; // select from relevant enum UNKNOWN, CREDITCARD, BANKTRANSFER, CASH, BITCOIN
    this.paymentSuccessStatus = "Completed"; // gateway auth response
    this.digitalWalletPayerEmail = "john_s@test.com"; // email associated with digital wallet
    this.fullDigitalWalletResponsePayload = {}; // full response payload from digital wallet gateway
}

Digital Wallet Testing Digital Wallet Testing

AfterPay AfterPay

AfterPay Mapping AfterPay Mapping

Like AmazonPay, AfterPay orders use an installmentService method object which is mostly freeform but should still be a dedicated object. Please send AfterPay payment data in the GeneralPayment object as a payment instrument detail in the request.

function ForterAffirm(auth) { // optional object for purchases made with Affirm
    this.name = "AfterPay Payment";
    this.payload = {}; // any additional raw response data
}

Affirm Testing Affirm Testing

Note that by default, AfterPay payments will show as General Payment method in the Detailed transaction view and Forter will not decision these transactions (i.e. return a not reviewed decision). AfterPay typically provides its own coverage and fraud detection for payments with this method. However, if you would like decisions on this payment method, please contact your onboarding analyst.

Affirm Affirm

Affirm Mapping Affirm Mapping

Affirm orders use a generalPayment method object which is mostly freeform but should still be a dedicated object. Please send Affirm in the GeneralPayment object as a payment instrument detail in the request.

function ForterAffirm(auth) { // optional object for purchases made with Affirm
    this.name = "Affirm Payment";
    this.payload = {}; // any additional raw response data
}

Affirm Testing Affirm Testing

Note that by default, Affirm payments will show as General Payment method in the Detailed transaction view and Forter will not decision these transactions (i.e. return a not reviewed decision). If you would like decisions on this payment method, please contact your onboarding analyst.

ShopRunner ShopRunner

Shoprunner Mapping Shoprunner Mapping

ShopRunner orders can leverage either the existing creditCard object or tokenizedCard object. Depending on the authorization data you have available, these should be mapped to either the tokenizedCard or creditCard payment instrument detail in the request. The below example request uses the tokenizedCard mapping:

function ShopRunner(auth, cc) {
    var processorResponseCode = "";
    var processorResponseText = "";
    // format the expiration month. from 1 to 01, etc.
    if (ap.creditCardExpirationMonth.toString().length == 1) {
        var creditCardExpMonth = "0" + cc.creditCardExpirationMonth.toString();
    } else {
        var creditCardExpMonth = cc.creditCardExpirationMonth.toString();
    }
    this.nameOnCard = cc.creditCardHolder;
    this.cardBrand = cc.creditCardType;
    this.token = cc.token;
    this.lastFourDigits = cc.creditCardNumberLastDigits;
    this.expirationMonth = cc.creditCardExpMonth;
    this.expirationYear = cc.creditCardExpirationYear.toString();
    this.verificationResults = {};
    this.verificationResults.avsFullResult = auth.avs.toString(); // optional
    this.verificationResults.cvvResult = auth.cvd_code.toString(); // optional
    this.verificationResults.authorizationCode = auth.authorization_num.toString();
    processorResponseCode = auth.exact_resp_code.toString();
    processorResponseText = auth.exact_message.toString();
    this.verificationResults.processorResponseCode = processorResponseCode;
    this.verificationResults.processorResponseText = processorResponseText;
    this.paymentGatewayData = {};
    this.paymentGatewayData.gatewayName = "FIRSTDATA_CREDIT"; // adjust based on your processor
    this.paymentGatewayData.gatewayTransactionId = auth.retrieval_ref_no.toString();
}