Version: 1.6.3.2

Last Update:

To use PayAnywhereSdk with your android app, you have to use android intent and intent result. 
The way PayAnywhere works is, you have to pass a specific intent and that intent will be received by android OS and then android OS will transfer that intent to PayAnywhere.
And after that when PayAnywhere completes a transaction processing then it will return the result to calling app. Please follow the below mention steps to get started:

How to perform a sale/transaction: (CASH & CREDIT)


  1. Create an android application in android studio.  
     

  2. Add following code where you would like to start PayAnywhere payment processing (i.e. button click).

    private static final String PAYMENT_URL = "payanywhere://payment/";
    private static final int PAYMENT_REQUEST_CODE = 123;
    
    Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(PAYMENT_URL +  "?chargeAmount=2.73"));
    startActivityForResult(intent, PAYMENT_REQUEST_CODE);


    Here “payanywhere://payment/chargeAmount=2.73” is the intent uri, and “2.73” is the intended charge amount that you would like to process via PayAnywhere.
    And 123 is the unique requestCode for this intent. When you will execute this code,
    PayAnywhere will be started and will be ready to process a credit card transaction. 
     

  3. Now plugin a credit card reader into your headphone jack (if required) and do swipe/emv/nfc/keyed with a credit card.
    PayAnywhere will handle the processing and will ask for signature. Proceed with signature.
    If you do not want to see the Signature screen, Turn OFF " Always Require Signature" setting/toggle on PayAnywhere App
    (Can be download from Google Play Store on any Android or iOS device) or
    look at "How to request Signature Screen to be shown or hidden" section.
    If signature is needed on the printed receipt, look at the sections below for Sign On Paper Receipts and how to show Receipt Options screen.

  4. Few other flags can be used like “payanywhere://payment/chargeAmount=2.73&customerTransactionId=123456&invoiceNumber=654321&externalNotification=true"
    For more details have a look into "Example Values/Flags for SDK" table.

  5. In order to have an option to process a CASH transaction include "payanywhere://payment/?chargeAmount=0.01&acceptCash=true".
    This will show an option "Accept Cash Sale" on SDK Payment screen. Once transaction approves,
    if Receipt share is enabled, proceed with sharing or else transaction result will be sent to the client application.
     
  6. To receive a transaction result on your app, add following code into your activity

    private static final String EXTRA_TRANSACTION_RESULT = "transactionResult";
    private static final String EXTRA_TRANSACTION_UNIQUE_ID = "transactionUniqueId";
    private static final String EXTRA_RECEIPT_ID = "receiptId";
    private static final String EXTRA_PARTIAL_AUTH = "isPartialAuth";
    private static final String EXTRA_REQUESTED_AMOUNT = "requestedAmount";
    private static final String EXTRA_AUTHORIZED_AMOUNT = "authorizedAmount";
    public static final String EXTRA_TRANSACTION_ACTION = "transactionAction";
    private static final String EXTRA_CUSTOMER_TRANSACTION_ID ="customerTransactionId";
    private static final String EXTRA_INVOICE_NUMER ="invoiceNumber";
    
    
    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        Log.d(TAG,"onActivityResult requestCode " + requestCode + " resultCode " + resultCode);
     if( requestCode ==PAYMENT_REQUEST_CODE){
            if(resultCode == RESULT_OK){
                Log.d(TAG,"result ok");
     			showTransactionResponses(requestCode, resultCode, data);
     		} else if(resultCode == RESULT_CANCELED){
                Log.d(TAG,"result cancelled");
     			showTransactionResponses(requestCode, resultCode, data);
     		}
        }
    }
    
    private void showTransactionResponses(int requestCode, int resultCode, Intent data){
        if(data != null){
         String transactionResult = data.getStringExtra(EXTRA_TRANSACTION_RESULT);
     	 String transactionUniqueId = data.getStringExtra(EXTRA_TRANSACTION_UNIQUE_ID);
     	 long receiptId = data.getLongExtra(EXTRA_RECEIPT_ID, 0);
         String customerTransactionId = data.getStringExtra(EXTRA_CUSTOMER_TRANSACTION_ID); 
         String invoiceNumber = data.getStringExtra(EXTRA_INVOICE_NUMER); 
     	 String transactionAction = data.getStringExtra(EXTRA_TRANSACTION_ACTION);
     	 boolean isPartialAuth = data.getBooleanExtra(EXTRA_PARTIAL_AUTH, false);
    
         BigDecimal requestedAmount = null;
     	 if(data.getSerializableExtra(EXTRA_REQUESTED_AMOUNT) != null){
           requestedAmount = (BigDecimal)data.getSerializableExtra(EXTRA_REQUESTED_AMOUNT);
         }
     	 BigDecimal authorizedAmount = null;
     	 if(data.getSerializableExtra(EXTRA_AUTHORIZED_AMOUNT) != null){
           authorizedAmount = (BigDecimal)data.getSerializableExtra(EXTRA_AUTHORIZED_AMOUNT);
        }
     }
    }


    After an approved/declined transaction PayAnywhere will send result back to calling activity with intent extra.
    Value of “transactionResult” will be either of the followings:

    "transactionApproved" (when a transaction is approved)

    "transactionDeclined" (when a transaction is declined)

    "transactionCancelled" (when a transaction is cancelled)

    For an approved transaction you will also receive a “transactionUniqueId”. You can use this unique id to track your transaction in future. 

    If a transaction is partial auth (A partial auth transaction means when you swipe a card to charge certain amount i.e. $20 but
    that card has lower amount i.e. $15 than your transaction will be partially approved with $15. Example a gift card.) 
    you will also received "isPartialAuth" boolean extra. 

    "authorizedAmount" extra contain the  authorized charged amount that was applied on this transaction.
    "authCode" extra contain authorization code for the transaction.

    **Amount should be always rounded 2 decimal places i.e. 325.67, 42.19, 0.01

    **Additionally, If you pass ccDetails=true in sale and preauth, you will receive android extra "network", "firstName", "lastName", "inputType" and "last4".
    If card brand, card holder name, card read input type, card last 4 data exist
    then "network" extra will contain card brand i.e. VISA, MASTERCARD, AMEX, DISCOVER etc.
    then "inputType" extra will contain card read input type i.e. EMV, SWIPED, CONTACTLESS, KEYED, BARCODE, BRIC etc
    And "firstName" will contain card holder first name. 
    And "lastName" will contain card holder last name. 
    And "last4" will contain last 4 digit of a card.

    **You can also optionally pass another parameter itemName=SomeItemName. This itemName will be used as your sale item name instead of "Express Item

