New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dintero/node-sdk

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dintero/node-sdk

Node.js library for the Dintero API

  • 1.1.7
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Dintero Node.js SDK

Build Status

The Dintero Node SDK provides convenient access to the Dintero API from applications written in server-side Javascript

Installation

Install the package with:

npm install @dintero/node-sdk
# or
yarn add @dintero/node-sdk

Usage

To use the Dintero Node.js SDK, you will need to configure it with your API credentials that can be created in the Dintero Backoffice. These credentials include the Client ID, Client Secret, and Audience, which are required for authenticating your requests to the Dintero API.

Example: Client Setup

You first need to create a client with the required credentials:

import { createClient } from "@dintero/node-sdk";

const client = createClient({
    clientId: "your_client_id",   // Replace with your actual client ID
    clientSecret: "your_client_secret",  // Replace with your actual client secret
    audience: "https://api.dintero.com/v1/accounts/your_account_id",
});

export default client;

Example: Session Profile

import { createClient } from "@dintero/node-sdk";

const client = createClient({
    clientId: "your_client_id",   // Replace with your actual client ID
    clientSecret: "your_client_secret",  // Replace with your actual client secret
    audience: "https://api.dintero.com/v1/accounts/your_account_id",
});

const sessionProfileResponse = await client.checkout.POST(
    "/sessions-profile",
    {
        body: {
            url: {
                return_url: "https://example.com",  // Replace with actual return URL
            },
            order: {
                amount: 1000,
                currency: "NOK",
                items: [
                    {
                        id: "item1",
                        line_id: "line1",
                        description: "Item 1",
                        amount: 1000,
                        quantity: 1,
                        vat_amount: 0,
                        vat: 0,
                        eligible_for_discount: false,
                    },
                ],
                partial_payment: false,
                merchant_reference: "ref123",  // Replace with actual merchant reference
            },
            profile_id: "default"
        },
    },
);

console.log("Session Profile Response:", sessionProfileResponse.data);

Example: Fetching Settlement

import { createClient } from "@dintero/node-sdk";

const client = createClient({
    clientId: "your_client_id",   // Replace with your actual client ID
    clientSecret: "your_client_secret",  // Replace with your actual client secret
    audience: "https://api.dintero.com/v1/accounts/your_account_id",
});

const settlementsResponse = await client.core.GET(
    "/accounts/{aid}/settlements",
    {
        params: {
            path: {
                aid: "T12345678",
            },
        },
    },
);

console.log("Settlements Response:", settlementsResponse.data);

Bugs

Bugs can be reported to https://github.com/Dintero/Dintero.Node.SDK/issues

Security

Contact us at security@dintero.com

Building from source

yarn install
yarn run build

FAQs

Package last updated on 07 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc