Netsuite Card Payouts App For Accounts Payable_whitepaper.pdf

Card Payouts Toolkit for NetSuite

Developer Guide

Version 1.0


Important Note on Confidentiality and Copyright

The Visa Confidential label signifies that the information in this document is confidential and proprietary to Visa and is intended for use only by Visa Clients subject to the confidentiality and feedback provisions in the Visa Core Rules and Visa Product and Service Rules.

This document is protected by copyright restricting its use, copying, distribution, and decompilation. No part of this document may be reproduced in any form by any means without prior written authorization of Visa.

Visa and other trademarks are trademarks or registered trademarks of Visa.


About This Guide

1. Overview

The Card Payouts application enables corporate (treasury) banks to offer the Visa Direct payout service to their enterprise clients. This guide is for developers and system integrators who are working on behalf of a corporate bank to customize the Card Payouts application for their clients. Part 1 of this guide walks through how to use the various components of the Card Payouts Toolkit to build a SuiteApp application that is customized for your bank and integrates with the NetSuite enterprise resource planning (ERP) system. Part 2 shows how to validate your SuiteApp in a NetSuite environment.

About Visa Direct

Visa Direct is a digital payment capability that enables enterprises and financial institutions to move money to billions of endpoints worldwide over the Visa network, using card numbers or financial account numbers to route the payments. With Visa Direct, a financial institution can offer enterprise clients an efficient, secure and seamless way to disburse funds directly to a recipient’s eligible Visa Debit or Visa Prepaid card. This makes it possible for enterprises to pay employees, vendors, customers or others in real time, 24/7/365, without the need to manage batch files or rely on slower payout methods.

Visa Direct can provide many benefits to enterprises:

• Speed and control: Payees can get fast and simple access to funds, with digital payments that are available in 30 minutes or less after being requested. • Modern digital experiences: Enterprises can deliver the fast, simple, connected payment experiences that payees expect. • Real-time processing: Payments are processed in real-time, 24/7/365. • Reduced costs: All-digital payments can reduce the direct and indirect cost of payments made currently with paper checks.

Connecting Visa Direct to ERP systems

One of the primary ways that an enterprise can access Visa Direct services is through its ERP system. To enable this integration, a corporate bank provides its enterprise clients with the Card Payouts application that adds an accounts payable (A/P) module to the client’s ERP system. The enterprise can then trigger a push-to-card payout directly from its ERP system, and Card Payouts will use Visa Direct to route funds from the corporate bank to the recipient’s card issuing bank.


Introduction to the Card Payouts Toolkit for NetSuite

This Card Payouts Toolkit for NetSuite is an application framework consisting of NetSuite custom components and various scripts, including client scripts, user event scripts, Suitelets and workflows. It extends NetSuite’s standard functionality and enables users to perform payment-related tasks like debit card registration and invoice processing. The framework provides readily available email templates for each payee communication required and includes pre-configured searches for reporting and reminders. It also supports debit card information management for eligible payees through a self-service portal in the NetSuite Vendor Center.

Before you get started

The Card Payouts application requires a corporate bank that will serve, directly or indirectly, as the card-on-file/token service provider and payment processor.

If you are using this guide, we will assume that you are working on behalf of a corporate bank that can meet this requirement, that you have sufficient familiarity with NetSuite features and functionality, and that you have access to a NetSuite sandbox and production environment.


Terminology used in this guide

The following terms are used throughout this guide:

• Corporate Bank – This is the enterprise client’s bank (also known as the “treasury bank”). Funds will be transferred from this bank to the payee during the payment process. • Payment Processor – This entity connects to VisaNet and is responsible for processing the transaction. • Token Service Provider – This entity stores the recipients’ card number on file and tokenizes it. The token number is shared with the enterprise, who will then store and use it when requesting the corporate bank make a payout transaction. • Issuing Bank – This is the bank that has issued the payee’s debit card and that will receive the disbursed funds. • Vendor – This can be any payee with a debit card enrolled in the Card Payouts application. • Enterprise – This is the payer entity, i.e. the company that is managing accounts payable processes and paying out funds to payees. • NetSuite Vendor Center – This is a module within NetSuite where enterprises can manage their vendors and vendors can manage their information (including debit card details). • SuiteApp – This is the Card Payouts application built by the corporate bank and embedded into their enterprise client’s existing NetSuite ERP system.


