1.131.0 • Published 1 month ago

@stockpile/greendot-sdk v1.131.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 month ago

Greendot SDK Package

How to use

Method 1 (recommended)

import { getClients } from "@stockpile/greendot-sdk";

const config = {
  baseUrl: "https://aws-bass.greendot.com/baas/v1",
	username: "your-username",
	password: "your-password",
	programCode: "my-company-program-code",
	timeoutMs: 3000,
	envType: "PIE",
	spkiPublicKey: "public-key-for-encryption",
};
const clients = getClients(config);
// Ideally, store the clients object globally and initialize once on server start...
const {  baseClient,  cardClient,  accountClient,  purseClient,  transactionClient,  userClient } = clients;
// 2. use the client are per requirement
const transactions = await transactionClient.getTransactions({accountId: "123"});

Method 2

In method 1, we initialized all clients, we can initialize only the required client

import { GreendotBaseClient, GreendotTransactionClient } from "@stockpile/greendot-sdk";

const baseClient = new GreendotBaseClient(config);
const transactionClient = new GreendotTransactionClient({ baseClient })

DOCUMENTATION

Account Client

  1. searchAccounts: Search Accounts by mobile, date-of-birth, email or ssn
  2. getAccountDetails: Get details of account like accountNumber, routingNumber, accountStatus and user, Information about user includes name, last 4 digit of identity and kyc statuses
  3. getLinkedAccounts: Returns minimal information about linked accounts
    • for parent accountId - returns parent-child link for all children
    • for child accountId - returns one parent-child link
  4. getLinkedAccountsInfo: Returns information about linked accounts in detail same as getAccountDetails
    • for parent accountId - returns parent-child link for all children
    • for child accountId - returns one parent-child link

Card Client

  1. getCards: Get all cards for a given greendot accountIdentifier
  2. getCard: Get card details for given accountId and cardId(paymentInstrumentIdentifier)
  3. setPin: Set PIN for physical card ?
  4. getCardDeliveryStatus: Returns the delivery status of physical card
  5. pauseCard: Pause card to block all card actions
  6. unpauseCard: Unpause an paused card
  7. replaceCard: Replace card when the current card is stolen, lost, damaged or fraud transaction.
  8. getReplaceCardEligibility: Check if a card can be replaced
  9. activateCard: Activate a physical card
  10. validateCardCvv: Validate Card CVV ?

Enrollment Client

  1. getAccountDetailsWithCards: Returns account details like routing number, account number along with account users and their details as well as their purses and cards(payment instruments)

Purse Client

  1. getPurses: Returns all purses of a greendot account

Transaction Client

  1. getTransactions: Returns transactions for an account, this function has many filters to choose from like
    • startDate: string;
  • endDate?: string
  • limit?: number
  • purseIdentifier?: string
  • transactionType?: TransactionType
  • transactionStatus?: TransactionStatus
  1. getPaginatedTransactions: Returns transactions for an account, and following filters
    • limit: number;
  • offset?: number
  • purseIdentifier?: string

User Client

  1. getAccountUsers: Returns list of users for an account along with their details
  2. validateUserSsn: Validate account`s user SSN ?
1.131.0

1 month ago

1.129.0

2 months ago

1.128.0

2 months ago

1.127.0

2 months ago

1.130.0

2 months ago

1.125.0

2 months ago

1.126.0

2 months ago

1.121.0

2 months ago

1.120.0

2 months ago

1.115.0

2 months ago

1.113.0

2 months ago

1.112.0

2 months ago

1.111.0

2 months ago

1.110.0

2 months ago

1.109.0

2 months ago

1.108.0

2 months ago

1.107.0

2 months ago

1.106.0

2 months ago

1.105.0

2 months ago

1.104.0

2 months ago

1.103.0

2 months ago

1.102.0

2 months ago

1.101.0

2 months ago

1.100.0

2 months ago

1.99.0

2 months ago

1.98.0

2 months ago

1.97.0

2 months ago

1.96.0

2 months ago

1.95.0

2 months ago

1.94.0

2 months ago

1.93.0

2 months ago

1.92.0

2 months ago

1.91.0

2 months ago

1.90.0

2 months ago

1.89.0

2 months ago

1.88.0

2 months ago

1.87.0

2 months ago

1.86.0

2 months ago

1.85.0

2 months ago

1.84.0

2 months ago

1.83.0

3 months ago

1.82.0

3 months ago