Issue cards

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.

Key players

For the purposes of this guide, we’ll assume you are a developer building a platform with the following players:

  • Your Moov account: A platform that enables its customers to accept payments and monetizes the spending of those funds on business purchases
  • Customer: A business looking to make a purchase using the funds in its wallet

Get your access token

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';

const moov = new Moov({
  accountID: "YOUR_MOOV_ACCOUNT_ID",
  publicKey: "PUBLIC_KEY",
  secretKey: "PRIVATE_KEY",
  domain: "YOUR_DOMAIN"
});

const scopes = [SCOPES.ACCOUNTS_CREATE];
try {
  const {token} = await moov.generateToken(scopes);
  // Do something with token
} catch(err) {
  // Handle any errors
}
1
2
3
4
5
curl -X POST "https://api.moov.io/oauth2/token" \
  -u "client_id:client_secret" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "grant_type=client_credentials" \
  --data-urlencode  "scope=/accounts.write" \

Onboard your customers

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
const onboarding = 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;

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

// create Moov instance with generated token
const moov = 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: {}
});

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

// create Moov instance with generated token
const moov = 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 a card

Request a card via the Moov API

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.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

curl -X POST "https://api.moov.io/issuing/{accountID}/issued-cards" \
  -H 'Authorization: Bearer {token}' \
  -H "Origin: https://api.moov.io" \
  --data-raw '{
  "fundingWalletID": "string",
  "authorizedUser": {
    "firstName": "Jane",
    "lastName": "Doe",
    "birthDate": {
      "day": 9,
      "month": 11,
      "year": 1989
    }
  },
  "type": "single-use",
  "memo": "supplies purchase",
  "authorizationControls": {
    "spendLimits": [
      {
        "amount": 10000, // $100
        "duration": "transaction"
      }
    ]
  }
}
  }'\

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.

Getting card details

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"
  }'\

View card transactions

To see card transactions associated with a particular Moov account, you can pass the account ID to the card issuing transactions endpoint.

1
2
3
4
5
6
curl -X POST "https://api.moov.io/issuing/{accountID}/transactions" \
  -H 'Authorization: Bearer {token}' \
  -H "Origin: https://api.moov.io" \
  --data-raw '{
  "accountID": "customer account ID"
  }'\

What’s next

Feel free to explore Moov.js, our in-browser JavaScript SDK. Or, if you’re interested in other use cases, you can dive into our guides: