Repository navigation
halvorai-ingest 0.5.0: Stripe adapter - #10
Merged
Merged
Conversation
Adds halvorai_ingest.stripe, a port of @halvorai/ingest/stripe: halvor.stripe(event), map_stripe_event, stripe_webhook_handler, tag_payment_intent and tag_issuing_card (agent name and framework included). The tests compare the output with the Node.js mapper for every shared fixture, so Python, Node.js and Go map Stripe webhooks the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CpycUZtFJDZbpUr3cUnE6Y
This was referenced Nov 10, 2026
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
Python had no Stripe adapter, while the Node.js and Go SDKs both have one. In the SDK end-to-end test, the Errandly demo had to map Stripe Issuing webhooks by hand. This PR adds
halvorai_ingest.stripe, ported from@halvorai/ingest/stripe:halvor.stripe(event)maps a verified Stripe webhook event, queues it, and returns the event id. It returnsNonefor types it doesn't handle and never raises.map_stripe_event(event)covers 8 types. PaymentIntent authorized, succeeded and failed,charge.refundedandcharge.dispute.createdgo on thestriperail. Issuing authorization created and updated, and Issuing transaction created (capture or refund), go on thecardrail.tag_payment_intentandtag_issuing_cardwritemetadata.halvor_*fromagent_contextor from keyword overrides. That includes the agent name and framework, cut to 128 and 64 characters.stripe_webhook_handlerandSTRIPE_HANDLED_TYPESare also exported.stripe.Event(viato_dict()).Tests and verification
tests/test_stripe.pyadds 40 tests. The fixtures are copied from the Node.js SDK.expected.jsonholds the Node.jsmapStripeEventoutput for every fixture plus two edge cases (a named card, and Connect with SPT, a long name and a bad currency). Python output equals it exactly.HalvorClient, gets signed, and passesvalidate_event.stripe.Eventfrom stripe-python 16.1.0.pytest: 185 passed.mypy --strict: clean.uv run --lockedis OK. The wheel includeshalvorai_ingest/stripe/.Brain update
halvorai-ingest0.5.0 adds a Stripe and Stripe Issuing adapter (halvorai_ingest.stripe,halvor.stripe(event),tag_payment_intent,tag_issuing_card).HalvorClient.stripemethod. No APE schema or server change.v0.5.0GitHub Release is published, which runs the trusted-publishing workflow.halvorai-app/packages/sdk-pythonis behind this repo (it is still at 0.2.0). The halvorai-app docs pages are updated in a separate PR.Generated by Claude Code