2. Technical requirements and deployment

Corporate bank requirements

To use the Card Payouts Toolkit, your bank must meet the following minimum requirements:

• Must be a Visa Direct-enabled corporate bank. • Has the ability to provide access tokens and process debit card number tokenization to authenticate to and from NetSuite. • Has an embeddable widget or secure hosted page that can be triggered from NetSuite to capture and store debit card details. • Has an API to support enrollment and unenrollment of existing debit cards. • Has an API that can receive payment details from a NetSuite application, push funds to a target recipient’s bank account, and send payment confirmation back to NetSuite. • Has the ability to generate a bank reconciliation file for reporting to the NetSuite system. • Can perform NetSuite scripting and customization, or has a NetSuite Implementation Partner who can perform these tasks.

NetSuite requirements

Before you validate the Card Payouts application in your NetSuite environment, navigate to Setup > Company > Enable Features in NetSuite and make sure that the following are enabled:

Suite Cloud sub-tab:

• CUSTOM RECORDS • CUSTOM CODE • SERVERSIDE SCRIPTING • WORKFLOW

Accounting and CRM sub-tab:

• ACCOUNTING • INTRANSIT PAYMENTS • CRM

Card Payouts Toolkit deployment

We recommend that you deploy the Toolkit using the NetSuite SuiteCloud Development Framework (SDF):

• First, download the Card Payouts Toolkit zip file from the Visa Developer Center. • Then, use SDF to deploy the Card Payouts Toolkit zip file to your NetSuite environment.

3. Card Payouts roles

The Card Payouts Toolkit includes pre-configured custom roles associated with various payout processes in the Card Payouts application. Your enterprise clients will assign these roles to employees or vendors who have access to NetSuite.

Role Descriptions

Role Description
Card Payouts A/P Clerk Performs standard A/P clerk functions with the ability to manage debit cards directly with the specified Token Service Provider.
Card Payouts Contractor Center Performs standard NetSuite Vendor Center functions and enables vendors to manage their own debit cards directly with the specified Token Service Provider.
Card Payouts Controller Oversees the following Card Payouts activities: Corporate Bank Management, Card Payouts Preference, Payment Disbursement, Payment Reconciliation.
Card Payouts Admin Executes all application-specific scripts and workflows related to the Card Payouts application.

Part 1: Building a Card Payouts application for NetSuite (SuiteApp)

The Card Payouts Toolkit for NetSuite enables you to build a standalone application that is customized for your corporate bank. The resulting application (a SuiteApp) will be ready to distribute to your enterprise clients through the NetSuite marketplace.

3.1 Customize your corporate bank integration scripts

Update Access Token request function

Step 1: Log in to NetSuite as an Administrator.

Step 2: Navigate to Documents > Files > File Cabinet.

Step 3: In the left pane, expand the folder SuiteApps > com.visa.cardpayouts and click Library.

Step 4: Click Edit next to VDSA_LIB_TokenService.js.

Step 5: Under Media Item, click Edit to open the script file.

Step 6: Find the requestAccessToken function and add your bank’s corresponding API for authentication.

Add your corporate bank’s Webhook API logic

Next, add the API logic that will establish the connection between your corporate bank and NetSuite.

Step 1: Log in to NetSuite as an Administrator.

Step 2: Navigate to Documents > Files > File Cabinet.

Step 3: In the left pane, expand the folder SuiteApps > com.visa.cardpayouts and click Library.

Step 4: Click Edit next to VDSA_LIB_TokenService.js.

Step 5: Under Media Item, click Edit to open the script file.

Step 6: Find the webhookRegistration function and add your bank’s corresponding API for the webhook.

View debit card management scripts

Step 1: Log in to NetSuite as an Administrator.

Step 2: Go to Documents > Files > File Cabinet.

