Skip to content

Developers

Payments infrastructure you can build on.

A predictable REST API, native mobile SDKs and webhooks for every event. Prototype in test mode, then go live with a single key swap.

SDKs and libraries

Quickstart

Your first charge in three steps.

Copy, paste and run. Every example below works against the sandbox with your test key.

  1. 01

    Install a library

    Server libraries for Node.js and Python, and native SDKs for iOS and Android.

    npm install @justpay/node
  2. 02

    Create a charge

    Charge a card with a single API call. Amounts are in the smallest currency unit.

    curl https://api.justpay.example/v1/charges \
      -H "Authorization: Bearer $JUSTPAY_SECRET_KEY" \
      -d amount=485000 \
      -d currency=JMD \
      -d payment_method=pm_card_visa \
      -d description="Table 12, Harbour Street Kitchen"
    201 CreatedResponseTest mode
    {
      "id": "ch_3Kx9TqLm2Vb7",
      "status": "succeeded",
      "amount": 485000,
      "currency": "JMD",
      "settlement": {
        "bank_account": "•••• 1187",
        "eta": "next_business_day"
      },
      "livemode": false
    }
  3. 03

    Listen for webhooks

    Get notified when payments succeed, refunds complete and payouts land in your bank.

    const raw = express.raw({ type: "application/json" });
    
    app.post("/webhooks/justpay", raw, (req, res) => {
      const event = justpay.webhooks.verify(
        req.body,
        req.headers["justpay-signature"],
        process.env.JUSTPAY_WEBHOOK_SECRET,
      );
    
      if (event.type === "payout.paid") {
        // Mark the day's orders as settled in your books
      }
    
      res.sendStatus(200);
    });

Test mode

Break things safely in the sandbox.

Every account comes with a full test environment. Use test keys and test cards to simulate payments, declines, refunds and payouts. No real money moves until you switch to live keys.

  • Separate test and live API keys, so you never mix them up
  • Toggle your dashboard between test and live data
  • Trigger any webhook event on demand to test your handlers
  • Simulate declines, 3D Secure and network errors

Test cards

Test mode only
Card numberBrandResult
4000 0018 7600 0001VisaPayment succeeds
5200 0018 7600 0002MastercardPayment succeeds
4000 0018 7600 0119VisaDeclined: insufficient funds
4000 0018 7600 3155VisaRequires 3D Secure

Use any future expiry date, any 3 digit CVC and any billing postcode.

No code options

Not writing code? Start with a plugin.

  • WooCommerce

    Official plugin for WordPress stores.

  • Shopify

    Add Just Pay as a payment method.

  • Collect Checkout

    Hosted payment page and payment button generator.

  • Payment links

    Create links from the dashboard or the API.