Revoke Voucher Grant
Revokes a voucher grant in a project. Meterry first applies any pending usage debits that have already consumed the voucher, then revokes the remaining voucher balance and writes voucher ledger debit entries.
POST /v1/projects/:project_id/voucher-grants/:voucher_grant_id/revokeAuthentication
Section titled “Authentication”Authorization: Bearer <api-key>Requires wallets write access.
Path Parameters
Section titled “Path Parameters”| Field | Required | Description |
|---|---|---|
project_id |
Yes | Project that owns the voucher grant. |
voucher_grant_id |
Yes | Voucher grant ID to revoke. |
Example
Section titled “Example”curl -X POST 'http://127.0.0.1:8080/v1/projects/proj_gateway/voucher-grants/vg_xxx/revoke' \ -H 'Authorization: Bearer <api-key>'Response
Section titled “Response”{ "voucher_grant": { "id": "vg_xxx", "tenant_id": "t_001", "project_id": "proj_gateway", "account_id": "acct_org_001", "currency": "USD", "original_amount": "25.00", "remaining_amount": "0", "effective_from": 1782720000, "expires_at": 1785312000, "priority": 10, "status": "revoked", "source_type": "promotion", "source_id": "promo_summer_2026", "created_at": 1782720000, "updated_at": 1782800000 }, "pending_amount": "6.25", "ledger_entries": [ { "id": "wle_pending_xxx", "tenant_id": "t_001", "project_id": "proj_gateway", "account_id": "acct_org_001", "currency": "USD", "fund_type": "voucher", "fund_id": "vg_xxx", "direction": "debit", "amount": "6.25", "balance_after": "18.75", "source_type": "voucher_revoke_pending_usage", "source_id": "vg_xxx", "usage_version": 42, "created_at": 1782800000 }, { "id": "wle_revoke_xxx", "tenant_id": "t_001", "project_id": "proj_gateway", "account_id": "acct_org_001", "currency": "USD", "fund_type": "voucher", "fund_id": "vg_xxx", "direction": "debit", "amount": "18.75", "balance_after": "0", "source_type": "voucher_revoke", "source_id": "vg_xxx", "created_at": 1782800000 } ]}- Revoking an already revoked grant is idempotent and returns the current revoked grant.
pending_amountis usage that had consumed the voucher in realtime but had not yet been reconciled into the persisted voucher balance.