Activates a physical card. This method calls Girasol's
PATCH /v1/cards/activate-card endpoint. CVC_MISMATCH when Girasol names
the CVV wrong, CARD_NOT_FOUND for a 404.
Every outcome is built from status codes alone, never Girasol's text, which could echo the CVV or PIN back.
Format: uuid
Permanently blocks a card by its card ID.
This method calls Girasol's PATCH /v1/cards/{cardId}/block endpoint and returns the updated card info.
CARD_NOT_FOUND when Girasol has no such card.
Performs a cash-in operation to transfer funds from the CFX Master Account to a customer card account.
This method calls Girasol's POST /v1/accounts/cash-in endpoint and returns the transaction details.
ACCOUNT_NOT_FOUND when Girasol has no such account.
Performs a cash-out operation to transfer funds from a customer card account to the CFX Master Account.
This method calls Girasol's POST /v1/accounts/cash-out endpoint and returns the transaction details.
ACCOUNT_NOT_FOUND when Girasol has no such account.
Creates a new company user account.
This method calls Girasol's POST /v1/accounts/create-company-user endpoint
and returns the created company account details. EMAIL_ALREADY_EXISTS
when Girasol already holds an account for the email, and
COMPANY_ACCOUNT_EXISTS for any other 409.
Format: email
ISO 3166-1 alpha-3 country code where the company was incorporated. For more info go to country codes
ISO 3166-1 alpha-3 country code of the legal representative's nationality. For more info go to country codes
OptionallegalRepresentativePassport?: stringCreates a new physical card associated with an account.
This method calls Girasol's POST /v1/cards/create-card endpoint and returns the created card details.
ACCOUNT_NOT_FOUND when Girasol has no such account.
Creates a new virtual card associated with an account.
This method calls Girasol's POST /v1/cards/create-virtual-card endpoint and returns the created card details.
ACCOUNT_NOT_FOUND when Girasol has no such account.
Freezes an account by changing its status to inactive (status: 2).
This method calls Girasol's PATCH /v1/accounts/change-account-status endpoint
and returns the updated account status information. Calling this 'freeze' purely to align
with the terminology used for cards.
Freezes a card by its card ID.
This method calls Girasol's PATCH /v1/cards/{cardId}/freeze endpoint and returns the updated card info.
CARD_NOT_FOUND when Girasol has no such card.
Retrieves account information by account ID.
This method calls Girasol's GET /v1/accounts/customer-info/{numberAccount} endpoint and returns the account details, or null when Girasol has no such account.
Retrieves card information by card ID.
This method calls Girasol's GET /v1/cards/info-by-card-id/{cardId} endpoint and returns the card details, or null when Girasol has no such card.
PAN, CVV, name and expiry via card-token then card-token-internal.
Nothing here logs the result, and no error carries it. null when
Girasol has no such card.
Retrieves cards by account ID.
This method calls Girasol's GET /v1/cards/info-by-account/{accountNumber} endpoint and returns the card details.
ACCOUNT_NOT_FOUND when Girasol has no such account.
One page of a card's ledger at Girasol, newest first: purchases (type 2)
and the reversals and refunds that credit them back (type 1).
This method calls Girasol's GET /v1/accounts/card-transactions/{cardId}.
CARD_NOT_FOUND when Girasol has no such card.
Retrieves clearing information for a specific date.
This method calls Girasol's GET /v1/clearing?date={date} endpoint and returns the clearing details.
Unfreezes an account by changing its status to active (status: 1).
This method calls Girasol's PATCH /v1/accounts/change-account-status endpoint
and returns the updated account status information. Calling this 'unfreeze' purely to align
with the terminology used for cards.
Unfreezes a card by its card ID.
This method calls Girasol's PATCH /v1/cards/{cardId}/unfreeze endpoint and returns the updated card info.
The status will change from "FREEZED" to "ACTIVE". CARD_NOT_FOUND when
Girasol has no such card.
Client for Girasol's B2B card-issuing API.
Every Girasol payload arrives inside an envelope —
{ statusCode, error, data }— so the useful body isresponse.data.data: openapi-fetch'sdata(the parsed 2xx body), then the envelope's owndata.succeededchecks both the HTTP status and the envelope'serrorflag before anything reads through it.A get returns
nullfor a 404; every other method returns aResult(GIRASOL_ERROR, or<THING>_NOT_FOUNDfor a 404) and a fault throws. README.md covers regeneratinggirasol.d.tsand what to distrust in it.