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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@42flows/node-red-contrib-visa-api

v0.1.21

Published

Chatbots Studio VISA-API palettes

Downloads

15

Readme

CUSTOM-NODE-VISA-API

This is a custom palette for visa api

Developed by 42flows.tech team.

Table of Contents

Installation

Open terminal in your node-red folder and write next command

npm i @42flows/custom-node-visa-api

Card validation

Perform validations of the payment account

Params

| name | require | description | |----------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------| | country | + | This field must contain the 3-character alpha country code for the country of the originator or funds transfer operator. | | zipCode | + | Zip/Postal code of the funds transfer operator/originator. | | city | + | City of the funds transfer originator/operator. | | state | + | Use a 2-character abbreviated states code or territory code as the state value. Make sure to give a valid state code for given country. | | idCode | + | An identifier for the card acceptor (Funds Transfer Originator). This value should be unique for each originator for whom you are sending transactions | | name | + | Name of the cardAcceptor | | terminalId | + | The identifier for the terminal at a card acceptor location. If sending transactions from a card not present context, use the same value for all transactions. | | primaryAccountNumber | + | The primary account number for which account validations are being performed | | postalCode | + | Postal Code provided by the account holder for the primaryAccountNumber in the request. Required when cardCvv2Value is not present. |

Create alias

Create an alias in the Alias Directory.

To create alias record(s) with recipient's primary account number (PAN) and related data in the Alias Directory.

Params

| name | require | description | |-------------------------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | guid | + | This attribute is uniquely used by an Issuer to identify the payment instrument belonging to a consumer cardholder. An Issuer may pass their existing unique identifier of a cardholder's payment instrument in their system to Visa Alias Directory Service as a guid. For multiple aliases linked to the same payment instrument (e.g., PAN), the same guid should be used. For example: guid abcd12345678z01, alias 85291112222 guid abcd12345678z01, alias 85288881111 | | country | + | Country code belonging to the payment instrument of the consumer as defined by ISO 3166, ISO 3166 alpha-2 is recommended to be used if alias may be used for QR. | | city | - | Consumer’s city belonging to the payment instrument | | consentDateTime | + | Date & time when consumer has provided their consent to Issuer about the use of their personal data for the Visa Alias Directory Service. Format: YYYY-MM-DD hh:mm:ss. Local date and time should be converted to Coordinated Universal Time (UTC) before submitting this value in API request. | | recipientFirstName | + | Consumer’s first name | | recipientLastName | + | Consumer’s last name. Issuers in Russia, Ukraine, Belarus, and Kazakhstan must use only the first letter of a customer’s last name followed by a dot symbol to create or modify an alias record. For example, the alias record for customer John Smith should be created or modified by the Issuer with first and last name fields as 'John S.' | | recipientPrimaryAccountNumber | + | Consumer's card number | | issuerName | + | This is the Issuer name of recipient’s card | | filedAlias | + | This attribute contains the alias data, e.g. phone number, email address, etc. If phone number is used for alias, this should be provided in accordance with ITU-T E.164 (2010) number structure. Here you can find example | | cardType | + | Card type description. Reference to Field 62.23—Product ID of available card products. e.g. Visa Platinum | | aliasType | + | “01” – Phone number “02” – Email address “03” – National ID “04” – IBAN (International Bank Account Number) |

Pull funds transactions

Create Pull Funds Transaction

The PullFundsTransactions Resource debits (pulls) funds from a sender's Visa account (in preparation for pushing funds to a recipient's account) by initiating a financial message called an Account Funding Transaction (AFT)

Params

| name | require | description | |----------------------------|------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | amount | + | The amount of the transaction, inclusive of all fees you assess for the transaction, including currency conversion fees. If the originator is populating the surcharge or foreignExchangeFeeTransaction field, they must be included in the amount field. | | localTransactionDateTime | + | This field contains the local date and time of the transaction takes place originated from merchant, service provider or acquirer. Format: YYYY-MM-DDThh:mm:ss Example: 2011-12-30T21:32:52 | | country | + | This field must contain the 3-character alpha country code for the country of the originator or money transfer operator. | | zipCode | Required if cardAcceptor:address: country is "US" or "CA". | Zip/Postal code of the money transfer operator/Originator. | | state | Required if cardAcceptor:address: country is "US" or "CA". | State or province of the money transfer operator/Originator. | | idCode | + | An identifier for the card acceptor (Visa Direct Originator). This value should be unique for each originator for whom you are sending transactions. | | cardAcceptorName | + | Name of the originator/money transfer operator. | | terminalId | + | The identifier for the terminal at a card acceptor location. If sending transactions from a card not present environment, use the same value for all transactions. | | acquirerCountryCode | + | Use a 3-digit numeric country code for the country of the BIN under which your Visa Direct solution is registered. This must match the information provided during program enrollment. | | acquiringBin | + | The Bank Identification Number (BIN) under which your Visa Direct is registered. This must match the information provided during enrollment. | | senderCurrencyCode | + | Use a 3-character alpha or numeric currency code for currency of the sender. | | retrievalReferenceNumber | + | A value used to tie together service calls related to a single financial transaction. When passing Account Funding Transaction (AFT) and Original Credit Transaction (OCT) methods, this value must differ between the two methods. When passing the Account Funding Transaction Reversal (AFTR) method, this value must match the retrievalReferenceNumber previously passed with the AFT method for this transaction. Recommended Format: ydddhhnnnnnn Where: y - current year 0-9 ddd - day of year 001-365 hh - hourse nnnnnn - can be the systemsTraceAuditNumber or any 6 digit number. | | systemsTraceAuditNumber | + | A unique value should be used for each API method. However, when passing the (AFTR) method, this value must match the systemsTraceAuditNumber previously passed with the AFT method for the current transaction. | | businessApplicationId | + | Identifies the programs' business application type for VisaNet transaction processing For Money Transfer, AA applies to transactions where the sender and recipient are the same person and PP applies to transactions where the sender and recipient are not the same person. Refer to businessApplicationId codes | | senderPrimaryAccountNumber | + | This is a 16-digit PAN or token of the sender's account. | | senderCardExpiryDate | + | This field contains the expiration date for the sender's Visa account number or token in senderPrimaryAccountNumber Format: YYYY-MM Example: 2021-10 |

