Managed Cards — virtual and physical payment cards.
All paths and operations are verified against Weavr's published docs.
Confirmed endpoints
GET /managed_cards— list all cardsPOST /managed_cards— create a cardGET /managed_cards/{id}— get a cardPATCH /managed_cards/{id}— update card detailsPOST /managed_cards/{id}/block— block a cardPOST /managed_cards/{id}/unblock— unblock a cardDELETE /managed_cards/{id}— destroy a cardPOST /managed_cards/{id}/physical— upgrade to physical cardGET /managed_cards/{id}/statement— card transaction statementGET /managed_cards/{id}/spend_rules— get spend rulesPOST /managed_cards/{id}/spend_rules— create spend rulesPUT /managed_cards/{id}/spend_rules— update spend rulesDELETE /managed_cards/{id}/spend_rules— remove spend rules
Card modes
- Prepaid — the card has its own balance; fund it via transfers.
- Debit — taps into the balance of a linked parent managed account
(set
"parentManagedAccountId"at creation).
Physical card fulfilment states (via webhook)
"REQUESTED" → "SENT_FOR_FULFILLMENT" → "DISPATCHED" → "DELIVERED"
These are reported via the managed_cards_physical_cards_upgrade_watch webhook.
List query parameters
offset,limit,profileId,friendlyName,currency,tagstate—"ACTIVE","MANAGED","DESTROYED"state.blockedReason—"USER","SYSTEM"type—"VIRTUAL","PHYSICAL"mode—"PREPAID","DEBIT"renewalType—"RENEW","NO_RENEW"createdFrom,createdTo— epoch milliseconds
Important notes
- Amounts in minor units (1000 = £10.00).
- Use
"userId"(not the deprecated"linkedUserId"insidethreeDSecureAuthConfig) to assign a card to a specific user at creation.
Summary
Functions
Blocks a managed card.
Creates a new managed card.
Creates spend rules for a managed card. POST /managed_cards/{id}/spend_rules.
Removes all spend rules from a managed card. DELETE /managed_cards/{id}/spend_rules.
Destroys (permanently removes) a managed card.
Fetches a managed card by id. GET /managed_cards/{id}.
Gets the spend rules for a managed card. GET /managed_cards/{id}/spend_rules.
Lists all managed cards for the authenticated identity.
The confirmed physical card fulfilment states.
Returns the transaction statement for a managed card.
Unblocks a managed card. POST /managed_cards/{id}/unblock.
Updates a managed card's details. PATCH /managed_cards/{id}.
Updates individual spend rules for a managed card. PUT /managed_cards/{id}/spend_rules.
Upgrades a virtual card to a physical card, triggering fulfilment.
Functions
@spec block(Weavr.Config.t(), String.t(), keyword()) :: :ok | {:error, Weavr.Error.t()}
Blocks a managed card.
POST /managed_cards/{id}/block — sets state.blockedReason to "USER",
which can be reversed by unblock/3.
@spec create(Weavr.Config.t(), map(), keyword()) :: {:ok, map()} | {:error, Weavr.Error.t()}
Creates a new managed card.
POST /managed_cards
Required fields in attrs:
"profileId"— from Multi Portal > API Credentials"friendlyName"— display name"currency"— ISO 4217 code"cardholderMobileNumber"— object with"countryCode"and"number"- for debit mode:
"parentManagedAccountId","cardLevelClassification": "DEBIT"
Optional: "nameOnCard", "tag", "userId" (assign to a specific user),
"threeDSecureAuthConfig", "renewalType".
@spec create_spend_rules(Weavr.Config.t(), String.t(), map(), keyword()) :: :ok | {:error, Weavr.Error.t()}
Creates spend rules for a managed card. POST /managed_cards/{id}/spend_rules.
@spec delete_spend_rules(Weavr.Config.t(), String.t(), keyword()) :: :ok | {:error, Weavr.Error.t()}
Removes all spend rules from a managed card. DELETE /managed_cards/{id}/spend_rules.
@spec destroy(Weavr.Config.t(), String.t(), keyword()) :: :ok | {:error, Weavr.Error.t()}
Destroys (permanently removes) a managed card.
DELETE /managed_cards/{id} — irreversible.
@spec get(Weavr.Config.t(), String.t(), keyword()) :: {:ok, map()} | {:error, Weavr.Error.t()}
Fetches a managed card by id. GET /managed_cards/{id}.
@spec get_spend_rules(Weavr.Config.t(), String.t(), keyword()) :: {:ok, map()} | {:error, Weavr.Error.t()}
Gets the spend rules for a managed card. GET /managed_cards/{id}/spend_rules.
@spec list( Weavr.Config.t(), keyword() ) :: {:ok, map()} | {:error, Weavr.Error.t()}
Lists all managed cards for the authenticated identity.
GET /managed_cards — pass filters in opts[:filters].
@spec manufacturing_states() :: [String.t()]
The confirmed physical card fulfilment states.
@spec statement(Weavr.Config.t(), String.t(), keyword()) :: {:ok, map()} | {:error, Weavr.Error.t()}
Returns the transaction statement for a managed card.
GET /managed_cards/{id}/statement — pass filters in opts[:filters].
Supports offset, limit, orderByTimestamp, fromTimestamp, toTimestamp,
showFundMovementsOnly, singleEntryPerTransaction.
@spec unblock(Weavr.Config.t(), String.t(), keyword()) :: :ok | {:error, Weavr.Error.t()}
Unblocks a managed card. POST /managed_cards/{id}/unblock.
@spec update(Weavr.Config.t(), String.t(), map(), keyword()) :: {:ok, map()} | {:error, Weavr.Error.t()}
Updates a managed card's details. PATCH /managed_cards/{id}.
@spec update_spend_rules(Weavr.Config.t(), String.t(), map(), keyword()) :: :ok | {:error, Weavr.Error.t()}
Updates individual spend rules for a managed card. PUT /managed_cards/{id}/spend_rules.
@spec upgrade_to_physical(Weavr.Config.t(), String.t(), map(), keyword()) :: {:ok, map()} | {:error, Weavr.Error.t()}
Upgrades a virtual card to a physical card, triggering fulfilment.
POST /managed_cards/{id}/physical — fulfilment state changes are
reported via the managed_cards_physical_cards_upgrade_watch webhook.
Pass delivery address and other physical card config in attrs.