1.131.0 • Published 1 month ago
@stockpile/greendot-sdk v1.131.0
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
searchAccounts
: Search Accounts by mobile, date-of-birth, email or ssngetAccountDetails
: Get details of account like accountNumber, routingNumber, accountStatus and user, Information about user includes name, last 4 digit of identity and kyc statusesgetLinkedAccounts
: Returns minimal information about linked accounts- for parent accountId - returns parent-child link for all children
- for child accountId - returns one parent-child link
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
getCards
: Get all cards for a given greendot accountIdentifiergetCard
: Get card details for given accountId and cardId(paymentInstrumentIdentifier)setPin
: Set PIN for physical card ?getCardDeliveryStatus
: Returns the delivery status of physical cardpauseCard
: Pause card to block all card actionsunpauseCard
: Unpause an paused cardreplaceCard
: Replace card when the current card is stolen, lost, damaged or fraud transaction.getReplaceCardEligibility
: Check if a card can be replacedactivateCard
: Activate a physical cardvalidateCardCvv
: Validate Card CVV ?
Enrollment Client
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
getPurses
: Returns all purses of a greendot account
Transaction Client
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
getPaginatedTransactions
: Returns transactions for an account, and following filters- limit: number;
- offset?: number
- purseIdentifier?: string
User Client
getAccountUsers
: Returns list of users for an account along with their detailsvalidateUserSsn
: 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