Links

Integration Testing

To ensure that your integration is working, Splitit has enabled test credit cards to let you simulate successful transactions, as well as error values to let you simulate errors.
You can simulate successful transactions in any of our Payment Products, such as Flex Fields, or in the Create API operation, using the numbers below. Your sample CVV can be any three digits for Visa or Mastercard, or any four digits for American Express. The expiration date needs to anything greater than today.
Visa Credit Card - 4111 1111 1111 1111
Mastercard Credit Card - 5555 5555 5555 4444
Amex Credit Card - 3711 111111 11114
You can also generate errors to negatively test your Splitit integration. Follow the trigger instructions for each example below in order to generate its respective error. Note that these are just a subset of Splitit errors, chosen to enable effective testing.

Splitit Internal Validation Errors (500 Range)

502: InvalidInstallmentPlanNumber
Trigger: Pass a value of "111111111111" in the InstallmentPlanNumber field of an API call such as Cancel, Refund, or Update.
Error: "We're sorry. We can't seem to find this installment plan number. Can you please try typing it in again?"
503: InvalidInstallmentPlanStatus
Trigger: Try to run Create or StartInstallments with a plan number for which installments have already been started.
Error: "Invalid Installment Plan Status"
511: InvalidAmount
Trigger: Enter in "10,000,000" as the amount in a call to Create or Initiate.
Error: "Please verify your transaction amount is greater than or equal to the account limit"
520: InvalidCVV
Trigger: Put letters in the CVV field of a Create call, i.e. "abc123."
Error: "Invalid CVV"
521: InvalidCardNumber
Trigger: Use a BIN that doesn't exist, i.e. "4000000."
Error: "Invalid Card Number"
522: InvalidExpirationDate
Trigger: Enter an expiration date in the past.
Error: "Credit Card expiration date is not valid."
524: InvalidEmailFormat
Trigger: Enter "john.doe.splitit.com" into an email field.
Error: "Invalid Email Format."
541: InvalidCCBinNotFound
Trigger: Type in an invalid credit card number like "4333111122224440."
Error: "Sorry, but we cannot find this credit card number (Bin number: {bin}). Please try typing the number in again."
562: RefundRequestedAmountExceededPlanRefundableAmount
Trigger: Call Refund and try to refund more than the plan's value.
Error: "Refund requested amount exceeded the plan refundable amount"
External Gateway Errors (600 Range)
General notes: 1. apart from 641, these tests will not work if 3DS is enabled on a transaction. 2. Error codes for server-to server-API calls are returned in the terminal and errors for the Payment Form are returned on the form itself.
600: GtwyResultGeneralError
Trigger: In a call to Create or using Initiate with the Payment Form, enter Error Test ALL ALL for the parameter BillingAddress -> AddressLine.
Error: "Gateway failed to process request, Please try to use a different card", AdditionalInfo: "Error Test occurred on gateway(Test)"
602: GtwyResultCCDataAVSAddress
Trigger: In a call to Create or using Initiate with the Payment Form, enter Error Address ALL ALL for the parameter BillingAddress -> AddressLine.
Error: "The Card's Address failed validation", AdditionalInfo: "Error Address occurred on gateway(Address)"
609: GtwyResultCCDataInsufficientFunds
Trigger: In a call to Create or using Initiate with the Payment Form, enter Error InsufficientFunds ALL ALL for the parameter BillingAddress->AddressLine.
Error: "Insufficient Funds. Please use a different card", AdditionalInfo: "Error InsufficientFunds occurred on gateway(InsufficientFunds)"
641: GtwyRequire3DAuthentication
Trigger: Call Initiate with "Attempt3DSecure": "true" in your PlanData object. Then call Create, passing in the plan number from Initiate (pass in the plan number by adding "InstallmentPlanNumber": "xxxxxxxxxxxxxxxxxxxx" on its own line).
Error: "Card verification requested", "AdditionalInfo": "Error Enroll3D occurred on gateway(Enroll3D)"
By adding TestMode: fast to your PlanData object in a call to Initiate, you can simulate all of the payments of a plan in a few minutes (as opposed to them taking months, they will take twenty minutes up to a few hours). Once you have added TestMode: fast, you can proceed to apply the test below. PLEASE REMEMBER TO TURN TESTMODE OFF WHEN YOU SWITCH INTO PRODUCTION. Additionally, to see test plans in your Merchant Portal, you will need to select Transactions->Filters->Additional->Include Test Plans.

Test 1

Goal

1st Installment Authorization/Capture Successful, 2nd fails

Procedure

1. In a call to Initiate, enter Error MYCUSTOMERROR filter Authorization FirstInstallmentFinished for the parameter BillingAddress->AddressLine.
2. Use the returned CheckoutURL to check out with the Hosted Payment Solution or the PublicToken to check out with Flex Fields. You can also call Create, passing in the InstallmentPlanNumber from Initiate.
3. View the failed plan sequence in your Merchant Portal (making sure to select Transactions->Filters->Additional->Include Test Plans).

Test 2

Goal
1st Installment Authorization/Capture Successful, 2nd Authorization Successful but 2nd Capture Fails
Procedure
1. In a call to Initiate, enter Error MYCUSTOMERROR filter Capture FirstInstallmentFinished for the parameter BillingAddress->AddressLine.
2. Use the returned CheckoutURL to check out with the Hosted Payment Solution or the PublicToken to check out with Flex Fields. You can also call Create, passing in the InstallmentPlanNumber from Initiate.
3. View the failed plan sequence in your Merchant Portal (making sure to select Transactions->Filters->Additional->Include Test Plans).
By adding "Delay {Length of Desired Delay in Milliseconds}" for the parameter BillingAddress->AddressLine in a call to Initiate or Create, you can simulate a long gateway response:
"PlanData": {
"Amount": {"Value": xxx, "CurrencyCode":"USD"},
"NumberOfInstallments": x,
"RefOrderNumber": "xxxxxx",
"AutoCapture": true,
},
"BillingAddress": {
"AddressLine": "Delay 5000",
Notes:
  1. 1.
    The delay happens upon authorization, so either when you check out with one of the Splitit Payment Products or when you call Create.
  2. 2.
    If you are purely using the APIs and you have the delay in Initiate, be careful not to replace it with new address data from Create or the delay won't work.
Last modified 5mo ago