Client Android SDK

Summary

This document describes how to integrate the One Inc’s PortalOne Android SDK into an existing Android application and invoke the make payment and/or save payment method. When these methods are invoked, a modal will open which will allow a user to make a payment or save a payment method based upon the provided parameters.

Requirements

Platform Compatibility

Android API >= 15

Installation

There are several ways to include Digital Payments Widgets into your project, but Gradle is the preferred build system for working with the One Inc’s PortalOne Android SDK.

Build systems

Gradle

In build.gradle file for your module, add the following:


    dependencies {
        implementation 'com.oneincsystems.digitalPayments:DigitalPayments.SDK:1.0.0'
    }

Get the digitalpayments.android.sdk.zip archive and extract this. You must specify the address of this folder in the build.gradle file for you project. For example:


    ...
        buildscript {
            repositories {
                maven {url ('file:\\\\$rootDir.parent\\digitalpayments.android.sdk')}
                google()
                jcenter()
            }
    ...

Prepare your API

Our prebuilt UI elements require a temporary key, a short-lived API key with restricted API access. You can think of an temporary key as a session, authorizing the SDK to retrieve and update a specific object for the duration of the session. To provide a temporary key to the SDK, you'll need to expose a new API endpoint on your backend. This endpoint should create a temporary key for the current One Inc customer, and return the key's unmodified response as JSON. This temporary key is called Session Key.

In order to create the Session Key you need a PortalOne authentication key. This key uniquely identifies you as a customer and it is your responsibility to keep your authentication key secure. To help encourage good security practices, client side requests which would expose the authentication key are not permitted and a server-side request to obtain the Session Key is required. If you do not have your PortalOne Authentication Key, please feel free to reach out to us and we can issue one.


[HttpGet]
[ResponseType(typeof(CreateSessionResponse))]
public async Task<HttpResponseMessage> Create()
{
    try
    {
        using (var httpClient = new HttpClient())
        {
            var request = new CreateSessionRequest
            {
                PortalOneAuthenticationKey = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
            };

            var uri = new Uri("https://stgportalone.processonepayments.com");
            var httpResponseMessage = await httpClient.PostAsJsonAsync(uri, request);
            if (httpResponseMessage.IsSuccessStatusCode)
            {
                var response = await httpResponseMessage.Content.ReadAsAsync<CreateSessionResponse>();
                var httpStatusCode = response.IsSuccessful
                    ? HttpStatusCode.OK
                    : HttpStatusCode.InternalServerError;
                return Request.CreateResponse(httpStatusCode, response);
            }

            return Request.CreateErrorResponse(httpResponseMessage.StatusCode,
                httpResponseMessage.ReasonPhrase);
        }
    }
    catch (Exception e)
    {
        return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, e.Message);
    }
}

Initialization