How to perform a recurring payment (**For EPX Customer):


  1. Create an android application in android studio.  
     

  2. Add following code where you would like to start PayAnywhere payment processing (i.e. button click).

    private static final String PAYMENT_URL = "payanywhere://payment/";
    private static final int PAYMENT_REQUEST_CODE = 123;
    
    Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(PAYMENT_URL +  "?chargeAmount=25.00&recurringPeriod=months&recurringLength=4&firstName=John&lastName=Kevin&email=johnkevin@gmail.com"));
    startActivityForResult(intent, PAYMENT_REQUEST_CODE);


    Here “payanywhere://payment/?chargeAmount=25.00&recurringPeriod=months&recurringLength=4&firstName=John&lastName=Kevin&email=johnkevin@gmail.com” is the intent uri and 123 is the unique requestCode for this intent.
    When you will execute this code, PayAnywhere will be started and will be ready to process a credit card transaction.
    Initial sale will be $25.00 and subsequent sales will be every 4 months at $25.00. firstName and lastName and email address are the information of customer who will be enrolling into recurring payment.

    **You can also optionally pass another parameter itemName=SomeItemName. This itemName will be used as your sale item name instead of "Express Item".

    In 1.5.6 release, we have added an option to pass "Customer First Name", "Last Name" and "Customer Email Address" into a recurring payment request.
    So our app can use that info and can send email to customer about their enrollment into a auto payments. This changed is due to a requirement by "Visa" Brand. 

    From next release (post 1.5.6 releases), either for every recurring payment request you must need to pass recurring payment customer's firstName, lastName & email. Or you have to make sure to send an email to customer by yourself during a recurring payment if its a VISA.

     

  3. Now plugin a credit card reader into your headphone jack (if required) and do swipe/emv/nfc/keyed with a credit card. PayAnywhere will handle the processing and will ask for signature.
    Proceed with signature.
     
  4. To receive a transaction result on your app, add following code into your activity

    private static final String EXTRA_TRANSACTION_RESULT = "transactionResult";
    private static final String EXTRA_TRANSACTION_UNIQUE_ID = "transactionUniqueId";
    private static final String EXTRA_RECEIPT_ID = "receiptId";
    private static final String EXTRA_PARTIAL_AUTH = "isPartialAuth";
    private static final String EXTRA_REQUESTED_AMOUNT = "requestedAmount";
    private static final String EXTRA_AUTHORIZED_AMOUNT = "authorizedAmount";
    public static final String EXTRA_TRANSACTION_ACTION = "transactionAction";
    public static final String EXTRA_RECURRING_PAYMENT_ID ="recurringPaymentId";
    public static String EXTRA_RECURRING_PERIOD ="recurringPeriod";
    public static String EXTRA_RECURRING_LENGTH ="recurringLength";
    public static String EXTRA_FIRST_NAME = "firstName";
    public static String EXTRA_LAST_NAME = "lastName";
    public static String EXTRA_EMAIL = "email";
    
    
    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        Log.d(TAG,"onActivityResult requestCode " + requestCode + " resultCode " + resultCode);
     if( requestCode ==PAYMENT_REQUEST_CODE){
            if(resultCode == RESULT_OK){
                Log.d(TAG,"result ok");
     			showTransactionResponses(requestCode, resultCode, data);
     		} else if(resultCode == RESULT_CANCELED){
                Log.d(TAG,"result cancelled");
     			showTransactionResponses(requestCode, resultCode, data);
     		}
        }
    }
    
    private void showTransactionResponses(int requestCode, int resultCode, Intent data){
        if(data != null){
         String transactionResult = data.getStringExtra(EXTRA_TRANSACTION_RESULT);
     	 String transactionUniqueId = data.getStringExtra(EXTRA_TRANSACTION_UNIQUE_ID);
     	 long receiptId = data.getLongExtra(EXTRA_RECEIPT_ID, 0);
     	 String transactionAction = data.getStringExtra(EXTRA_TRANSACTION_ACTION);
     	 boolean isPartialAuth = data.getBooleanExtra(EXTRA_PARTIAL_AUTH, false);
         String recurringPaymentId = data.getStringExtra(EXTRA_RECURRING_PAYMENT_ID); 
         String recurringPeriod = data.getStringExtra(EXTRA_RECURRING_PERIOD);
         String recurringLength = data.getStringExtra(EXTRA_RECURRING_LENGTH);
    	 String firstName = data.getStringExtra(EXTRA_FIRST_NAME);
         String lastName = data.getStringExtra(EXTRA_LAST_NAME);
         String email = data.getStringExtra(EXTRA_EMAIL); 	
    
         BigDecimal requestedAmount = null;
     	 if(data.getSerializableExtra(EXTRA_REQUESTED_AMOUNT) != null){
           requestedAmount = (BigDecimal)data.getSerializableExtra(EXTRA_REQUESTED_AMOUNT);
         }
     	 BigDecimal authorizedAmount = null;
     	 if(data.getSerializableExtra(EXTRA_AUTHORIZED_AMOUNT) != null){
           authorizedAmount = (BigDecimal)data.getSerializableExtra(EXTRA_AUTHORIZED_AMOUNT);
        }
     }
    }


    After an approved/declined transaction PayAnywhere will send result back to calling activity with intent extra. Value of “transactionResult” will be either of the followings:

    "transactionApproved" (when a transaction is approved)

    "transactionDeclined" (when a transaction is declined)

    "transactionCancelled" (when a transaction is cancelled)

    For an approved transaction you will also receive a “transactionUniqueId”. You can use this unique id to track your transaction in future. 

    If a transaction is partial auth (A partial auth transaction means when you swipe a card to charge certain amount i.e. $20 but
    that card has lower amount i.e. $15 than your transaction will be partially approved with $15. Example a gift card.) 
    you will also received "isPartialAuth" boolean extra. 

    "authorizedAmount" extra contain the  authorized charged amount that was applied on this transaction.
    "recurringPeriod" and "recurringLength" extra  will contain the recurring details that you requested.

