Card issuing is currently in a closed beta — ask our Sales team for more information.
Moov makes spending money in a wallet easy by enabling platforms to issue cards to their customers. This guide covers how to issue and spend on a card.
Assuming you’ve already completed a basic setup of your own account, you’ll need to generate an access token. You will include a new access token as the Moov Drop onboarding.token whenever you onboard a customer.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import{Moov,SCOPES}from'@moovio/node';constmoov=newMoov({accountID:"YOUR_MOOV_ACCOUNT_ID",publicKey:"PUBLIC_KEY",secretKey:"PRIVATE_KEY",domain:"YOUR_DOMAIN"});constscopes=[SCOPES.ACCOUNTS_CREATE];try{const{token}=awaitmoov.generateToken(scopes);// Do something with token
}catch(err){// Handle any errors
}
You will start by setting up Moov accounts for your customers. You have three different options for doing this:
Option 1: Collect the necessary information from your customers via a pre-built UI component.
Option 2: Collect the necessary information from your customers using Moov.js with your own UI.
Option 3: Onboard customers through the Moov API with our Node SDK. When using our server-side Node SDK, you can use the same code as you would when using Moov.js because the method names are the same.
Customers looking to spend funds from their wallet using an issued card will need to request the wallet and card-issuing capabilities, since the wallet will be the funding source for the card. In order to have these capabilities enabled, your customers will be subject to business verification.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Card issuing Moov Drop
constonboarding=document.querySelector('moov-onboarding');// After generating a token, set it on the onboarding element
onboarding.token='some-generated-token';// Include your own accountID which can be found in the Moov Dashboard
onboarding.facilitatorAccountID='your-account-id';// Wallet and card issuing capabilities are needed for this flow.
onboarding.capabilities=['wallet','card-issuing'];// Funding will occur with the Moov wallet
onboarding.paymentMethodTypes=['moov-wallet'];// Open the onboarding flow when ready
onboarding.open=true;
// create Moov instance with generated token
constmoov=Moov('some-generated-token');// create Moov account, likely on form submit
moov.accounts.create({accountType:'business',profile:{business:{}},capabilities:['wallet','card-issuing']}).then((account)=>{console.log(account);}).catch((err)=>{console.error(err);});// Generate a new token server-side with the accountID and update the token within your frontend app. You can chain methods together
moov.setToken('new-token');// add a representative to account
moov.accounts.representatives.create({accountID:'newly-created-accountID',representative:{}});
// create Moov instance with generated token
constmoov=Moov('some-generated-token');// create Moov account, likely on form submit
moov.accounts.create({accountType:'business',profile:{business:{}},capabilities:['wallet','card-issuing']}).then((account)=>{console.log(account);}).catch((err)=>{console.error(err);});// Generate a new token server-side with the accountID and update the token within your frontend app. You can chain methods together
moov.setToken('new-token');// add a representative to account
moov.accounts.representatives.create({accountID:'newly-created-accountID',representative:{}});
Once you’ve onboarded your customer and they’ve gone through business verification, you can request a card for that customer. You’ll do this through the card issuing endpoint in the Moov API. When requesting a card, you have the option to specify a spend limit as well as a descriptive memo. If you don’t specify a spend limit, the maximum amount the card can spend will be the amount of the balance held in the customer’s wallet.
After you request the card, your customer will be provided a single-use virtual card with a 16-digit card number, expiration date, and security code. The customer can then use the card to make purchases within the amount of their spend limit or wallet balance, depending on which is lower.
Once the card has been successfully created, you can retrieve full details about the card by passing the customer’s account ID and the card ID to the GET issued card endpoint.
1
2
3
4
5
6
7
curl -X POST "https://api.moov.io/issuing/{accountID}/issued-cards/{cardID}/details"\
-H 'Authorization: Bearer {token}'\
-H "Origin: https://api.moov.io"\
--data-raw '{
"accountID": "customer account ID"
"cardID": "ID of the card"
}'\