Testing

Test data and scenarios for the staging environment.

Build and test against staging: https://api-staging.paytomorrow.com/api. Staging simulates the credit bureau, identity checks, address checks, and bank verification, and uses lender sandboxes. Use only made-up customer data.

Rules for every test application

Follow these rules, or the application may be declined:

  • Use a new, random email address and mobile number every time. Staging doesn't send texts, so enter any verification code.
  • Use any random first and last name, and end the last name with the credit score you want, like Testing640.
  • Use a random address, SSN, date of birth over 18, and pay schedule.
  • Card number 4444 3333 2222 1111, any future expiration date, and CVV 123.

Use a new customer every time

Staging remembers customers across applications, just like production. If you reuse a phone number, email, or SSN with different details, the application can go to bank verification or be declined by a lender that sees the phone number or email already belongs to someone else. That looks like a bug in your integration when it isn't.

Generate a fresh name, email, phone number, and SSN for every test application. With Faker:

test-customer.js
import { faker } from '@faker-js/faker';

const firstName = faker.person.firstName();
const lastName = `${faker.person.lastName()}650`; // credit score 650, see below

export const testCustomer = {
  firstName,
  lastName,
  // Use a real mail domain. Mailinator inboxes are public and disposable.
  email: faker.internet.email({ firstName, lastName, provider: 'mailinator.com' }),
  cellPhone: faker.phone.number({ style: 'national' }).replace(/\D/g, ''),
  // Enter these in the application, not in Create order.
  ssn: String(faker.number.int({ min: 100_000_000, max: 899_999_999 })),
  dateOfBirth: faker.date.birthdate({ mode: 'age', min: 25, max: 50 }),
};

Control the credit score with the last name

Staging reads the customer's credit score from the last three characters of the last name. End the last name with three digits to pick a score:

Last nameCredit score used
Rivera640640
Rivera550550
Rivera800 (the default when there are no digits)

The whole last name, digits included, must be longer than 4 characters. Li640 works, Li64 doesn't.

The score decides which lender sees the application:

LenderCredit scoreExample last name
PayTomorrow600 to 700Testing650
Katapult100 to 600Testing550
BreadLeave the number offTesting

You can only reach lenders that are enabled on your staging account.

Special test customers

These values trigger specific results in staging. Names are case-sensitive: NoHitJordan works, nohitjordan doesn't.

Credit report

EnterResult
First name containing NoHit, or SSN 000000000 to 000000009No credit file found
First name containing Freeze, or SSN 999999990 to 999999999Credit report is frozen
SSN 111111111The credit report comes back with a different SSN, so the application asks the customer to check their SSN
Date of birth 12/31/2000The credit report comes back with a different date of birth, so the application asks the customer to check it

Identity and fraud checks

EnterResult
First name containing IIDFails the identity check
First name containing FPFails the fraud score check
Verification code 99999The code is rejected. Any other code is accepted.
An email domain that can't receive mail, such as jordan@example.invalidThe customer is blocked

After a failed identity or fraud check, the customer is asked to verify with their bank or is declined, depending on your lenders.

Address and bank verification

EnterResult
Street 12832 Hopewell Ave with no apartment or suiteThe application asks for an apartment or suite number
Any address in WisconsinThe application asks for marital status and spouse details, as Wisconsin requires
PO Box 123 as the streetCreate order returns a null token
Last name ending in 999Goes through bank verification with Plaid. Sign in to the Plaid sandbox with username user_good and password pass_good. The bank account always matches the customer.

Lender test data

Some lenders show their own payment or signing steps inside the application. If a lender asks for something the rules above don't cover, use these. You only need the ones for lenders on your account.

Payment methodTest data
Card4242 4242 4242 4242, any future expiration, CVV 737
Direct debitChoose Set up Direct Debit and sign in to the Plaid sandbox with username user_good and password pass_good.

Scenarios to run before going live

ScenarioHowExpect
Approved and fundedA score in one of your lenders' ranges, complete and sign, then settlePostbacks with S, then C or L
DeclinedScore below all of your lenders' rangesPostback with U, iframe message pt-decline or pt-error
Customer cancelsUse the application's close or cancel controlReconcile status (O or N when cancellation or abandonment is recorded); iframe message pt-close
Wrong detailsSSN 111111111 or date of birth 12/31/2000The application asks the customer to check their details
Cart out of rangeCreate an order below or above your approval rangenull token
RefundRefund a funded applicationPostback with T
Partial refundPartially refund a funded applicationNew token in the response

Test your postback handler

You don't need a public URL to start. Use the postback builder to send realistic postbacks to localhost. When you're ready for staging to call you, expose your server with a tunnel such as ngrok or Cloudflare Tunnel and use that URL as your notifyUrl.

On this page