How to update a recurring payment (**For EPX Customer):

  1. You can update recurring payment frequency i.e. period and length and you can also update credit card sale that will be used for recurring payment.   
    To update the frequency of a  recurring payment just provide recurringPaymentId, recurringLength and recurringPeriod.
    To update a credit card sale that will be used to perform recurring payment you have to pass recurringPaymentId and recurringPaymentCCSId i.e. credit card sale unique id. 
    When credit card sale unique id is passed in, the following happens: The current recurring payment object is deactivated and a new
    recurring payment object is created, pointing to the specified credit card sale object. We will return you the new recurring payment object id.
    Also, to use this field, the credit card sale id must already exist (i.e.: it must have already processed a sale).
    Currently there is no validation that the card is still valid until we attempt a recurring payment charge.
     

  2. Add following code to update a recurring payment:

    private static final String RECURRING_PAYMENT_UPDATE_URL = "payanywhere://recurring_payment_update/";
    private static final int RECURRING_PAYMENT_UPDATE_REQUEST_CODE = 227;
    public static final String EXTRA_RECURRING_PAYMENT_ID ="recurringPaymentId";
    public static final String EXTRA_RECURRING_PAYMENT_CCS_ID ="recurringPaymentCCSId";
    public static final String EXTRA_RECURRING_AMOUNT ="recurringAmount";
    public static final String EXTRA_RECURRING_PERIOD ="recurringPeriod";
    public static final String EXTRA_RECURRING_LENGTH ="recurringLength";
    
    long recurringPaymentId = 1234;
    int recurringLength = 1;
    String  recurringPeriod = "months";
    String recurringCCSId = "ccs_123456";
    
    StringBuilder paramBuilder = new StringBuilder();
    paramBuilder.append("&" + EXTRA_RECURRING_LENGTH + "=" + recurringLength);
    paramBuilder.append("&" + EXTRA_RECURRING_PERIOD + "=" + recurringPeriod);
    paramBuilder.append("&" + EXTRA_RECURRING_PAYMENT_CCS_ID + "=" + recurringCCSId);
    String params = paramBuilder.toString();
    
    Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(RECURRING_PAYMENT_UPDATE_URL +  "?" + EXTRA_RECURRING_PAYMENT_ID + "=" + recurringPaymentId + params));
    startActivityForResult(intent, RECURRING_PAYMENT_UPDATE_REQUEST_CODE);


     How to receive Activity Result:

    private static final String EXTRA_TRANSACTION_RESULT = "transactionResult";
    public static final String EXTRA_TRANSACTION_ACTION = "transactionAction";
    public static final String EXTRA_RECURRING_PAYMENT_ID ="recurringPaymentId";
    public static String EXTRA_RECURRING_AMOUNT ="recurringAmount";
    public static String EXTRA_RECURRING_PERIOD ="recurringPeriod";
    public static String EXTRA_RECURRING_LENGTH ="recurringLength";
    public static final String EXTRA_RECURRING_PAYMENT_CCS_ID ="recurringPaymentCCSId";
    
    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        Log.d(TAG,"onActivityResult requestCode " + requestCode + " resultCode " + resultCode);
     if( requestCode == RECURRING_PAYMENT_UPDATE_REQUEST_CODE){
            if(resultCode == RESULT_OK){
                Log.d(TAG,"result ok");
     			showTransactionResponses(requestCode, resultCode, data);
     		} else if(resultCode == RESULT_CANCELED){
                Log.d(TAG,"result cancelled");
     			showTransactionResponses(requestCode, resultCode, data);
     		}
        }
    }
    
    private void showTransactionResponses(int requestCode, int resultCode, Intent data){
        if(data != null){
         String transactionResult = data.getStringExtra(EXTRA_TRANSACTION_RESULT);
     	 String transactionAction = data.getStringExtra(EXTRA_TRANSACTION_ACTION);
     	 String recurringPaymentId = data.getStringExtra(EXTRA_RECURRING_PAYMENT_ID);
         String recurringPaymentCCSId = data.getStringExtra(EXTRA_RECURRING_PAYMENT_CCS_ID);
         String recurringAmount = data.getStringExtra(EXTRA_RECURRING_AMOUNT);
         String recurringPeriod = data.getStringExtra(EXTRA_RECURRING_PERIOD);
         String recurringLength = data.getStringExtra(EXTRA_RECURRING_LENGTH);
     }
    }

     **You will receive recurringPaymentId thats updated or new recurring payment id if new recurring object created due to new credit card sale unique id

How to deactivate a recurring payment (**For EPX Customer):

  1. To deactivate  a  recurring payment you have to provide recurringPaymentId.

  2. Add following code to update a recurring payment:

    private static final String RECURRING_PAYMENT_DEACTIVATE_URL = "payanywhere://recurring_payment_deactivate";
    private static final int RECURRING_PAYMENT_DEACTIVATE_REQUEST_CODE = 347;
    
    long recurringPaymentId = 1234;
    
    Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(RECURRING_PAYMENT_DEACTIVATE_URL +  "?" + EXTRA_RECURRING_PAYMENT_ID + "=" + recurringPaymentId);
    startActivityForResult(intent, RECURRING_PAYMENT_DEACTIVATE_REQUEST_CODE);


     How to receive Activity Result:

    private static final String EXTRA_TRANSACTION_RESULT = "transactionResult";
    public static final String EXTRA_TRANSACTION_ACTION = "transactionAction";
    public static final String EXTRA_RECURRING_PAYMENT_ID ="recurringPaymentId";
    
    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        Log.d(TAG,"onActivityResult requestCode " + requestCode + " resultCode " + resultCode);
     if( requestCode == RECURRING_PAYMENT_UPDATE_REQUEST_CODE){
            if(resultCode == RESULT_OK){
                Log.d(TAG,"result ok");
     			showTransactionResponses(requestCode, resultCode, data);
     		} else if(resultCode == RESULT_CANCELED){
                Log.d(TAG,"result cancelled");
     			showTransactionResponses(requestCode, resultCode, data);
     		}
        }
    }
    
    private void showTransactionResponses(int requestCode, int resultCode, Intent data){
        if(data != null){
         String transactionResult = data.getStringExtra(EXTRA_TRANSACTION_RESULT);
     	 String transactionAction = data.getStringExtra(EXTRA_TRANSACTION_ACTION);
     	 String recurringPaymentId = data.getStringExtra(EXTRA_RECURRING_PAYMENT_ID);
     }
    }


