Skip to main content

Notch Pay JavaScript SDK

The Notch Pay JavaScript SDK provides a convenient way to integrate Notch Pay into your JavaScript applications, both on the client-side and server-side with Node.js.

Installation

Client-Side Usage

Initialize the SDK

Open Checkout

Inline Checkout

You can also embed the checkout directly in your page:

Payment Button

Create a payment button with minimal code:

Server-Side Usage (Node.js)

Initialize the SDK

Create a Payment

Retrieve a Payment

List Payments

Create a Transfer

Check Balance

Express.js Integration Example

Here’s a complete example of integrating Notch Pay with an Express.js application:

React Integration Example

Here’s how to integrate Notch Pay with a React application:

API Reference

The JavaScript SDK provides access to all Notch Pay API endpoints:

Payments

  • notchpay.payments.create(data) - Create a payment
  • notchpay.payments.retrieve(reference) - Retrieve a payment
  • notchpay.payments.list(params) - List payments
  • notchpay.payments.cancel(reference) - Cancel a payment

Transfers

  • notchpay.transfers.create(data) - Create a transfer
  • notchpay.transfers.retrieve(reference) - Retrieve a transfer
  • notchpay.transfers.list(params) - List transfers
  • notchpay.transfers.cancel(reference) - Cancel a transfer
  • notchpay.transfers.createBulk(data) - Create a bulk transfer

Customers

  • notchpay.customers.create(data) - Create a customer
  • notchpay.customers.retrieve(id) - Retrieve a customer
  • notchpay.customers.update(id, data) - Update a customer
  • notchpay.customers.list(params) - List customers
  • notchpay.customers.delete(id) - Delete a customer

Beneficiaries

  • notchpay.beneficiaries.create(data) - Create a beneficiary
  • notchpay.beneficiaries.retrieve(id) - Retrieve a beneficiary
  • notchpay.beneficiaries.update(id, data) - Update a beneficiary
  • notchpay.beneficiaries.list(params) - List beneficiaries
  • notchpay.beneficiaries.delete(id) - Delete a beneficiary

Balance

  • notchpay.balance.retrieve() - Check balance
  • notchpay.balance.retrieveCurrency(currency) - Check balance for a specific currency
  • notchpay.balance.history(params) - List balance history

Webhooks

  • notchpay.webhooks.create(data) - Create a webhook
  • notchpay.webhooks.retrieve(id) - Retrieve a webhook
  • notchpay.webhooks.update(id, data) - Update a webhook
  • notchpay.webhooks.list(params) - List webhooks
  • notchpay.webhooks.delete(id) - Delete a webhook

Error Handling

The SDK throws detailed errors that you can catch and handle:

TypeScript Support

The SDK includes TypeScript definitions for all methods and objects:

API Reference

Complete API documentation

PHP SDK

Integrate with PHP applications

Python SDK

Integrate with Python applications