Transfer Card Between Accounts
Learn how to transfer cards between accounts.
Step 1: Fetch your Bearer Token
Use the WEX-provided clientid and clientsecret to request for your bearer token.
CURL
curl --location --request POST 'https://wmd.xc.wexonline.com/oauth-service/uaa/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept-Encoding: gzip,deflate,br' \
--data 'grant_type=client_credentials&client_secret=1234&client_id=some-client-id'
Step 2: Fetch the card you want to transfer
To successfully transfer a card, ensure you have the following information available:
- account_id
- card_id
- cardprofileid
- card_type
CURL
curl --request GET \
--url https://wmd.xc.wexonline.com/fleet-service/v3/cards/1-8Z9C8Z6 \
--header 'Authorization: Bearer <YOUR_BEARER_TOKEN>' \
Step 3: Find accounts to which the card can be transferred
- Use the card_id from Step 2 in the path parameter.
- Use the account_id from Step 2 in the rootaccountids query parameter.
CURL
curl --request GET \
--url 'https://wmd.xc.wexonline.com/fleet-service/v3/cards/1-CARD-ID/transfers/eligible-accounts?root_account_ids=1-ACCT1' \
--header 'Authorization: Bearer <YOUR_BEARER_TOKEN>'\
Response
CURL
{
"accounts": [
{ "account_id": "1-ACCT1",
"account_number": "04xxxxxxxxxxx",
"hierarchy_level": 4,
"name": "CSG Alabama",
"wex_account_number": "91xxxxxxxxxxx",
"parent_account_id": "1-ACCT1-PARENT",
"revolver": false,
"transfer_eligible": true
},
{ "account_id": "1-ACCT2",
"account_number": "04xxxxxxxxxxx",
"hierarchy_level": 4,
"name": "CSG Atlanta",
"wex_account_number": "91xxxxxxxxxxx",
"parent_account_id": "1-ACCT2-PARENT",
"revolver": false,
"transfer_eligible": true
},
{ "account_id": "1-ACCT3",
"account_number": "04xxxxxxxxxxx",
"hierarchy_level": 4,
"name": "CSG Austin-SA District",
"wex_account_number": "91xxxxxxxxxxx",
"parent_account_id": "1-ACCT3-PARENT",
"revolver": false,
"transfer_eligible": true
}....more accounts
]
}
Step 4: Check whether a required field needs updating before the transfer
- Use the card_id from Step 2 in the path parameter.
- Use the selected account from Step 3 in the targetaccountid query parameter.
Step 5: Check for transfer requirements
CURL
curl --request GET \
--url 'https://wmd.xc.wexonline.com/fleet-service/v3/cards/1-CARD-ID/transfers/requirements?target_account_id=1-ACCT3' \
--header 'Authorization: Bearer <YOUR_BEARER_TOKEN>' \
Requirement Response
CURL
{
"requirements": [
{ "name": "custom_vehicle_id_change",
"explanation": "The card's custom vehicle or asset id must be changed for transfer to the target account because it conflicts under the target billing hierarchy."
}
]
}
No Requirement Response
CURL
{
"requirements": []
}
Step 6: Find a purchase control profile compatible with the card_type on the card
CURL
curl --request GET \
--url 'https://wmd.xc.wexonline.com/fleet-service/v3/accounts/1-ACCT3/purchase_controls' \
--header 'Authorization: Bearer <YOUR_BEARER_TOKEN>' \
--header 'Content-Type: application/json' \
--header 'userId: qa-client'
Response
CURL
{
"items": [
{
"purchase_control_id": "1-3HXBD2",
"name": "Fuel Only",
"description": "Fuel Only",
"card_type": "Fuel Only",
"status": "Active"
},
{
"purchase_control_id": "1-3N8B3M",
"name": "Unrestricted",
"description": "Unrestricted",
"card_type": "Unrestricted",
"status": "Active"
},
{
"purchase_control_id": "1-7W5S6G0",
"name": "WEX Edge",
"description": "Unrestricted",
"card_type": "WEX Edge",
"status": "Active"
},
{
"purchase_control_id": "1-AKVCAOJ",
"name": "Heavy Duty",
"description": "Unrestricted",
"card_type": "Unrestricted",
"status": "Active"
}, … more purchase control profiles
Step 7: Transfer the card to the target account
Use the
card_id
from
Step 2
in the path parameter.
Use the selected
account_id
from
Step 3
in the
target_account_id
.
Use the
card_profile_id
from
Step 2
in the
card_profile_id
field.
Use the one of the
purchase_control_ids
from
Step 6
with a matching
card_type
to the card being transferred.
If
Step 5
returns a response with the name
custom_vehicle_id_change
, do the following:
Plain Text
1.
Update
reset_prompt_id
to true.
Update
vehicle_prompt_id
with a new value.
CURL
curl --request POST \
--url https://wmd.xc.wexonline.com/fleet-service/v3/cards/1-CARD-ID/transfers \
--header 'Authorization: Bearer <YOUR_BEARER_TOKEN>' \
--header 'Content-Type: application/json' \
--header 'user_id: qa_client' \
--data '{
"target_account_id": "1-ACCT3",
"target_purchase_control_id": "1-ACCT3",
"card_update_information": {
"purchase_control_id": "1-AU6WPPD",
"card_profile_id": "1-AIFBL3D",
"status": {
"status": "Active",
"status_reason": "Active"
}
}
}'
Response
CURL
{
"_links" : {
"self" : {
"href" : "https://wmd.xc.wexonline.com/fleet-service/v3/cards/1-CARD-ID",
"method" : "GET"
}
},
"account_id" : "1-ACCT3",
"account_name" : "Account Name",
"card_id" : "1-CARD-ID",
"card_locked" : false,
"card_number" : "7723",
"card_profile_id" : "1-AIFBL3D",
"card_profile_name" : " Road Card",
"card_type" : "Unrestricted",
"department" : {
"department_id" : "1-BGO67OL",
"name" : "836",
"parent_id" : "1-PARENT-ID"
},
"design_code" : "RBN1",
"embossed_number" : "*************77233",
"embossing" : [
{
"source" : "Company Asset Number",
"value" : "E5431",
"position" : 1,
"read_only" : false
},
{
"source" : "DBA Name",
"value" : "WHITE CAP LP",
"position" : 2,
"read_only" : false
},
{
"position" : 3
}
],
"ev_requested" : false,
"expiration_date" : "2024-08-02T04:00:00Z",
"last_issue_date" : "2021-08-06T04:00:00Z",
"last_updated" : "2025-03-04T18:27:58.023296831Z",
"license_plate_number" : "RRT9524",
"mag_strip_number" : "*******************77233",
"order_id" : "1-ALHUEH6",
"original_card_id" : "1-ALHTDZZ",
"pos_display_prompt" : "Odometer & Driver ID",
"pos_override_prompt" : "Odometer & Driver ID",
"purchase_control_id" : "1-AKVU57D",
"purchase_control_name" : "Light Duty",
"renewal_flag" : true,
"renewal_period" : "36",
"rfids" : [ ],
"status" : "Active",
"status_reason" : "Active",
"usage_type" : "Asset",
"use_address_on_card" : false,
"user_defined_fields" : [
{
"position" : 0,
"value" : "8202"
},
{
"position" : 1,
"value" : "580-110"
},
{
"position" : 2,
"value" : "White Cap"
},
{
"position" : 3,
"value" : "Vehicle"
},
{
"position" : 4,
"value" : "237NSC"
}
],
"vehicle_customer_id" : "E5431",
"vehicle_description" : "19 Ram 1500",
"vehicle_id" : "1-VEH-ID",
"vin" : "1C6RREFT5KN800883"
}
Was this section helpful?
On this page
- Transfer Card Between Accounts