Step 3: In the left pane, expand SuiteApps > com.visa.cardpayouts and click the Vendor Management folder.

3.3 Customize debit card management scripts

To update the necessary scripts to successfully integrate the enroll and unenroll functionality of your corporate bank.

Update the Token Library script for enroll and unenroll debit details:

Step 1: Log in to NetSuite as an Administrator.

Step 2: Go to Documents > Files > File Cabinet.

Step 3: In the left pane, expand SuiteApps > com.visa.cardpayouts and click the Library folder.

Step 4: Click Edit next to VDSA_LIB_TokenServices.js.

Step 5: Under Media Item, click Edit. The script file editor will pop up in a separate window.

Step 6: Update the enrollToken function to update your corporate bank’s request and response processing details.

Step 7: Update the unenrollToken function to update your corporate bank’s request and response processing details.

3.5 Customize Card Payouts payment disbursement

Update the Payment API in the Token Library script
You will need to add your corporate bank’s corresponding payment API logic to the script to process vendor payments.

Step 1: Log in to NetSuite as an Administrator.
Step 2: Go to the Card Payouts Library folder in the File Cabinet.

Step 3: Click Edit next to the VDSA_LIB_TokenService.js script.

Step 4: Under Media Item, click Edit and find the paymentTransaction function.

4. Card Payouts General Preference

4.1 About the Card Payouts General Preference page

The General Preference page will give your Administrator or Card Payouts Controller the ability to set up your Card Payouts application preferences. The page is created using a Suitelet and linked with a custom record.

Corporate Bank tab

Field Description
Username Enter the username provided by your corporate bank.
Password Enter the password provided by your corporate bank.
Merchant Enter the source merchant name or code.
Endpoint URL This will enable NetSuite to connect to your corporate bank's access point.
... ...

Email Notification tab

Field Description
Company Name Enter the company name that will be used in the email.
Enable Card Email Notification This checkbox enables/disables email notification.
Email Author This is the employee or user that will be the sender or author of the email.
Email Subject Enter or customize the email subject line.
Email Body Enter or customize the email body copy.

4.3 Customize the Card Payouts General Preference record

The Card Payouts General Preference record stores the data entered on the Card Payouts General Preference page. You can customize the record to meet your data storage needs.

Make a copy of the default record

Step 1: Log in to NetSuite as an Administrator.

Step 2: Go to Customizations > Lists > Records & Fields > Record Types. Locate Card Payouts Preference.

Step 3: In the Card Payouts Preference List, click Edit.

Step 4: Click Actions > Make Copy, and then set Name. Click Save.

5. Card Payouts debit card management

The Card Payouts Debit Card Management feature allows a user with an A/P Clerk or Contractor Center role to manage debit card enrollment and details.

5.1 Enroll a vendor debit card

STEP 1: From the Card Payouts Preference page, log in to NetSuite as a user with either an A/P Clerk or Contractor Center role.

STEP 2: On the vendor record, click Manage Card Payouts button > Add Debit Details to build the corporate bank form.

6. Card Payouts payment disbursement

This function enables the Card Payouts Controller to manage all activities related to bill payments in the Card Payouts application.

6.1 Single payment processing

STEP 1: Log in to NetSuite as a Card Payouts Controller.
STEP 2: Navigate to Card Payouts > Corporate Bank > Bill Payment. Select a Payee, and then select a bill that you want to pay.
STEP 3: Create a payment and then select a payment option to initiate processing.

6.2 Bulk payment processing

STEP 1: Log in to NetSuite as a Card Payouts Controller.
STEP 2: Navigate to Card Payouts > Corporate Bank > Bulk Billing > Bulk Vendor Payments.

6.3 Related custom records, scripts and workflows

Related Custom Record/ Workflow/ Scripts Description
Workflow Name: VDSA Card PayoutsPayment Processing This workflow handles automatic re-processing, manual re-processing and payment confirmation based on bank responses.

Commercialization support partner

Visa has partnered with a consulting service company who supports Card Payout Toolkit implementations and NetSuite configurations.