The setup of any of SDK actions is simply a call to init(sessionKey, baseUrl) static method with a Session key, which was generated with your Session Key API endpoint, and an url of PortalOne service API.


    MakePaymentActivity
    .init("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "https://stgportalone.processonepayments.com")
    ...

    

Digital Payment Forms API

Making a payment

In order to make payment need your code should start the MakePaymentActivity. The activity should be set with parameters of specific payment so the activity should be called as method calls chain MakePaymentActivity#init, MakePaymentActivity#makePayment and MakePaymentActivity#startWebView

In result of the method chain call the make payment process will be started.

MakePaymentActivity methods

Method Description
init See Initialization
makePayment Sets payment parameters. See MakePaymentRequest. Required
startWebView Starts the activity. The parameter is a parent activity. Required

If you're going to launch the MakePaymentActivity from a button, and you've set the button's onClick handler in XML via android:onClick="onMakePaymentClickBtn", add the method as:


        fun onMakePaymentClickBtn(v: View) {
        MakePaymentActivity
        .init("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "http://baseUrl")
        .makePayment(
            MakePaymentRequest(
                paymentCategory = PaymentCategory.ECheck,
                feeContext = FeeContext.PaymentWithFee,
                amountContext = AmountContext.SelectOrEnterAmount,
                minAmountDue = BigDecimal(50),
                accountBalance = BigDecimal(100),
                policyHolderName = "John Smith",
                clientReferenceData1 = "POL330701-02"
            ))
        .startWebView(this)
        }
        

        public void onClick(View view) {
        MakePaymentActivity
        .init("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "http://baseUrl")
        .makePayment(
            new MakePaymentRequest(
                paymentCategory = PaymentCategory.ECheck,
                feeContext = FeeContext.PaymentWithFee,
                amountContext = AmountContext.SelectOrEnterAmount,
                minAmountDue = new BigDecimal(50),
                accountBalance = new BigDecimal(100),
                policyHolderName = "John Smith",
                clientReferenceData1 = "POL330701-02"
            ))
        .startWebView(this)
        }
        

MakePaymentRequest data object

Here you can find a detailed explanation of every field in the MakePaymentRequest data object that is required to start the MakePaymentActivity.

Field Name Description Type Note
paymentCategory Indicates if the requested operation will be predefined as a credit card or bank account operation or if the user will be able to make a choice. PaymentCategory Required
feeContext Indicates whether a fee will be applied to the payment. FeeContext Required
amountContext Indicates if the user will be able to set the payment amount and if so, which options will be provided. AmountContext Optional
saveOption Indicates whether a requested operation will save the payment method that is used to make the payment. SaveOption Optional, if not sent default value will be DoNotSave.
confirmationDisplay Indicates whether the flow for the requested operation will display a final confirmation screen upon the completion of the primary operation. Boolean Optional, if not sent default will be true
minAmountDue The minimum amount that is due for a policy. Must be greater than zero. number Required
accountBalance The outstanding balance for the policy. number Required
billingZip Zip code associated with the credit card. The value will be pre-populated on the form if provided. string Optional. Card operations only
billingAddressStreet Billing address associated with the credit card. The value will be pre-populated on the form if provided. string Optional
policyHolderName Name that will be linked to the payment. The value will be pre-populated on the form if provided. Boolean Optional
accountGroupCode Indicates the account group/corresponding bank account where the transaction's funds will be allocated from the set of account groups configured in your merchant settings. If omitted, the default account group configured in your merchant settings will be used. string Optional
clientReferenceData1 A reference number that will be linked to a transaction. Usually this is a policy number or some other identifier that corresponds to a particular policy or claim number. The value will be searchable in the transaction search report. string Required
clientReferenceData2 An External TransactionId value. The value will be searchable in the transaction search report. string Optional
clientReferenceData3 Location data such as the office the transaction originated. The value will be searchable in the transaction search report. string Optional
clientReferenceData4 Additional information with the transaction. The value will be displayed in the transaction details. string Optional
clientReferenceData5 Source account information. Additional reference number such as an account number. The value will be searchable in the transaction search report. string Optional
token Token that identifies credit card or bank account. string Optional

Saving a payment method

To start a save payment method process we need to call a similar method chain.

The following example demonstrates how to start a save payment method activity:


    SavePaymentMethodActivity
    .init("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "http://baseUrl")
    .savePaymentMethod(
        SavePaymentMethodRequest(
            paymentCategory = PaymentCategory.CreditCard,
            policyHolderName = "John Smith",
            clientReferenceData1 = "POL330701-02"
        ))
    .startWebView(this)
    

    SavePaymentMethodActivity
    .init("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "http://baseUrl")
    .savePaymentMethod(
        new SavePaymentMethodRequest(
            paymentCategory = PaymentCategory.CreditCard,
            policyHolderName = "John Smith",
            clientReferenceData1 = "POL330701-02"
        ))
    .startWebView(this)
    

SavePaymentMethodRequest data object

Here you can find a detailed explanation of every field in the SavePaymentMethodRequest data object that is required to start the SavePaymentMethodActivity.

Field Name Description Type Note
paymentCategory Indicates if the requested operation will be predefined as a credit card or bank account operation or if the user will be able to make a choice. PaymentCategory Required
confirmationDisplay Indicates whether the flow for the requested operation will display a final confirmation screen upon the completion of the primary operation. Boolean Optional, if not sent default will be true
billingZip Zip code associated with the credit card. The value will be pre-populated on the form if provided. string Optional. Card operations only
billingAddressStreet Billing address associated with the credit card. The value will be pre-populated on the form if provided. string Optional
policyHolderName Name that will be linked to the payment. The value will be pre-populated on the form if provided. Boolean Optional
clientReferenceData1 A reference number that will be linked to a transaction. Usually this is a policy number or some other identifier that corresponds to a particular policy or claim number. The value will be searchable in the transaction search report. string Required
clientReferenceData2 An External TransactionId value. The value will be searchable in the transaction search report. string Optional
clientReferenceData3 Location data such as the office the transaction originated. The value will be searchable in the transaction search report. string Optional
clientReferenceData4 Additional information with the transaction. The value will be displayed in the transaction details. string Optional
clientReferenceData5 Source account information. Additional reference number such as an account number. The value will be searchable in the transaction search report. string Optional

Common Data Types

Payment Category Enum

PortalOne requires you to provide a payment category option which allows you to easily toggle from credit card to bank account operations. The payment category field is required for every operation. If this field is not included in the request, the PortalOne API will trigger an error event.

Option NameDescription
CreditCard

Specifies a Credit/Debit card operation

ECheck

Specifies a bank account operation

UserSelect

Allows the user to select the payment type. This value should not be used when charging percentage based fees.

Fee Context Enum

PortalOne allows you to make a payment with or without a fee. To determine if a fee will be charged, send the appropriate Fee Context. The Fee Context field is required for the make payment operation. If this field is not provided in the request, the PortalOne API will trigger an error event.

Option NameDescription
PaymentWithFee

Specifies that a fee will be added to the payment amount

PaymentWithoutFee

Specifies that the payment will be processed without any additional fee

Amount Context Enum

PortalOne allows you to control if the user can specify the payment amount or pay a fixed amount. To specify how the payment amount will be determined, send the appropriate Amount Context. The Amount Context is NOT required for every operation. If The AmountContext property is not included or value is null, the system will interpret as a value of SelectOrEnterAmount.

Option NameDescription
AmountDueOnly

Will set the payment amount to the value that is sent in the minAmountDue field. The payment amount will be display only

SelectAmount

Will allow the user to specify the payment amount by selecting either the payment amount from the values that are sent in the minAmountDue field or the accountBalance field

SelectOrEnterAmount

Will allow the user specify the payment amount by selecting one of the values sent in minAmountDue or accountBalance or entering a value in a text field. The entered amount must be greater than zero and less than or equal to the accountBalance

SelectOrEnterAmountConstrained

Will allow the user specify the payment amount by selecting either the minAmountDue or accountBalance amounts passed in the request or entering a value in a text field. The entered amount must be no less than the minAmountDue and no greater than the accountBalance passed in the request to open the modal

Save Option Enum

PortalOne allows you to specify if a payment method that is being used to make a payment will be saved or not. The Save Option is NOT required for every operation. If the SaveOption property is not included or value is null, the system will interpret as a value of DoNotSave. Applicable to Make payment operations only.

Option NameDescription
UserSelect

Specifies the user will be able to make a choice of whether or not to save the payment method that is used to make the payment

Save

Specifies the payment method that is used to make the payment will be securely saved and a token will be returned which can be used to make future payments

DoNotSave

Specifies the payment method that is used to make the payment will not be saved

Events

The PortalOne Android SDK provides custom events for most actions. You can add event handler functions using an appropriate activities method. The PortalOne library declares the following events:

Event handling on Kotlin and Java 8+

We use higher-order functions in order to register event handlers. So you can use lambda functions or give a handling method as a parameter.

Event handling on Java below 8

To set event handlers in Java lower versions you need to make special handler class implements the Runnable interface.

Close Event

Occurs when a dialog is closed.

Example:


    SavePaymentMethodActivity
        .init("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "http://baseUrl")
        .savePaymentMethod(saveRequest)
        .onClose { Log.i("onClose", "no data") }
        .startWebView(this)
    

    Runnable onCloseHandler = new Runnable() {
        @Override
        public void run() {
            Log.i("onClose", "no data");
        }
    };

    SavePaymentMethodActivity
        .init("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "http://baseUrl")
        .savePaymentMethod(saveRequest)
        .onClose(onCloseHandler)
        .startWebView(this)
        

Error Event

Occurs on errors.

Example:


    MakePaymentActivity
     .init("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "http://baseUrl")
     .makePayment(makePaymentRequest)
     .onError {  error -> Log.i("onError", error.description)  }
     .startWebView(this)
    

    // In the import section
    import com.digitalpayments.android.sdk.context.ErrorHandler;

    // Somewhere in the class
    ErrorHandler onErrorHandler = new ErrorHandler() {
        @Override
        public void run() {
            Log.e("onError", getErrorResponse() != null ? getErrorResponse().getDescription() : "");
        }
    };

    MakePaymentActivity
        .init("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "http://baseUrl")
        .makePayment(makePaymentRequest)
        .onError(onErrorHandler)
        .startWebView(this)
    

Event Object Parameter

Field Name Description Type
Description Error description string
Details Collection of error messages Map of string keys and array of string values

Event Object Example:


    ErrorResponse(
        description = "There are validation errors",
        details =
        {
            paymentCategory = ["The paymentCategory is a required field"],
            clientReferenceData1 = ["Incorrect format"]
        }
    )
        

Payment Complete Event

Occurs when payment is successfully completed.

Example:


    MakePaymentActivity
        .init("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "http://baseUrl")
        .makePayment(makePaymentRequest)
        .onPaymentComplete {  paymentInfo -> Log.i("onPaymentComplete", paymentInfo.toString())  }
        .startWebView(this)
    

    // In the import section
    import com.digitalpayments.android.sdk.context.PaymentCompleteHandler;

    // Somewhere in the class
    PaymentCompleteHandler onPaymentComplete = new PaymentCompleteHandler() {
        @Override
        public void run() {
            Log.e(
                "onPaymentComplete",
                getPaymentInfo() != null ? getPaymentInfo().getTransactionId() : "");
        }
    };

    MakePaymentActivity
        .init("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "http://baseUrl")
        .makePayment(makePaymentRequest)
        .onPaymentComplete(onPaymentComplete)
        .startWebView(this)
    

CreditCardPaymentInfo event Object Parameter

Will be returned for payments with PaymentCategory of creditCard

Field Name Description Type
sessionId Unique identifier echoed back from call to a PortalOne operation. string
paymentCategory Indicates if the requested operation will be predefined as a credit card or bank account operation. string
cardType Returns the card type that was processed. string
customerName Name that was provided with a card or bank account inforamtion. Passed back as Customer Name string
holderZip Returns zip code of card holder passed back from billingZip on request. string
authCode Returns authorization code provided by issuing bank. string
cardExpirationMonth Returns the card expiration month. number
cardExpirationYear Returns the card expiration year. number
token Unique identifier that represents a saved card. Can be used to safely make payments of with the save payment method. string
batchNumber ProcessOne Batch ID, file identifier. Identifies which batch is associated with a transaction. string
transactionId ProcessOne Transaction ID, payment identifier. Will be displayed as Confirmation number on the modal and web pages. Can be used to search for a specific payment in the ProcessOne Transaction Report string
paymentAmount The premium payment amount excluding any convenience fees. number
convenienceFee The convenience fee applied to premium amount. number
totalPaymentAmount The total payment amount that was processed including convenience fees. number
lastFourDigits Last 4 digits of the card or bank account string
timezone Time zone code. (PST, EST) string
transactionDate Date Stamp of the payment Date
Credit Card PaymentInfo Object Example:

    CreditCardPaymentInfo(
        sessionId = "aec2b965-87a2-49b2-89b7-ef96d26f7764",
        transactionId = 2,
        paymentAmount = 50,
        totalPaymentAmount = 55,
        convenienceFee = 5,
        lastFourDigits = 1234,
        transactionDate = "Tue Feb 11 02:56:11 GMT+00:00 2020",
        timeZone = "PST",
        batchNumber = 2,
        clientReferenceData1 = "123456789",
        token = "c99c5aca-16c8-491f-ab10-45bac17a1111",
        paymentCategory = CreditCard,
        cardType = "Visa",
        customerName = "Test",
        holderZip: "95630",
        authCode: "TEST0000",
        cardExpirationYear: 2021,
        cardExpirationMonth: 4
    )
    

BankAccountPaymentInfo event Object Parameter

Will be returned for payments with PaymentCategory of ECheck

Field Name Description Type
sessionId Unique identifier echoed back from call to a PortalOne operation. string
paymentCategory Indicates if the requested operation will be predefined as a credit card or bank account operation. string
accountType Returns the account type of the bank account: Checking or Saving. string
bankName Returns the name of a bank associated with a provided account. string
customerName Name that was provided with a card or bank account inforamtion. Passed back as Customer Name string
token Unique identifier that represents a saved card or bank account. Can be used to safely make payments of with the save payment method. string
batchNumber ProcessOne Batch ID, file identifier. Identifies which batch is associated with a transaction. string
transactionId ProcessOne Transaction ID, payment identifier. Will be displayed as Confirmation number on the modal and web pages. Can be used to search for a specific payment in the ProcessOne Transaction Report string
paymentAmount The premium payment amount excluding any convenience fees. number
convenienceFee The convenience fee applied to premium amount. number
totalPaymentAmount The total payment amount that was processed including convenience fees. number
lastFourDigits Last 4 digits of the card or bank account string
timezone Time zone code. (PST, EST) string
transactionDate Date Stamp of the payment Date
ECheck PaymentInfo Object Example:

    BankAccountPaymentInfo(
        sessionId = "aec2b965-87a2-49b2-89b7-ef96d26f7765",
        transactionId = 3,
        paymentAmount = 50,
        totalPaymentAmount = 55,
        convenienceFee = 5,
        lastFourDigits = 1234,
        transactionDate = "Tue Feb 11 02:56:11 GMT+00:00 2020",
        timeZone = "PST",
        batchNumber = 2,
        clientReferenceData1 = "123456789",
        token = "c99c5aca-16c8-491f-ab10-45bac17a1111",
        paymentCategory = ECheck,
        customerName = "Test",
        accountType = Checking,
        bankName = "Test bank"
    )
    

Payment Canceled Event

Occurs when payment operation is canceled.

Example:


    MakePaymentActivity
        .init("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "http://baseUrl")
        .makePayment(makePaymentRequest)
        .onPaymentCanceled { Log.i("onPaymentCanceled", "no data")  }
        .startWebView(this)
    

    Runnable onPaymentCanceled = new Runnable() {
        @Override
        public void run() {
            Log.i("onPaymentCanceled", "no data");
        }
    };

    MakePaymentActivity
        .init("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "http://baseUrl")
        .makePayment(makePaymentRequest)
        .onPaymentCanceled(onPaymentCanceled)
        .startWebView(this)
        

Save Complete Event

Occurs when payment method was successfully saved.

Example:


    SavePaymentMethodActivity
        .init("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "http://baseUrl")
        .savePaymentMethod(saveRequest)
        .onSaveComplete { saveResponse -> Log.i("onSaveComplete", saveResponse.token) }
        .startWebView(this)
    

    // In the import section
    import com.digitalpayments.android.sdk.context.PaymentCompleteHandler;

    // Somewhere in the class
    SaveCompleteHandler onSaveComplete = new SaveCompleteHandler() {
        @Override
        public void run() {
            Log.i(
                "onSaveComplete",
                getResponse() != null ? getResponse().getLastFourDigits() : "");
        }
    };

    SavePaymentMethodActivity
        .init("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "http://baseUrl")
        .savePaymentMethod(saveRequest)
        .onSaveComplete(onSaveComplete)
        .startWebView(this)
    

SaveCreditCardResponse Event Object Parameter

Will be returned for operations with PaymentCategory of creditCard only.

Field Name Description Type
sessionId Unique identifier echoed back from call to a PortalOne operation. string
paymentCategory Indicates if the requested operation will be predefined as a credit card or bank account operation. string
cardType Returns the card type that was processed. string
cardExpirationMonth Returns the card expiration month. number
cardExpirationYear Returns the card expiration year. number
customerName Name that was provided with a card or bank account inforamtion. Passed back as Customer Name string
holderZip Returns zip code of cardholder passed back from billingZip on request. string
token Unique identifier that represents a saved card or bank account. Can be used to safely make payments of with the save payment method. string
lastFourDigits Last 4 digits of the card or bank account that was tokenized string
transactionDate Date Stamp of the payment Date
timezone Time zone code. (PST, EST) string
SaveCreditCardResponse Object Example:

    SaveCreditCardResponse(
        sessionId = "aec2b965-87a2-49b2-89b7-ef96d26f7764",
        lastFourDigits = 1234,
        transactionDate = "Tue Feb 11 02:56:11 GMT+00:00 2020",
        timeZone = "PST",
        batchNumber = 2,
        token = "c99c5aca-16c8-491f-ab10-45bac17a1111",
        paymentCategory = CreditCard,
        cardType = "Visa",
        customerName = "Test",
        holderZip: "95630",
        authCode: "TEST0000",
        cardExpirationYear: 2021,
        cardExpirationMonth: 4
    )
    

SaveBankAccountResponse Event Object Parameter

Will be returned for operations with PaymentCategory of eCheck only.

Field Name Description Type
sessionId Unique identifier echoed back from call to a PortalOne operation. string
paymentCategory Indicates if the requested operation will be predefined as a credit card or bank account operation. string
accountType Will be returned for operations with PaymentCategory of eCheck only. Returns the account type of the bank account: Checking or Saving. string
bankName Will be returned for payments with PaymentCategory of eCheck only. Returns the name of a bank associated with a provided account. string
customerName Name that was provided with a card or bank account inforamtion. Passed back as Customer Name string
token Unique identifier that represents a saved card or bank account. Can be used to safely make payments of with the save payment method. string
lastFourDigits Last 4 digits of the card or bank account that was tokenized string
transactionDate Date Stamp of the payment Date
timezone Time zone code. (PST, EST) string
ECheck SavePaymentInfo Object Example:

     SaveBankAccountResponse(
         sessionId = "aec2b965-87a2-49b2-89b7-ef96d26f7765",
         transactionId = 3,
         lastFourDigits = 1234,
         transactionDate = "Tue Feb 11 02:56:11 GMT+00:00 2020",
         timeZone = "PST",
         batchNumber = 2,
         token = "c99c5aca-16c8-491f-ab10-45bac17a1111",
         paymentCategory = ECheck,
         customerName = "Test",
         accountType = Checking,
         bankName = "Test bank"
     )
     

Save Canceled Event

Occurs when save operation is canceled.

Example:


   SavePaymentMethodActivity
       .init("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "http://baseUrl")
       .savePaymentMethod(saveRequest)
       .onSaveCanceled { Log.i("onSaveCanceled", "") }
       .startWebView(this)
   

    Runnable onSaveCanceled = new Runnable() {
        @Override
        public void run() {
            Log.i("onSaveCanceled", "");
        }
    };

   SavePaymentMethodActivity
       .init("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "http://baseUrl")
       .savePaymentMethod(saveRequest)
       .onSaveCanceled(onSaveCanceled)
       .startWebView(this)
   

Test Data

Credit Card Test Data

You can use the following card numbers for testing purposes.

Card Type Card number Cvv2 Expiration date Comments
Visa 4111111111111111 Any 3 digit Any future date
MasterCard 5431111111111111 Any 3 digit Any future date
Discover 6011601160116611 Any 3 digit Any future date
AmericanExpress 341111111111111 Any 4 digit Any future date
Hybrid Visa PinlessDebit Star 4024007167282317 Any 3 digit Any future date This is as a Hybrid Visa card. If your Merchant is provisioned for Pinless Debit cards, the card will process as a pinless debit Star. If your merchant account is not setup for Pinless Debit, it will process as a Visa
Hybrid Discover PinlessDebit Pulse 6011172923498605 Any 3 digit Any future date This is as a Hybrid Discover card. If your Merchant is provisioned for Pinless Debit cards, the card will process as a pinless debit Pulse. If your merchant account is not setup for Pinless Debit, it will process as a Discover
Hybrid MasterCard PinlessDebit Nyce 5384483278305365 Any 3 digit Any future date This is as a Hybrid Mastercard. If your Merchant is provisioned for Pinless Debit cards, the card will process as a pinless debit Nyce. If your merchant account is not setup for Pinless Debit, it will process as a Mastercard

Use the following card number and amount combination to simulate different API response codes

Card number Amount Response Code Description
4444444444444448 1.00 or any not listed amount Success Test: Charge approved
4444444444444448 2.00 or 12.00 IncorrectValidationValue Test: CVV2 code is invalid
4444444444444448 3.00 or 13.00 Declined Test: Declined
4444444444444448 4.00 OverMaximumPayment Test: Exceed max payment amount
4444444444444448 5.00 or 15.00 DuplicateTransaction Test: Duplicate transaction
4444444444444448 6.00 or 16.00 GatewayInternalError Test: System is down
4444444444444448 7.00 or 17.00 InvalidCardNumber Test: Invalid card number returned by gateway
4444444444444448 14.00 AvsVerificationFailed Test: Avs verification failed
4444444444444448 18.00 Call Test: Issuer wants voice contact with cardholder
4444444444444448 19.00 NoProcessorResponse Test: No response from Processor

Bank Account Test Data

You can use the following EFT data for testing purposes.

Account Number Routing Number Account Type
123456789 121042882 Checking

Use the following bank account number and amount combination to simulate different API response codes.

Test Data for Credit and Debit transaction types.
Account Number Amount Response Code Description
1234567890 $0.00 Success Test: Successfully saved
1234567890 $1.00 Success Test: Transaction approved
1234567890 $2.00 ACHTransactionFailed Test: Not able to process bank account payment
1234567890 $3.00 GatewayInternalError Test: System is down
1234567890 $4.00 NoProcessorResponse Test: No response from Processor
Test Data for Void and Refund transaction types. You can only void or refund an already existing transaction.
Account Number Amount Response Code Description
1234567890 $11.00 ACHTransactionFailed Test: Not able to process bank account payment
1234567890 $12.00 GatewayInternalError Test: System is down
1234567890 $13.00 NoProcessorResponse No response from Processor

You can use the following EFT data to simulate Bank Account Validation response codes.

For testing, any valid routing number shall be used. The results will depend on bank account number.
Account Number Response Code Description
1234567890 Success Test: Charge approved
2234567890 InvalidAccountNumber Test: Invalid Account Number
3234567890 InvalidRoutingNumber Test: Invalid Routing Number
4234567890 GatewayInternalError Test: System is down