How to void/refund a transaction:

1. Credit card sales can both be refunded and voided. Credit sale unique id's start with "ccs_".

2. Cash sales can only be refunded. If application tries to send a Void request to SDK for a cash sale, an error message will be thrown. Cash sale unique id's start with "cas_".

For Refund:

private static final String REFUND_URL = "payanywhere://refund/"; 
private static final int REFUND_VOID_REQUEST_CODE = 456;
protected String mTransactionActionUniqueId = "ccs_1234567";
protected String mRefundAmount = "25.00";
protect long receiptId = 317748502;
Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(REFUND_URL +  "?transactionUniqueId=" + mTransactionActionUniqueId + "&receiptId=" + receiptId +"&refundAmount=" + mRefundAmount));
startActivityForResult(intent, REFUND_VOID_REQUEST_CODE);

For Void:

private static final String VOID_URL = "payanywhere://void/";

private static final int REFUND_VOID_REQUEST_CODE = 456;
protected String mTransactionActionUniqueId = "ccs_1234567";
protect long receiptId = 317748502;
Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(VOID_URL +  "?transactionUniqueId=" + mTransactionActionUniqueId + "&receiptId=" + receiptId ));
startActivityForResult(intent, REFUND_VOID_REQUEST_CODE)


How to receive Activity Result:

public static final String EXTRA_TRANSACTION_ACTION = "transactionAction";

private static final String EXTRA_TRANSACTION_RESULT = "transactionResult";
public static final String EXTRA_TRANSACTION_STATUS_MESSAGE = "transactionStatusMessage";

private static final String EXTRA_TRANSACTION_UNIQUE_ID = "transactionUniqueId";



@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
	if(requestCode == REFUND_VOID_REQUEST_CODE){
    	if(resultCode == RESULT_OK){
        	Log.d(TAG,"result ok");
 			showTransactionActionResponses(data);
 		} else if(resultCode == RESULT_CANCELED){
        Log.d(TAG,"result cancelled");
 		showTransactionActionResponses(data);
 		}	
  }
}


private void showTransactionActionResponses(Intent data){
     if(data != null){
         String transactionAction = data.getStringExtra(EXTRA_TRANSACTION_ACTION);
         String transactionResult = data.getStringExtra(EXTRA_TRANSACTION_RESULT);
         String transactionStatusMessage = data.getStringExtra(EXTRA_TRANSACTION_STATUS_MESSAGE);
         String transactionUniqueId = data.getStringExtra(EXTRA_TRANSACTION_UNIQUE_ID);
     }
 }



How to perform a Pre Auth transaction:

private static final String PREAUTH_URL = "payanywhere://preauth/";
private static final int PREAUTH_REQUEST_CODE = 456;
Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(PREAUTH_URL +  "?chargeAmount=2.73"));
startActivityForResult(intent, PREAUTH_REQUEST_CODE);

Here “payanywhere://preauth/chargeAmount=2.73” is the intent uri, and “2.73” is the intended PreAuth amount that you would like to process via PayAnywhere.
And 456 is the unique requestCode for this intent. When you will execute this code,
PayAnywhere will be started and will be ready to process a PreAuth credit card transaction. 


**
You can also optionally pass another parameter itemName=SomeItemName. This itemName will be used as your sale item name instead of "Express Item".

How to receive Activity Result:

private static final String EXTRA_TRANSACTION_RESULT = "transactionResult";
private static final String EXTRA_TRANSACTION_UNIQUE_ID = "transactionUniqueId";
private static final String EXTRA_RECEIPT_ID = "receiptId";
private static final String EXTRA_PARTIAL_AUTH = "isPartialAuth";
private static final String EXTRA_REQUESTED_AMOUNT = "requestedAmount";
private static final String EXTRA_AUTHORIZED_AMOUNT = "authorizedAmount";
public static final String EXTRA_TRANSACTION_ACTION = "transactionAction";



@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    Log.d(TAG,"onActivityResult requestCode " + requestCode + " resultCode " + resultCode);
 if( requestCode == PREAUTH_REQUEST_CODE){
        if(resultCode == RESULT_OK){
            Log.d(TAG,"result ok");
 			showTransactionResponses(requestCode, resultCode, data);
 		} else if(resultCode == RESULT_CANCELED){
            Log.d(TAG,"result cancelled");
 			showTransactionResponses(requestCode, resultCode, data);
 		}
    }
}

private void showTransactionResponses(int requestCode, int resultCode, Intent data){
    if(data != null){
 		String transactionResult = data.getStringExtra(EXTRA_TRANSACTION_RESULT);
 		String transactionUniqueId = data.getStringExtra(EXTRA_TRANSACTION_UNIQUE_ID);
 		long receiptId = data.getLongExtra(EXTRA_RECEIPT_ID, 0);
 		String transactionAction = data.getStringExtra(EXTRA_TRANSACTION_ACTION);
 		boolean isPartialAuth = data.getBooleanExtra(EXTRA_PARTIAL_AUTH, false);
 
     	BigDecimal requestedAmount = null;
 	 	if(data.getSerializableExtra(EXTRA_REQUESTED_AMOUNT) != null){
       		requestedAmount = (BigDecimal)data.getSerializableExtra(EXTRA_REQUESTED_AMOUNT);
     	}
     	BigDecimal authorizedAmount = null;
 	 	if(data.getSerializableExtra(EXTRA_AUTHORIZED_AMOUNT) != null){
       		authorizedAmount = (BigDecimal)data.getSerializableExtra(EXTRA_AUTHORIZED_AMOUNT);
     }
 }
}



How to complete a PreAuth transaction:

private static final String PREAUTH_COMPLETE_URL = "payanywhere://preauth_complete/";
private static final int PREAUTH_COMPLETE_REQUEST_CODE = 789;
Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(PREAUTH_COMPLETE_URL +  "?transactionUniqueId=pap_123456&receiptId=123456&preAuthCompleteAmount=43.46")); 
startActivityForResult(intent, PREAUTH_COMPLETE_REQUEST_CODE);


