npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@traund/sdk

v1.1.32

Published

Traund SDK

Readme

Traund SKD

A javascript library to facilitate the use of the money transfer framework in Traund.

It is intended for usage in browsers.

Installation

The library is UMD compatible, you can download [sdk.bundle.js] and host it at your site or use a CDN such as Unpkg CDN :

<script src="https://unpkg.com/@traund/sdk/build/sdk.bundle.js"></script>

How to use

This library allows you to make money transfers (send or receive) through the Traund platform. To use it you need the integration credentials that are sent to the partner merchant.

Receive payments

You can use this example to start receiving payments using the Traund SDK.

    // Initialize client with name of your database and PUBLIC token
    const app = new TraundApp();

    //Interactions take Id of user and Id of item
    app.init(
    params  :{
        token: 'merchant-token',
        paymentMethods: ['TRANSFER'],
        storeId: ,
        sdkMode: 'REGULAR_PAY',
        language: 'en',
        theme: 'light',
        isSandbox: true,
        metadata: {
            sender: {
                email: '[email protected]',
                firstName: 'Test',
                lastName: 'Customer',
                identificationCountry: 'PE',
                identificationType: 'ID_CARD',
                identificationNumber: '44444444',
                phonePrefix: '+1',
                phoneNumber: '987654321',
            },
            receiver: {
                email: "[email protected]",
            },
            split:[]
        },
        request_data: {
            storeId: 'transaction-calculate-id',
            amount: 100,
            country: "US",
            currency: "USD",
            appliedFee: true
        },
    }, 
    callback, 
    callbackArgs : [callbackParam1, callbackParam2, callbackParam3]
    );

You can follow the recommendations in the Traund documentation, the parameters needed to initialize the component are detailed below.

  • token : Token generated with the authorization credentials you provide to the partner merchant. This is obtained by invoking the authorizate endpoint.

  • paymentMethods : SDK metadata that enable one of two options to make the payment possible. Possible values: ['TRANSFER'|'CARD']

  • sdkMode : usage mode, indicates whether the client will send user's information to traund SDK.

    Possible values:[REGULAR_PAY|DIRECT_PAY].

    REGULAR_PAY => means a normal Traund's transference, and where the payer metadata is not mandatory and can be filled in the process.

    DIRECT_PAY => means using traund as a direct payment method. Where the payer's data is mandatory and there is no step during the process where they will be filled out.

  • language : Possible values: [en|es].

  • theme : Possible values: [light|dark].

  • isSandbox : It's optional. It should only be sent with the value "true", when testing in the sandbox environment.

  • metadata : Data required for SDK invocation.

    sender => Payer data, required if sdkMode is DIRECT_PAY.

    | Name | Type | Detail | | ------ | ------ |------------ | | email | string | Required.| | firstName | string | Required.| | lastName | string | Required.| | identificationCountry | string | Required. Country Codes Alpha-2| | identificationType | string | Required. Possible values: ID_CARD-ID_BUSINESS-PASSPORT-RESIDENCE_PERMIT| | identificationNumber | string | Required.| | phonePrefix | string | Required.| | phoneNumber | string | Required.|

    receiver => Receiver data, required if sdkMode is DIRECT_PAY.

    | Name | Type | Detail | | ------ | ------ |------------ | | email | string | Required.|

    request_data => Required transaction data.

    | Name | Type | Detail | | ------ | ------ |------------ | | storeId | string | Optional. Identifier of the calculated amount of the transfer to be made. This is obtained by invoking the calculation endpoint.| | amount | number | Required.| | country | string | Required. Country Code Alpha-2.| | currency | string | Required. Currency Code| | appliedFee | boolean | required if paymentMethods include CARD|

Callback

The use of a callback function is required. This must receive as first parameter a "response" object, here the result of the operation performed through the SDK will be returned.

Additional parameters can be sent through the array "callbackArgs", which will be sent to the callback with the object "response".


    function customCallback(response, callbackParam1) {
        console.log(response, param);
    }

    var callbackParam1 = "Thanks for using Traund SDK";
    app.init(params , customCallback, callbackArgs : [callbackParam1, callbackParam2, callbackParam3]);

Response Object

It is the first parameter defined in the "callback" function where the result of the operation is sent.

For example:


    //Interactions take Id of user and Id of item
    {
        "success": true,
        "message": "Transaction successfully updated",
        "data": {
            "transaction": {
                "id": "63186a7ec8437ae8c46658a7",
                "statusCode": 200,
                "statusName": "Deposited",
                "currency": "USD",
                "amount": 100.00,
                "createdAt": "2022-09-07T09:55:10.112Z"
            },
            "user": { 
                "email": "[email protected]",
                "status": "registered", 
                "kyc": {
                    "required": true,
                    "status": "unregistered"
                }
            }
        }
    }

Response description:

  • success : Operation result flag.

  • message : Operation result description.

  • data : Result object.

    transaction => Transaction data.

    | Name | Type | Detail | | ------ | ------ |------------ | | id | string | Traund ID| | statusCode | number | Status code| | statusName | string | Status description| | currency | string | Receiver currency | | amount | number | Receiver amount| | createdAt | date | Created date|

    user => User data.

    | Name | Type | Detail | | ------ | ------ |------------ | | email | string | Traund ID| | status | string | User status| | kyc.required | boolean | required compliance validation flag.| | kyc.status | string | Compliance Status.|

    KYC Validation

    All persons performing transactions using the Traund payment button through the SDK must undergo a mandatory identity validation process.

    SDK response will return the result of this validation in the data.user.kyc.required field, indicating whether the person is required to undergo the process.

    It is the responsibility of each customer to ensure that the person making the payment has undergone a KYC process; if this process cannot be validated, the transaction will not be completed.

    In addition, it is possible to use our compliance services to meet the identity validation requirement, please contact your dedicated sales advisor for more information.

Integration Example (In construction)

1. Authorize SDK with your credentials.

2. Calculate amount to transfer.

3. Create TraundApp instance.

3. Evaluate callback response.