Add Funding Sources

addBankCard

Overview

A funding source, otherwise known as payment method, is used on Fluz to purchase gift cards, fund virtual card transactions, deposit funds to your Fluz balance, and more. The first thing you'll want to do is make sure you have at least one funding source to complete transactions on Fluz. A user account can have the following types:

  • Bank Card - A debit, credit or prepaid card. Please note, credit cards can carry higher fees and lower cashback rates than debit cards.
  • Bank Account - Bank accounts have no fees. However, they can only be added in Fluz app or web portal.
  • PayPal Account - Digital wallets like PayPal often carry the highest fees and need to be added from the Fluz app or web portal.

You must add a bank card as a backup payment method to be able to make a purchase.

🚧

Currently, users can only add bank cards as a funding source via the API.

Add Bank Card

Sample request

You can add a new bank card with the addBankCard mutation. This mutation allows you to provide the necessary details for adding a bank card to a user's account. The query takes an AddBankCardInput input object.

{
  "query": "mutation addBankCard($input: AddBankCardInput!) { addBankCard(input: $input) { bankCardId ownerAccountId addedUserId cardType cardProcessor cardholderName lastFourDigits expirationMonth expirationYear cardStatus billingAddressId }}",
  "variables": {
    "input": {
      "cardNumber": "4111111111111111",
      "expirationMonth": "01",
      "expirationYear": "2029",
      "cvv": "111",
      "cardholderName": "John Doe",
      "billingAddress": {
        "streetAddressLine1": "123 Example St",
        "streetAddressLine2": "Unit 1",
        "country": "United States",
        "city": "New York City",
        "state": "New York",
        "postalCode": "12345",
      }
    }
  }
}

This mutation requires the AddBankCardInput input type. Any field marked with an exclamation mark (!) in the schema is mandatory and must be included in the request.

To associate an address with your bank card, you must use either the billingAddress or userAddressId input field. Ensure that only one of these fields is provided to meet validation requirements.

  • New Address: To add a new address, use the billingAddress input field to define the address details associated with this card.
  • Existing Address: To link an existing address, use the userAddressId input field, specifying the identifier for the address already stored in the system. You can use the getUserAddresses query to look up an existing userAddressId.
Field nameTypeDescription
cardNumberString!The card number. This field requires the full card number, typically 16 digits.
expirationMonthString!The expiration month of the card, formatted as MM (e.g., "07" for July).
expirationYearString!The three- or four-digit security code, found on the back or front of the card.
cvvString!The three- or four-digit security code, found on the back or front of the card.
cardholderNameString!The name of the cardholder as it appears on the card.
billingAddressUserAddressInputOptional. Use this field to create the card with a new billing address.
userAddressIdUUIDOptional. Use this field to associate the card with an existing user address.

AddBankCardInput

{
  "cardNumber": "xyz789",
  "expirationMonth": "xyz789",
  "expirationYear": "abc123",
  "cvv": "abc123",
  "cardholderName": "abc123",
  "billingAddress": UserAddressInput,
  "userAddressId": "0284be6f-1a69-44f7-9da0-5b5edaf45d19"
}

Sample response

The response from the addBankCard mutation will include the fields that you specified in the mutation request, along with the relevant ID values and card processor.

{
  "data": {
    "addBankCard": {
      "bankCardId": "4111111111111111",
      "ownerAccountId": "a578fe07-7165-47b8-b147-2251c99b7fc1",
      "addedUserId": "8d197a56-53df-439b-85cd-bb88dfca9a5f",
      "cardType": "Visa",
      "cardProcessor": "Stripe",
      "cardholderName": "John Doe",
      "lastFourDigits": "1234",
      "expirationMonth": "12",
      "expirationYear": "2025",
      "cardStatus": "active",
      "billingAddressId": "e7979eb7-1727-48ed-8c5a-c56532908c1e"
    }
  }
}

❗️

Only available to personal applications

Currently, only personal applications will be granted the scope to add bank cards to an account. Publicly available applications looking to add bank cards to an account will need to complete PCI certification and an attestation of PCI compliance.

If you would like to remove a funding source or set a given funding source as the primary, preferred or backup on your account, this will need to be managed in the Fluz dashboard.