https://rest.staging.nickel.com, runs the same API as production with no real money behind it. Card payments go to a card processor’s test environment, and bank (ACH) payments go to a test bank. This page gives you the card numbers and bank details to pay with, and the amounts and words that make a payment fail, settle or come back, so you can build against each outcome in minutes instead of days.
Prose on this page says invoice. In the API, an invoice is a
paymentLink.Paying an invoice in the sandbox
Create an invoice as Send an Invoice and Get Paid shows, then open itsurl in a browser. That’s the checkout page your customer would see. Pay it with the card numbers or bank details below.
Use an email address you control, or one at example.com, as the payer’s email. Nickel sends the payer a receipt, as it would in production.
Card payments
Enter any future expiry date and any three-digit CVV with these cards.
A card is declined by the amount charged, not by its number. Any charge between $2,000.00 and $2,999.99 is declined. The amount charged includes your customer’s share of the platform fee, so check the total on the Pay button. A $2,750.00 invoice with a 2.9% share comes to $2,829.75, and is declined.
A declined card leaves the payment
FAILED, sends no webhook event, and leaves the invoice open. Your customer sees the decline on the checkout page and can pay with another card.
Testing a disputed payment
A dispute, or chargeback, is your customer asking their card issuer to take a card payment back. Pay with4023 8984 9398 8028 to test one. The charge succeeds, and a few minutes later the dispute opens:
- The payment moves from
SUCCEEDEDtoFAILED, and Nickel sendspayment.disputed. - The invoice reopens, so your customer can pay it again.
Bank (ACH) payments
On the checkout page, choose Pay by Bank and enter any valid routing number, such as021000021, with any account number.
In production, a bank payment takes a few business days to settle. In the sandbox it settles about 15 to 20 minutes after your customer pays, so you can follow the whole lifecycle in one sitting:
- Your customer pays. The payment is
PENDING, and Nickel sendspayment.made. - About 15 to 20 minutes later, the debit settles. The payment is
SUCCEEDED, and Nickel sendspayment.succeeded.
Testing a returned payment
A customer’s bank can return a bank payment after it settles, for example when the account has insufficient funds. To test a return, put the wordreturn, in lowercase, in the invoice’s memo when you create the invoice. When your customer pays it by bank, the payment settles and is then returned:
- The payment ends
FAILED, and Nickel sendspayment.failed. You may receivepayment.succeededfirst, so act on the status you fetch, not on the order events arrive in. - The invoice reopens, so your customer can pay it again.
Nickel Banking
Adding money to an account
A new sandbox account has no money in it. To add some, have another company send it an ACH credit withPOST /sandbox/nickelBanking/accounts/{accountId}/inboundAchCredits:
amountCents is in cents, so 50000 is $500.00. The sandbox bank accepts the credit at once, and the account’s balanceCents rises within a few seconds, once Nickel books it.
Testing Debit Protection
Debit Protection holds an ACH debit when another company, such as a payroll provider, a tax agency or a vendor on autopay, pulls money from a Nickel Banking account. In production only that company can start one. In the sandbox, you start one yourself withPOST /sandbox/nickelBanking/accounts/{accountId}/inboundAchDebits.
1
Turn Debit Protection on
2
Have a company pull a debit
Name the company and its ACH Company ID, as a real debit would carry them. Both are optional:Nickel answers
201 with what it sent the sandbox bank:amountCents is in cents, so 1234 is $12.34. The debit stays pending for 20 minutes, until automaticallyResolvesAt.3
Decide the hold
Within a few seconds, Nickel holds the debit and sends
held_debit.held. Fetch the held debit, then allow or block it. Its decideBy is 5 minutes before automaticallyResolvesAt, so you have about 15 minutes.- Allow it. Nickel sends
held_debit.allowed. AtautomaticallyResolvesAt, the bank takes the money if the account has it. - Block it. Nickel sends
held_debit.blocked, and the money stays in the account. - Leave it. At
decideBy, Nickel blocks it, itsstatusbecomesEXPIRED_BLOCKED, and Nickel sendsheld_debit.blocked. - Allow the company. Allow a hold with
"alwaysAllowCompany": true, then pull another debit with the samecompanyId. It isn’t held: itsstatusisAUTO_ALLOWED, and no event is sent. - Turn Debit Protection off while a debit is held. Nickel allows it and sends
held_debit.allowed.
ALLOWED or AUTO_ALLOWED. To watch one post, add money to the account first.
Production answers this request with 400.
Where to go next
How payments work
Each payment status, and what moves a payment between them.
Webhook events
What each payment event means, and what to do when it arrives.
