Generate Share Links

The generateVCShareLinks mutation allows you to generate shareable links for recipients to claim virtual cards on your account.

Pre-requisites: https://docs.fluz.app/docs/share-virtual-cards.

GetVCShareLinksInput

FieldTypeDescriptionRequired
cardLimitIntThe limit on the card you want to share.Yes
offerIdStringThe offer ID for the virtual card.Yes
quantityIntThe number of share links to generate.Yes
shareMethodShareMethodTypeThe method you want to share cards.Yes
userCashBalanceIdUUIDThe spend account you want to use to fund the virtual card.Yes
recipientListPhone[String]The list of phone numbers to send the share link to via SMS. Required when shareMethod is PHONE_NUMBER. Array length must match quantity.No
recipientListEmail[String]The list of email addresses to send the share link to. Required when shareMethod is EMAIL. Array length must match quantity.No

Attributes

FieldDescription
share_request_display_id
share_request_batch_id
share_request_details
share_object_status
link_expiration_date
virtual_card_id
delivery_status
recipient_email
recipient_phone
sender_app_id

Samples

  • Generate share link using cURL (Sandbox): Replace placeholders <YOUR_ACCESS_TOKEN> with the credentials you would like to use.

  • Make sure to replace the input with your desired input

curl -X POST https://transactional-graph.staging.fluzapp.com/api/v1/graphql \
  -H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
  -d '{
    "query": "mutation GenerateVCShareLinks($input: GenerateVCShareLinksInput!) {  generateVCShareLinks(input: $input) {    shareLinks  }}",
    "input": {
      "cardLimit": 10,
      "quantity": 1,
      "shareMethod": "GENERATE_URL",
      "userCashBalanceId": "<USER_CASH_BALANCE_ID>",
      "offerId": "<OFFER_ID>"
    }
  }'
  • Response: You'll get a URL
{
    "data": {
        "generateVCShareLinks": {
            "shareLinks": [
                "<SHARE_LINK>"
            ]
        }
    }
}

Generate URL links (no recipients)

curl -X POST 'https://<YOUR_HOST>/api/v1/graphql' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
  -d '{
    "query": "mutation GenerateVCShareLinks($input: GenerateVCShareLinksInput!) { generateVCShareLinks(input: $input) { shareLinks } }",
    "variables": {
      "input": {
        "cardLimit": 25,
        "offerId": "<OFFER_UUID>",
        "quantity": 3,
        "shareMethod": "GENERATE_URL",
        "userCashBalanceId": "<USER_CASH_BALANCE_UUID>"
      }
    }
  }'

Send via SMS to phone number

curl -X POST 'https://<YOUR_HOST>/api/v1/graphql' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
  -d '{
    "query": "mutation GenerateVCShareLinks($input: GenerateVCShareLinksInput!) { generateVCShareLinks(input: $input) { shareLinks } }",
    "variables": {
      "input": {
        "cardLimit": 50,
        "offerId": "<OFFER_UUID>",
        "quantity": 2,
        "shareMethod": "PHONE_NUMBER",
        "recipientListPhone": ["+12125551234", "+12125555678"],
        "userCashBalanceId": "<USER_CASH_BALANCE_UUID>"
      }
    }
  }'

Send via Email

curl -X POST 'https://<YOUR_HOST>/api/v1/graphql' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
  -d '{
    "query": "mutation GenerateVCShareLinks($input: GenerateVCShareLinksInput!) { generateVCShareLinks(input: $input) { shareLinks } }",
    "variables": {
      "input": {
        "cardLimit": 50,
        "offerId": "<OFFER_UUID>",
        "quantity": 2,
        "shareMethod": "EMAIL",
        "recipientListEmail": ["[email protected]", "[email protected]"],
        "userCashBalanceId": "<USER_CASH_BALANCE_UUID>"
      }
    }
  }'
📘

Please note

  • If your funding source does not have enough funds at the time of the recipient claiming the card, it will fail. Please ensure you have sufficient balances.
  • The phone numbers in recipientListPhone must be a string with no spaces, and it must include the country code at the beginning e.g. +18883606660 where +1 is the country code.