Skip to main content
You’ll create a test postcard, check its status, and then switch to live. Test postcards are free and are never written or mailed, so you can run every step without risk. You need: a Paperjoy account and a terminal with curl.
1

Turn on test mode

In the Paperjoy app, open the account menu in the top right corner and turn on Tryb testowy (Test mode).
The account menu with the Tryb testowy switch.
A Tryb testowy banner stays at the top of every page while test mode is on.
2

Create a test API key

Open Ustawienia → Klucze API (Settings → API keys), enter a name such as quickstart, and click Utwórz klucz (Create key).
The API keys page in test mode, showing a newly created key that starts with pj_test_.
Copy the key now. Paperjoy shows it only once. Check that it starts with pj_test_, then save it in your shell:
3

Create a test postcard

Paperjoy answers with 201 Created and the new postcard:
"test_mode": true confirms that no credit was used. Save the id to look the postcard up later.
The Idempotency-Key header makes retries safe. If the network drops and you’re unsure whether the request worked, resend the exact same request with the same key. Paperjoy returns the original postcard instead of creating a second one. See Create a postcard.
4

Check the status

Shortly after you create it, the status changes from new to queued. A test postcard stops there; it never enters production. The card also appears on the Panel (Dashboard) page while test mode is on.
5

Go live

When your integration works:
  1. Turn off test mode in the account menu.
  2. Buy credits if your balance is empty.
  3. Create a new API key. It starts with pj_live_.
  4. Replace the test key in your integration.
The same request now places a real order and uses one credit.

Next steps

Write the card

Fonts, line breaks, signatures, and how much text fits.

Preview before you order

Render the card as a PNG for free.

Create a postcard

Every field, validation rule, and safe retries.

Handle errors

Status codes, rate limits, and what to retry.