How to receive Activity Result:

private static final String EXTRA_TRANSACTION_RESULT = "transactionResult";
private static final String EXTRA_TRANSACTION_UNIQUE_ID = "transactionUniqueId";
public static final String EXTRA_TRANSACTION_ACTION = "transactionAction";



@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    Log.d(TAG,"onActivityResult requestCode " + requestCode + " resultCode " + resultCode);
 	if( requestCode == PREAUTH_COMPLETE_REQUEST_CODE){
        if(resultCode == RESULT_OK){
            Log.d(TAG,"result ok");
 			showTransactionResponses(requestCode, resultCode, data);
 		} else if(resultCode == RESULT_CANCELED){
            Log.d(TAG,"result cancelled");
 			showTransactionResponses(requestCode, resultCode, data);
 		}
    }
}

private void showTransactionResponses(int requestCode, int resultCode, Intent data){
    if(data != null){
 		String transactionResult = data.getStringExtra(EXTRA_TRANSACTION_RESULT);
 		String transactionUniqueId = data.getStringExtra(EXTRA_TRANSACTION_UNIQUE_ID);
 		String transactionAction = data.getStringExtra(EXTRA_TRANSACTION_ACTION);
 	}
}



How to perform a Tips Adjustment:

**Currently tips adjustment is only supported on Global accounts. 
**Tip adjust can be done anytime while the batch is still open. Our current batch end time is 5 pm EST for Global accounts.


private static final String TIPS_URL = "payanywhere://tips/";
private static final int TIPS_REQUEST_CODE = 555;
Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(TIPS_URL +  "?transactionUniqueId=" + mTransactionActionUniqueId + "&tipsAmount=" + mTipsAmount));
startActivityForResult(intent, TIPS_REQUEST_CODE);


How to receive Activity Result:

private static final String EXTRA_TRANSACTION_RESULT = "transactionResult";
private static final String EXTRA_TRANSACTION_UNIQUE_ID = "transactionUniqueId";
public static final String EXTRA_TRANSACTION_ACTION = "transactionAction";



@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    Log.d(TAG,"onActivityResult requestCode " + requestCode + " resultCode " + resultCode);
 	if( requestCode == TIPS_REQUEST_CODE){
        if(resultCode == RESULT_OK){
            Log.d(TAG,"result ok");
 		showTransactionResponses(requestCode, resultCode, data);
 	} else if(resultCode == RESULT_CANCELED){
            Log.d(TAG,"result cancelled");
 			showTransactionResponses(requestCode, resultCode, data);
 		}
    }
}

private void showTransactionResponses(int requestCode, int resultCode, Intent data){
    if(data != null){
 		String transactionResult = data.getStringExtra(EXTRA_TRANSACTION_RESULT);
 		String transactionUniqueId = data.getStringExtra(EXTRA_TRANSACTION_UNIQUE_ID);
 		String transactionAction = data.getStringExtra(EXTRA_TRANSACTION_ACTION);
 		String transactionStatusMessage = data.getStringExtra(EXTRA_TRANSACTION_STATUS_MESSAGE);
 	}
}


How to pass primary and contrast/accent color for sales, signature and receipt screen:


  1. With any sdk request you can pass following additional paramter to set primary and accent colors and also can disbale receipt screen.  
    Colors should be in following format rrggbb i.e. 00ff00 or 118855 etc.
    If you dont pass "receiptScree"n paramter then sdk will use sdk "Receipt Option Screen" settings to decide whether to show receipt screen or not.
    If you pass "receiptScreen" sdk paramter then sdk will use both sdk request param "receiptScreen" and sdk "Receipt Option Screen" settings to decide whether to show receipt screen or not. If both true sdk will show Receipt screen otherwise will not.

    private static final String PAYMENT_URL = "payanywhere://payment/";
    private static final int PAYMENT_REQUEST_CODE = 123;
    
    Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(PAYMENT_URL +  "?chargeAmount=2.73&primaryColor=00a6e8&contrastColor=10d625&receiptScreen=false"));
    startActivityForResult(intent, PAYMENT_REQUEST_CODE);






How to request for auto close sdk after a txn is declined:


  1. With any sdk request you can pass "closeOnDecline" paramter to request sdk to close itself when a transaction is declined.  

    When "closeOnDecline=true" and a txn is declined then sdk will close itself and control will be returned to caller app. 

    private static final String PAYMENT_URL = "payanywhere://payment/";
    private static final int PAYMENT_REQUEST_CODE = 123;
    
    Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(PAYMENT_URL +  "?chargeAmount=2.73&closeOnDecline=true"));
    startActivityForResult(intent, PAYMENT_REQUEST_CODE);



How to request sdk to auto close itself after user inactivity and certain timeout:


  1. With any sdk request you can pass "autoCancelTimeout=seconds" paramter to request sdk to close itself after specified seconds and if user dont interect with sdk during that time.  

    When "autoCancelTimeout=480" sdk will closes itself automatically after 8 mins (i.e. 480 seconds) if user dont do any intereaction by that time. By default autoCancelTimeout is set to 5 mins (300 seconds).
    If user do any intrect i.e. insert/swipe,keyed card or touch then timer will be reset again.

    private static final String PAYMENT_URL = "payanywhere://payment/";
    private static final int PAYMENT_REQUEST_CODE = 123;
    
    Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(PAYMENT_URL +  "?chargeAmount=2.73&autoCancelTimeout=480"));
    startActivityForResult(intent, PAYMENT_REQUEST_CODE);



