Repository navigation
feat(token): VCN fees, revoke --id/--member, list --status, revoke-quote (token-cli 0.10.5) - #79
Merged
Merged
Conversation
vcn-quote prints Open Fee, Charge Total and Cancel Fee (taken from the refund on revoke). create --funding-charge-no confirms with Charge / Open fee / Cancel fee instead of Freeze / Fee, since a funded card freezes nothing. verb-schema, README and SKILL.md describe fee_cents as the open fee and add cancel_fee_cents.
… card cancel payment-tokens revoke takes the id from --id as well as the positional argument (flag-only callers such as the orchestrator) and --member to scope the revoke to that end user (platform answers NOT_FOUND for another member's token). A revoked VCN prints Consumed / Fee / Refunded from vcn.settlement. payment-tokens list adds --status (upper-cased).
Read-only quote of cancelling a VCN: live card balance, cancel fee, whether it can be cancelled and the expected refund (GET /payment-tokens/{id}/revoke-quote, --id / --member like revoke). A card whose balance does not cover the cancel fee cannot be cancelled; revoke then fails and the card stays active. README, SKILL.md and verb-schema updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
token-cli 0.10.5 for PhotonPay virtual cards: show both fees, and support cancelling a card from the orchestrator's A2A revoke-vcn scenario.
payment-tokens vcn-quoteOpen Fee,Charge TotalandCancel Fee (taken from the refund on revoke)payment-tokens create --funding-charge-noCharge / Open fee / Cancel feeinstead ofFreeze / Fee(a funded card freezes nothing)payment-tokens revoke--idor the positional argument;--memberscopes the revoke to that end user (another member's token isNOT_FOUND); a revoked VCN printsConsumed / Fee / Refundedpayment-tokens list--statusfilter (upper-cased)payment-tokens revoke-quote--id/--member)verb-schema, README and SKILL.md updated to match.
Platform side: agenzo-platform MR !514 (member-scoped revoke,
statusfilter, settlement in the revoke response, revoke-quote; revoke is rejected when the balance cannot pay the cancel fee).Tests
npx vitest run apps/token-cli: 283 passedtsc --noEmit,check:lockfile, pre-commit hooks passedrevoke --id --member(refunds 888 / 1000 / 388 match the fee table); a revoke with another member returnedRESOURCE_NOT_FOUNDand the card stayed ACTIVERelease
After merge, publish
@agenzo/token-cli@0.10.5to npm.