Resolve

The Resolve API provides recipient's primary account and related data associated with the input Alias.

Note: This node uses v2 router

| name | require | description | |-----------------------|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | alias | + | This attribute contains the alias data, e.g. phone number, email address, etc. If phone number is used for alias, this should be provided in accordance with ITU-T E.164 (2010) number structure. Here you can find example | | businessApplicationId | + | Used to identify program’s business application type for VisaNet transaction processing. It can be PP for Personal payment, MP for Merchant Payment, CO for Cash Out, CI for Cash In. In select countries where available, please use PP to search for an Alias in third party directories using the Alias Lookup API. Please contact your Visa representative for more information. Enum: PP MP CO CI | | aliasType | - | EnumUsed to identify the type of Alias provided in the Alias field. Allowed Alias Types are as listed below Phone Number, Email ID, National ID ,IBAN | | accountLookUp | - | Retrieve the attributes that determine the key characteristics of a recipient payment account before initiating a funds transfer by providing the Primary Account Number (PAN). If such attributes are required, set the value as 'Y'. Default is set as 'N' |

Reverse funds transactions

Create Reverse Funds Transaction

The ReverseFundsTransactions resource credits (pushes back) funds to the sender's Visa account by initiating a financial message called an Account Funding Transaction Reversal (AFTR).

| name | require | description | |----------------------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | amount | + | The total amount to be sent to the recipient. | | localTransactionDateTime | + | This field contains the local date and time of the transaction takes place originated from merchant, service provider or acquirer. Format: YYYY-MM-DDThh:mm:ss Example: 2011-12-30T21:32:52 | | country | + | This field must contain the 3-character alpha country code for the country of the originator or money transfer operator. | | zipCode | + | Zip/Postal code of the funds transfer operator/originator. | | state | + | Use a 2-character abbreviated states code or territory code as the state value. | | idCode | + | An identifier for the card acceptor (Visa Direct Originator). This value should be unique for each originator for whom you are sending transactions. | | nameCardAcceptor | + | This field should contain the name of the originator or the money transfer operator. | | terminalId | + | The identifier for the terminal at a card acceptor location. If sending transactions from a card not present environment, use the same value for all transactions. | | transactionIdentifier | + | The VisaNet reference number for the transaction. You must use the transactionIdentifier from the initial AFT in this field. | | acquirerCountryCode | + | Use a 3-digit numeric country code for the country of the BIN under which your Visa Direct solution is registered. This must match the information provided during program enrollment. | | senderCurrencyCode | + | Use a 3-character alpha or numeric currency code for currency of the sender. | | retrievalReferenceNumber | + | A value used to tie together service calls related to a single financial transaction. When passing Account Funding Transaction (AFT) and Original Credit Transaction (OCT) methods, this value must differ between the two methods. When passing the Account Funding Transaction Reversal (AFTR) method, this value must match the retrievalReferenceNumber previously passed with the AFT method for this transaction. Recommended Format: ydddhhnnnnnn The first fours digits must be a valid yddd date in the Julian date format, where the first digit = 0-9 (last digit of current year) and the next three digits = 001-366 (number of the day in the year). hh can be the two digit hour in a 24 hour clock (00-23) during which the transaction is performed. nnnnnn can be the systemsTraceAuditNumber or any 6 digit number. | | systemsTraceAuditNumber | + | A unique value should be used for each API method. however, when passing the Account Funding Transaction Reversal (AFTR) method, this value must match the systemsTraceAuditNumber previously passed with the AFT method for the current transaction. | | businessApplicationId | + | Identifies the programs' business application type for VisaNet transaction processing For Money Transfer, AA applies to transactions where the sender and recipient are the same person and PP applies to transactions where the sender and recipient are not the same person. | | senderPrimaryAccountNumber | + | The primary account number of the sender's account. | | transmissionDateTime | + | Example: 2016-01-15T07:03:52.000Z | | originalTraceAuditNumber | + | This field must contain the systemsTraceAuditNumber from the original AFT. | | approvalCode | + | The authorization code from the issuer. | | acquiringBin | + | The Bank Identification Number (BIN) under which your Visa Direct is registered. This must match the information provided during enrollment. |

Errors handling

All nodes have output on error. And you can use it for error handling

Error object show like this

{
  status: 400,
  error: {
    errorCode: "",
    message: ""
  }
}

So you have two parameter witch you can navigate. First is http status in most it is 400, 401, 500 and 200, 201, 204 for correct response
But correct use errorCode. If you look at the visa documents you will see that in the section response have errors. This code will be in your error object

Also node has a custom error code.

NODE_ERROR - error in node
ACCESS_ERROR - auth error in most case check your env
VALIDATION_ERROR - visa errors that do not have code

Environment Variables

For this package you must configure a few environment variables:

VISA_API_URL - base url for visa api today this is https://sandbox.api.visa.com

API_KEY-api key for your project

SHARED_SECRET-secret for your project

You can find API_KEY & SHARED_SECRET on your visa dashboard in the tab Credentials