How to Send a Single/Recurring Invoice :

  1. Create an android application in android studio.  
     

  2. Add following code where you would like to start PayAnywhere payment processing (i.e. button click). 

    private static final String PAYMENT_URL = "payanywhere://payment/";
    private static final int PAYMENT_REQUEST_CODE = 123;
    
    Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(PAYMENT_URL +  "?chargeAmount=2.73"));
    startActivityForResult(intent, PAYMENT_REQUEST_CODE);

    Here “payanywhere://payment/chargeAmount=2.73” is the intent uri, and “2.73” is the intended charge amount that you would like to send as invoice via PayAnywhere.
    And 123 is the unique requestCode for this intent. When you will execute this code,
    PayAnywhere will be started and will be ready to use. 

  3. Now select the "Send As Invoice" button under Other Payment Options. Enter all the required fields i.e., Customer First Name, Last Name and Email Address. And select the Due Date. If it is not a one time invoice and want it to be Recurring, toggle "Create Recurring Series" switch. Start Date, End Date and Frequency are Mandatory.  Once all required fields are entered, send button is now Active and once sent and acknowledged takes back to your app. And your customer will receive an email with the invoice receipt created and a Button to pay this invoice.

  4. To receive a result on your app, add following code to your activity

    	private static final String EXTRA_TRANSACTION_RESULT = "transactionResult";
        private static final String EXTRA_TRANSACTION_UNIQUE_ID = "transactionUniqueId";
        private static final String EXTRA_RECEIPT_ID = "receiptId";
        private static final String EXTRA_REQUESTED_AMOUNT = "requestedAmount";
        private static final String EXTRA_AUTHORIZED_AMOUNT = "authorizedAmount";
        private static final String EXTRA_CUSTOMER_TRANSACTION_ID ="customerTransactionId";
        public static final String EXTRA_TRANSACTION_ACTION = "transactionAction";
        public static String EXTRA_CUSTOMER_NAME = "customerName",
                EXTRA_EMAIL = "email",
                EXTRA_INVOICE_NUMBER = "invoiceNumber",
                EXTRA_INVOICE_DUE = "invoiceDueDate",
                EXTRA_RI_START_DATE = "riStartDate",
                EXTRA_RI_END_DATE = "riEndDate",
                EXTRA_RI_LENGTH = "riLength",
                EXTRA_RI_PERIOD = "riPeriod";
    
        @Override
        protected void onActivityResult(int requestCode, int resultCode, Intent data) {
            Log.d(TAG,"onActivityResult requestCode " + requestCode + " resultCode " + resultCode);
            if(requestCode == PAYMENT_REQUEST_CODE || requestCode == PREAUTH_REQUEST_CODE || requestCode == PREAUTH_COMPLETE_REQUEST_CODE || requestCode == REFUND_VOID_REQUEST_CODE ||   	requestCode == TIPS_REQUEST_CODE || requestCode == RECURRING_PAYMENT_UPDATE_REQUEST_CODE || requestCode == RECURRING_PAYMENT_DEACTIVATE_REQUEST_CODE){
                if(resultCode == RESULT_OK){
                    Log.d(TAG,"result ok");
                    showTransactionResponses(requestCode, resultCode, data);
                } else if(resultCode == RESULT_CANCELED){
                    Log.d(TAG,"result cancelled");
                    showTransactionResponses(requestCode, resultCode, data);
                }
            }
        }
    
    	private void showTransactionResponses(int requestCode, int resultCode, Intent data){
            if(data != null){
                StringBuilder responseString = new StringBuilder();
                String transactionResult = data.getStringExtra(EXTRA_TRANSACTION_RESULT);
                long receiptId = data.getLongExtra(EXTRA_RECEIPT_ID, 0);
                String customerTransactionId = data.getStringExtra(EXTRA_CUSTOMER_TRANSACTION_ID);
                String transactionAction = data.getStringExtra(EXTRA_TRANSACTION_ACTION);
                String transactionStatusMessage = data.getStringExtra(EXTRA_TRANSACTION_STATUS_MESSAGE);
                
    			//These apply for both Single and Recurring Invoices
                String invoiceCustomerName = data.getStringExtra(EXTRA_CUSTOMER_NAME);
                String email = data.getStringExtra(EXTRA_EMAIL);
                String invoiceNumber = data.getStringExtra(EXTRA_INVOICE_NUMBER);
                String invoiceDueDate = data.getStringExtra(EXTRA_INVOICE_DUE);
    
    			//These apply for Recurring Invoices only
                String riStartDate = data.getStringExtra(EXTRA_RI_START_DATE);
                String riEndDate = data.getStringExtra(EXTRA_RI_END_DATE);
                String riLength = data.getStringExtra(EXTRA_RI_LENGTH);
                String riPeriod = data.getStringExtra(EXTRA_RI_PERIOD);
    
                BigDecimal requestedAmount = null;
                if(data.getSerializableExtra(EXTRA_REQUESTED_AMOUNT) != null){
                    requestedAmount = (BigDecimal)data.getSerializableExtra(EXTRA_REQUESTED_AMOUNT);
                }
    
                BigDecimal authorizedAmount = null;
                if(data.getSerializableExtra(EXTRA_AUTHORIZED_AMOUNT) != null){
                    authorizedAmount = (BigDecimal)data.getSerializableExtra(EXTRA_AUTHORIZED_AMOUNT);
                }
            }
        }


            
   

How to request "Send As Invoice" to be hidden or shown:

  1. Send as Invoice button on Payment screen is shown by default if the request is for a SALE. To hide the "Send As Invoice" button pass "hideSendAsInvoice" parameter in the request. 

    private static final String PAYMENT_URL = "payanywhere://payment/";
    private static final int PAYMENT_REQUEST_CODE = 123;
    
    Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(PAYMENT_URL +  "?chargeAmount=2.73&hideSendAsInvoice=true"));
    startActivityForResult(intent, PAYMENT_REQUEST_CODE);


