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 CVV123.
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:
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 name | Credit score used |
|---|---|
Rivera640 | 640 |
Rivera550 | 550 |
Rivera | 800 (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:
| Lender | Credit score | Example last name |
|---|---|---|
| PayTomorrow | 600 to 700 | Testing650 |
| Katapult | 100 to 600 | Testing550 |
| Bread | Leave the number off | Testing |
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
| Enter | Result |
|---|---|
First name containing NoHit, or SSN 000000000 to 000000009 | No credit file found |
First name containing Freeze, or SSN 999999990 to 999999999 | Credit report is frozen |
SSN 111111111 | The credit report comes back with a different SSN, so the application asks the customer to check their SSN |
Date of birth 12/31/2000 | The credit report comes back with a different date of birth, so the application asks the customer to check it |
Identity and fraud checks
| Enter | Result |
|---|---|
First name containing IID | Fails the identity check |
First name containing FP | Fails the fraud score check |
Verification code 99999 | The code is rejected. Any other code is accepted. |
An email domain that can't receive mail, such as jordan@example.invalid | The 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
| Enter | Result |
|---|---|
Street 12832 Hopewell Ave with no apartment or suite | The application asks for an apartment or suite number |
| Any address in Wisconsin | The application asks for marital status and spouse details, as Wisconsin requires |
PO Box 123 as the street | Create order returns a null token |
Last name ending in 999 | Goes 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 method | Test data |
|---|---|
| Card | 4242 4242 4242 4242, any future expiration, CVV 737 |
| Direct debit | Choose 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
| Scenario | How | Expect |
|---|---|---|
| Approved and funded | A score in one of your lenders' ranges, complete and sign, then settle | Postbacks with S, then C or L |
| Declined | Score below all of your lenders' ranges | Postback with U, iframe message pt-decline or pt-error |
| Customer cancels | Use the application's close or cancel control | Reconcile status (O or N when cancellation or abandonment is recorded); iframe message pt-close |
| Wrong details | SSN 111111111 or date of birth 12/31/2000 | The application asks the customer to check their details |
| Cart out of range | Create an order below or above your approval range | null token |
| Refund | Refund a funded application | Postback with T |
| Partial refund | Partially refund a funded application | New 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.