Skip to content

Developers

Build on the grid.

Everything you need to take your first payment, wire up webhooks and ship rules from code. Most teams process a test payment in under ten minutes.

01 / Quickstart

Your first payment in three moves.

Everything below runs against the sandbox, so nothing real is charged while you build.

  1. 01

    Install the SDK

    Add the official library to your project. Every SDK is typed and generated from the same spec as the API.

    terminal
    npm install @nyoripay/node
  2. 02

    Create a payment

    Use your sandbox secret key on the server. Pass an idempotency key so retries can never charge twice.

    create-payment.js
    import NyoriPay from '@nyoripay/node'const nyori = new NyoriPay(process.env.NYORI_SECRET_KEY)const payment = await nyori.payments.create({  amount: 4200,  currency: 'eur',  customer: 'cus_8fK2nQ',  payment_method: 'pm_card_visa',  routing: { strategy: 'adaptive' }}, {  idempotencyKey: 'order_1042'})console.log(payment.status) // 'succeeded'
  3. 03

    Listen for events

    Verify the signature on every webhook, answer with a 200, then fulfill the order in the background.

    webhooks.js
    app.post('/webhooks/nyoripay', express.raw({ type: 'application/json' }), (req, res) => {  const event = nyori.webhooks.verify(    req.body,    req.headers['nyori-signature'],    process.env.NYORI_WEBHOOK_SECRET  )  if (event.type === 'payment.succeeded') {    fulfillOrder(event.data.object)  }  res.sendStatus(200)})

02 / SDKs

Your language. Our types.

Six official libraries, versioned together and generated from the same spec as the API, so a new feature lands everywhere on the same day.

  • Node.js

    v4.2
    npm install @nyoripay/node
  • Python

    v4.1
    pip install nyoripay
  • Go

    v4.2
    go get github.com/nyoripay/nyoripay-go/v4
  • Ruby

    v4.0
    gem install nyoripay
  • PHP

    v4.1
    composer require nyoripay/nyoripay-php
  • Java

    v4.2
    implementation "com.nyoripay:nyoripay-java:4.2.0"

03 / API reference

Predictable by design.

Resource-oriented URLs, JSON everywhere and standard HTTP status codes. Authenticate with your secret key and you are in.

Base URL

https://api.nyoripay.com

Current version

2026-11-01

  • Payments

    Charge a card, wallet or bank account.

    • POST/v1/paymentsCreate a payment
    • GET/v1/payments/:idRetrieve a payment
    • POST/v1/payments/:id/captureCapture an authorized payment
    • POST/v1/payments/:id/cancelCancel before capture
  • Checkout sessions

    Hosted and embedded checkout flows.

    • POST/v1/checkout/sessionsCreate a session
    • GET/v1/checkout/sessions/:idRetrieve a session
    • POST/v1/checkout/sessions/:id/expireExpire a session
  • Customers

    Store buyers and their saved payment methods.

    • POST/v1/customersCreate a customer
    • PATCH/v1/customers/:idUpdate a customer
    • DELETE/v1/customers/:idDelete a customer
  • Refunds

    Return money in full or in part.

    • POST/v1/refundsCreate a refund
    • GET/v1/refunds/:idRetrieve a refund
  • Webhook endpoints

    Where and which events get delivered.

    • POST/v1/webhook_endpointsRegister an endpoint
    • GET/v1/webhook_endpointsList endpoints
    • POST/v1/events/:id/replayReplay an event
  • Rules

    Program fraud, routing and approval logic.

    • POST/v1/rulesCreate a rule
    • PATCH/v1/rules/:idUpdate a rule
    • POST/v1/rules/:id/simulateSimulate against past traffic
    • POST/v1/rules/:id/publishPublish a rule

04 / Webhook events

Every state change, on the wire.

Subscribe each endpoint to exactly the events it needs. These are the ones most integrations start with.

Common NyoriPay webhook event types
EventFires when
payment.succeededA payment was authorized and captured.
payment.failedA payment attempt was declined or errored. Includes the decline code.
payment.requires_actionThe buyer has to complete a 3DS challenge or a redirect.
checkout.session.completedA buyer finished a hosted or embedded checkout.
refund.createdA full or partial refund was issued.
dispute.openedA cardholder disputed a payment. The evidence due date is included.
rule.triggeredA Smart Rule matched a payment and took its action.
routing.failoverSmart Payments moved traffic away from a degraded processor.
payout.paidFunds landed in your bank account.

05 / Sandbox

Break things safely.

The sandbox mirrors production, including declines, disputes and 3DS challenges. Use any future expiry date and any three-digit security code.

Two sets of keys

Test keys start with nyp_test_ and live keys with nyp_live_. Same endpoints, same code.

Free and unlimited

Run as many test payments, refunds and webhook deliveries as you like. Nothing in the sandbox is ever billed.

Sandbox test card numbers and what they do
Card numberBrandResult
4111 1111 1111 1111VisaPayment succeeds
5555 5555 5555 4444MastercardPayment succeeds
4000 0000 0000 3220VisaRequires a 3DS challenge
4000 0000 0000 9995VisaDeclined for insufficient funds
4000 0000 0000 0002VisaDeclined by the issuer

Jack in

Keys in hand, code in flight.

Request sandbox access and start building against the real API today. Questions about your integration? Our engineers answer those too.