Wise
The public C ABI exposes Wise backend opening, token-store ownership, and token
setup surfaces. Shared account, transaction, and payment operations remain
capability-probed through gln_check_backend_operation_support.
Provider/API reference: Wise Platform API documentation.
Exposed Surface
| Surface | Functions |
|---|---|
| Token store | gln_create_file_wise_token_store, gln_destroy_wise_token_store |
| Token setup | gln_wise_set_personal_token, gln_wise_token_status, gln_wise_delete_token |
| Backend open/close | gln_open_wise_backend, gln_close_backend |
| Backend metadata | gln_get_backend_kind, gln_get_backend_provider_name, gln_check_backend_operation_support |
The Wise personal token enters through gln_wise_set_personal_token as a
gln_secret_t. Status and delete operations report only redacted state: public
JSON and result fields never include the token string.
Token setup writes one active persistence sink. When profile_name_or_null is
configured on the opened backend, setup writes host profile storage. Otherwise,
setup writes the supplied Wise token-store handle.
The public header does not expose Wise-specific account, transaction, or payment
operation entrypoints. Do not model Wise as supporting gln_retrieve_accounts,
gln_retrieve_balances, gln_retrieve_transactions, or transfer submission
unless gln_check_backend_operation_support reports support for the opened
backend.
Open a Backend
gln_wise_config_t config = {0};
gln_default_wise_config(&config);
config.endpoint = "https://api.wise.example";
config.profile_id_or_null = "profile-123";
config.profile_name_or_null = "company-profile";
gln_backend_t* backend = NULL;
gln_error_t error = {0};
gln_default_error(&error);
gln_status_t status = gln_open_wise_backend(
&config,
state_store,
token_store,
&backend,
&error);
| Input | Meaning |
|---|---|
gln_wise_config_t | Endpoint, optional Wise profile id, optional local profile/plugin/diagnostic fields. |
gln_state_store_t* | Durable backend state. |
gln_wise_token_store_t* | Token storage handle. |
The token store and state store must outlive the backend handle using them.
Token Store
gln_wise_token_store_t* token_store = NULL;
gln_error_t error = {0};
gln_default_error(&error);
gln_status_t status = gln_create_file_wise_token_store(
"wise-token-store",
NULL,
&token_store,
&error);
Release it with gln_destroy_wise_token_store after closing every backend
that uses it.
Token Setup
gln_secret_t* personal_token = NULL;
make_secret_from_prompt(&personal_token);
gln_error_t error = {0};
gln_default_error(&error);
gln_status_t status = gln_wise_set_personal_token(
backend,
personal_token,
&error);
Use gln_wise_token_status to retrieve redacted token state as caller-owned
JSON, and release that string with gln_release_string. Use
gln_wise_delete_token to remove persisted Wise token state associated with an
opened backend.
Runtime Checks
int can_list_transactions =
gln_check_backend_operation_support(backend, GLN_BACKEND_OPERATION_LIST_TRANSACTIONS);
int can_submit_transfer =
gln_check_backend_operation_support(backend, GLN_BACKEND_OPERATION_SUBMIT_TRANSFER);
Probe each operation independently before enabling it for an arbitrary backend handle.