How to Add/Receive Customer Name and Contact Info :

  1. With any sdk request you can pass following additional paramter to disbale receipt screen.  
    If you dont pass "receiptScreen" paramter then sdk will use sdk "Receipt Option Screen" settings to decide whether to show receipt screen or not.
    If you pass "receiptScreen" sdk paramter then sdk will use both sdk request param "receiptScreen" and sdk "Receipt Option Screen" settings to decide whether to show receipt screen or not. If both true sdk will show Receipt screen otherwise will not.

    private static final String PAYMENT_URL = "payanywhere://payment/";
    private static final int PAYMENT_REQUEST_CODE = 123;
    
    Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(PAYMENT_URL +  "?chargeAmount=2.73&primaryColor=00a6e8&contrastColor=10d625&receiptScreen=false"));
    startActivityForResult(intent, PAYMENT_REQUEST_CODE);

    If receipt screen is shown after a transaction is performed, user can enter Customer First Name, Last Name and also email and phone number to which the receipts can be sent. If account already has Customers saved from our inside.payanywhere.com then those can be chosen by selecting  icon.

  2. To receive a result on your app, add following code to your activity
         

    	public static String EXTRA_CUSTOMER_NAME = "customerName",
                EXTRA_EMAIL = "email",
    			EXTRA_PHONE_NUMBER = "phoneNumber",
                EXTRA_INVOICE_NUMBER = "invoiceNumber";
    
        @Override
        protected void onActivityResult(int requestCode, int resultCode, Intent data) {
            Log.d(TAG,"onActivityResult requestCode " + requestCode + " resultCode " + resultCode);
            if(requestCode == PAYMENT_REQUEST_CODE || requestCode == PREAUTH_REQUEST_CODE || requestCode == PREAUTH_COMPLETE_REQUEST_CODE || requestCode == REFUND_VOID_REQUEST_CODE ||   	requestCode == TIPS_REQUEST_CODE || requestCode == RECURRING_PAYMENT_UPDATE_REQUEST_CODE || requestCode == RECURRING_PAYMENT_DEACTIVATE_REQUEST_CODE){
                if(resultCode == RESULT_OK){
                    Log.d(TAG,"result ok");
                    showTransactionResponses(requestCode, resultCode, data);
                } else if(resultCode == RESULT_CANCELED){
                    Log.d(TAG,"result cancelled");
                    showTransactionResponses(requestCode, resultCode, data);
                }
            }
        }
    
    	private void showTransactionResponses(int requestCode, int resultCode, Intent data){
            if(data != null){
                String invoiceCustomerName = data.getStringExtra(EXTRA_CUSTOMER_NAME);
                String email = data.getStringExtra(EXTRA_EMAIL);
                String phoneNumber = data.getStringExtra(EXTRA_PHONE_NUMBER);
    			String invoiceNumber = data.getStringExtra(EXTRA_INVOICE_NUMBER);
            }
        }

How to process an ALIPAY sale :

  1. ALIPAY button on payment screen is hidden by default. To use the ALIPAY option to process a sale, pass "showAlipay" parameter in the request.

    private static final String PAYMENT_URL = "payanywhere://payment/";
    private static final int PAYMENT_REQUEST_CODE = 123;
    
    Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(PAYMENT_URL +  "?chargeAmount=2.73&showAlipay=true"));
    startActivityForResult(intent, PAYMENT_REQUEST_CODE);


  2. ALIPAY sale can be processed either by scanning the customer's QR/Barcode on Alipay app or By typing the code in. Device being used needs to have a back camera to use the Scan with Camera option. To receive result back to you app, please see the first section of this document for more details.

                              

How to process an EBT sale :

  1. EBT button on payment screen is hidden by default. To enable EBT option , pass "showEBTSnap" parameter in the request. EBT required a pin supported reader/terminal (i.e. PaxA920, Pax E500, Pax E600 etc)

    private static final String PAYMENT_URL = "payanywhere://payment/";
    private static final int PAYMENT_REQUEST_CODE = 123;
    
    Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(PAYMENT_URL +  "?chargeAmount=2.73&showEBTSnap=true"));
    startActivityForResult(intent, PAYMENT_REQUEST_CODE);


  2. EBT Provided 3 options - Food Benefits, Cash Benefits & Balance Query. 

                                   


3. You can set sdk flag "openEBTScreen" for sdk to go directly to ebt payment screen instead of regular payment screen

Along with other transaction response intent extra mentioned earlier, EBT sale will  pass following 2 additional sdk response intent extra:
transactionType
ebtBalance

Please look into "Example Values/Flags for SDK" table for details.


How to allow Signature On Printed Receipts & Avoid using On Screen (Digital) Signature : Also Prints Merchant & Customer Copy

Pre-requisites:

In order to use this feature, Receipt Screen should be enabled. This can be done under Receipt Settings on SDK or send in the request (Refer to How to pass primary and contrast/accent color for sales, signature and receipt screen in this doc).  If there is no printer connected, then Digital Signature will be displayed.

  1. Signature on paper, is not enabled by default. To allow this option, pass "signOnPaper" parameter in the request.

    private static final String PAYMENT_URL = "payanywhere://payment/";
    private static final int PAYMENT_REQUEST_CODE = 123;
    
    Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(PAYMENT_URL +  "?chargeAmount=2.73&signOnPaper=true"));
    startActivityForResult(intent, PAYMENT_REQUEST_CODE);


How to allow Category selection on sales:

Pre-requisites:

In order to see Categories in the drop down, they need to be created at PayAnywhere Inside: https://inside.payanywhere.com/library

  1. Category selection is allowed only for Sales - Cash/Credit or Pre-Auth creation.
  2. In order to see the option "Select Category" on SDK Payment screen, following parameter has to be passed in the request. 

    private static final String PAYMENT_URL = "payanywhere://payment/";
    private static final int PAYMENT_REQUEST_CODE = 123;
    
    Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(PAYMENT_URL +  "?chargeAmount=2.73&allowCategorySelection=true"));
    startActivityForResult(intent, PAYMENT_REQUEST_CODE);


3. The category added will be visible in Transaction Details, that can viewed on PayAnywhere Inside, pre-fixed to the Item name.

How to pass Notes/Comment to SDK:

1. Receipt Notes can be passed to SDK, this notes will be visible on Payment screen, but cannot be edited. If Receipt Options is enabled on SDK, notes will be populated in Receipt Notes field where edits can be done.

2. These notes will be displayed in Transaction Details, which are available on PayAnywhere Inside https://inside.payanywhere.comAlso shown on digital receipts sent from PA.

3. In order to add notes/comments to transactions, following parameter has to be passed in the request.

private static final String PAYMENT_URL = "payanywhere://payment/";
private static final int PAYMENT_REQUEST_CODE = 123;

Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(PAYMENT_URL +  "?chargeAmount=2.73&receiptNotes=Hey I am note."));
startActivityForResult(intent, PAYMENT_REQUEST_CODE);


How to request Transaction List/Details to be shown on hidden on SDK:

1. Transaction List and details is not available on SDK by default. In order to view the list/details. To show the "Transactions" option in overflow menu, following parameter has to be passed in the request.

private static final String PAYMENT_URL = "payanywhere://payment/";
private static final int PAYMENT_REQUEST_CODE = 123;

Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(PAYMENT_URL +  "?chargeAmount=2.73&showTransList=true"));
startActivityForResult(intent, PAYMENT_REQUEST_CODE);

2. To view the transaction details, click on any one of the transaction in the list.

        

How to request Signature Screen to be shown or hidden:

1. Once a sale is processed, and a parameter is not passed to either show or hide the Signature screen, then the MID Setting "Always Require Signature" of the account will be used. Which is OFF by default. Read section 1 of this doc for more info.

2. In order to control, show/hide Signature screen per transaction, pass "showSignatureScreen" parameter in the request. True if want to show the Signature screen, false to hide it. If none sent, then as mentioned above MID settings will be used.

private static final String PAYMENT_URL = "payanywhere://payment/";
private static final int PAYMENT_REQUEST_CODE = 123;

Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(PAYMENT_URL +  "?chargeAmount=2.73&showSignatureScreen=true"));
startActivityForResult(intent, PAYMENT_REQUEST_CODE);



SDK Supported Request/Flags:

Request ParamTypeExample Values
chargeAmountdouble (2 decimal places)2.73 (must be two decimal value and formatted properly #.##)

itemNameStringYou can also optionally pass another parameter itemName=SomeItemName. This itemName will be used as your sale item name instead of "Express Item".
customerTransactionIdString123456 (A customer transaction id number that can be set by SDK user and will return to caller app upon transaction is completed)
invoiceNumberString123456 (Set a custom invoice number. If not set, then auto generated invoice number will be used.)
externalNotificationbooleantrue/false (for web-hook only)
“externalNotification=true” is to inform
Payanywhere that you would like to receive transaction result on your mentioned external notification URL that you have provided us earlier.
ccDetailsboolean

setting  ccDetails=true in sale and preauth will return android extra
"network", "firstName", "lastName", "inputType" and "last4" if those data exist

 
"network" extra will contain card brand
i.e. VISA, MASTERCARD, AMEX, DISCOVER etc.


"inputType" extra will contain card read input type i.e. EMV, SWIPED, CONTACTLESS, KEYED, BARCODE, BRIC etc


"firstName" will contain card holder first name. 
"lastName" will contain card holder last name. 
"last4" will contain last 4 digit of a card.

recurringAmountdouble (2 decimal places)2.73 (must be two decimal value and formatted properly #.##)

firstName



StringRicky
firstName and lastName and email address are the information of customer who will be enrolling into recurring payment. Our sdk use this info and can send email to customer about their enrollment into an auto recurring payments Or you have to make sure to send an email to customer by yourself during a recurring payment if its a VISA.
lastNameStringSee above ^
emailStringSee above ^
recurringPaymentCCSIdString

ccs_123456

Used for recurring payment update with a new card sale
To update a credit card sale that will be used to perform future recurring payment you have to pass recurringPaymentId and recurringPaymentCCSId i.e. credit card sale unique id. 
When credit card sale unique id is passed in, the following happens: The current recurring payment object is deactivated and a new
recurring payment object is created, pointing to the specified credit card sale object. We will return you the new recurring payment object id.
Also, to use this field, the credit card sale id must already exist (i.e.: it must have already processed a sale).
Currently there is no validation that the card is still valid until we attempt a recurring payment charge.

tipsAmountdouble (2 decimal places)2.73 (must be two decimal value and formatted properly #.##)
refundAmountdouble (2 decimal places)2.73 (must be two decimal value and formatted properly #.##)
transactionUniqueIdStringUsed for Following request:
Void:void_123456
PreAuth: pap_123456
Refund: ccr_123456
Tips: tip_123456
receiptIdlong

123456
Used for following request
Void
Refund,
Preauth Complete


payModeStringpayMode=debit, payMode=ebt, payMode=credit. Based on payMode sdk will start sale on provided mode.
By default if payMode is not exist then payMode=credit will be used
showEBTSnapboolean

True, False

When true then show ebt menu ui on payment screen

openEBTScreenboolean

True, False

When true then directly goto ebt payment screen instead of regular payment screen

isEbtTxn
boolean

True, False

When true, the transaction for void/refund is an EBT transaction. (Only used to Void or Refund an EBT transaction.)




Example Sdk Values Return Values:

Extra/Request ParamTypeExample Values
transactionAction
StringSALE, VOID, REFUND, PREAUTH or PREAUTH_COMPLETE
transactionTypeStringEBT/SNAP Account Balance, EBT/SNAP Cash Benefits, EBT/SNAP Food Benefits
(returned only during EBT transaction)
transactionResult
StringtransactionApproved, transactionDeclined, transactionCancelled, GENERAL_ERROR
requestedAmount
double (2 decimal places)47.33
authorizedAmount
double (2 decimal places)47.33
ebtBalancedouble (2 decimal places)47.33
(returned only during EBT transaction)
authCodeString123456
preAuthCompleteAmount
double (2 decimal places)35.00
recurringAmountdouble (2 decimal places)25.43
transactionUniqueId
StringSale/Preauth_Complete: ccs_123456
Void:void_123456
PreAuth: pap_123456
Refund: ccr_123456
Tips: tip_123456
receiptId
long1234567
receipt id will returned after sale, recurring sale, preauth sale processing

firstName

String

Ricky

lastName

StringJohn

network

String

VISA, MASTERCARD, AMEX, DISCOVER etc

inputType

String

EMV, SWIPED, CONTACTLESS, KEYED, BARCODE, BRIC etc

last4

String1234
recurringPaymentIdlong1234567
recurringPeriodStringdays, weeks, months,
recurringLengthint12
recurringPaymentCCSIdString

ccs_123456
credit card sale id that was used for recurring payment update

isPartialAuth
booleantrue/false
transactionStatusMessage
StringApproved, Declined, "Declined due to invalid request" etc
customerTransactionId
String123456 (A customer transaction id number that can be set by SDK user and will return to caller app upon transaction is completed)
invoiceNumberString

123456 
invoice number used for sale




Notes:
** Visit https://inside.payanywhere.com and login with your PayAnywhere credentials to see your transaction details.