Hire an AI payments and billing engineer
Describe your checkout, your payment provider and what you sell. You get payment states, a webhook plan, keys that make retries safe, a failure test list and a daily check that your books match your payouts.
What you give
- Your payment provider, what you sell, and the currencies you take
- Your stack, such as language, database and queue
- A sample webhook payload, with names, emails and keys removed (optional)
What you get
- A map of the money flow from checkout to payout, with each place it can fail
- Payment and subscription states, with every change and what must happen
- The idempotency key to use for each money action
- Card-data scope advice and a failure test list
An example
You are adding Stripe, Adyen, Braintree or PayPal checkout and never want to charge twice.
You ask: “Describe your checkout, your payment provider and what you sell. Use the material I attach and ask for anything essential that is missing.”
You get back:
- Money flow. Each step from checkout to payout, and where it can fail.
- State tables. Every payment and subscription state, what triggers each change and what must happen.
- Idempotency keys. The key for each money action, so a retry can't repeat it.
An example, not your task.
Hire this specialist
It is free and needs no account. Download the pack, give it to your AI and tell it the job. Your AI asks for anything it is missing, then does the work and checks it.
Related specialists
Details
Everything it can hand back
Your task sets the actual outputs. The specialist picks the methods that cover them.
- A map of the money flow from checkout to payout, with each place it can fail
- Payment and subscription states, with every change and what must happen
- A webhook plan covering verify, store, dedupe and process
- The idempotency key to use for each money action
- Card-data scope advice and a failure test list
- A daily reconciliation check, and the questions still open
How it does the job well
- Never design a flow where a card number can reach the user's server.
- You cannot reach the user's payment account or run tests. Say which checks you did not run.
- Targets in the profile, such as dispute and recovery rates, are goals. Do not report them as results.
- Ask before anything that spends money, refunds, changes live settings or moves funds. A qualified person should review PCI and legal questions.
- Never touch raw card data. Card numbers go from the customer's browser to the processor via hosted fields or SDK tokenization. If a PAN can reach your server, the design is wrong — that is the difference between SAQ A and a full PCI DSS audit.
- Every mutation carries an idempotency key. Charges, refunds, and subscription changes must be safely retryable. Derive the key from the business operation (order ID + attempt), not from a random UUID per HTTP call.
- Webhooks are the source of truth, not the redirect. Fulfill on payment_intent.succeeded (or the PSP equivalent), never on the customer returning to your success page. Customers close tabs; webhooks don't.
Mistakes it avoids
- Mixing cash and accrual figures, or different periods, in one comparison.
- Rounding or formula errors that do not tie back to totals.
- Giving personal investment advice.
What a good result looks like
An example, not your task: You are adding Stripe, Adyen, Braintree or PayPal checkout and never want to charge twice.
- Money flow. Each step from checkout to payout, and where it can fail.
- State tables. Every payment and subscription state, what triggers each change and what must happen.
- Idempotency keys. The key for each money action, so a retry can't repeat it.
- Webhook handling. How events are verified, saved, repeated safely and marked complete, including a crash case.
- Card data scope. Which integration style keeps card numbers off your servers, and the PCI level that brings.
- Failure tests. Declines, 3-D Secure, replays and out-of-order events to try in test mode.
How the work is checked
- Totals tie out, and differences are explained line by line.
- Forecast assumptions are listed and easy to change.
- Anything not checked by a qualified person is marked as needing review.
- States which checks passed, failed or could not run, and names missing inputs.
These checks have not been run against a model yet. Your AI uses them to check its own work.
A second opinion
Before it hands back, your AI reviews the draft the way John Carmack and Margaret Hamilton would. This is a way of reviewing the work. It does not mean they wrote or endorse it.
Capabilities
- Map the money flow. It lists who pays, in which currencies, one-time or recurring, the refund rules and where the payout lands, before any code.
- Choose the provider surface. It prefers hosted or tokenized checkout, so card numbers never reach your servers, and explains why if anything heavier is needed.
- Design the states. It writes every payment and subscription state with its trigger and side effect. The unhappy paths get the same care as the happy one.
- Build the webhook backbone. It checks the signature, saves the verified event, skips repeats by event ID, and only then replies. Handlers can run twice safely.
- Add idempotency everywhere. Each charge, refund and plan change gets a key built from the business action, so a retry can't repeat it.
- Test failures and reconcile. It lists declines, 3-D Secure, replays and out-of-order events to test, and a daily check of payouts against your ledger.
How the role works
- Checks your task, context and available tools.
- Picks the methods needed and prepares a work plan.
- Carries out supported tasks, with each method's limits and review gates.
- Checks the real deliverables and corrects supported faults.
- Hands back files, evidence and unresolved gaps.
Your specialist's working setup
Download the base specialist without a task form or account. README.md and SETUP.md explain how to use the folder. SOUL.md defines its scope. INTAKE.md asks missing questions inside your AI. PLAYBOOK.md, SKILLS.md, BEST_PRACTICES.md, CHECKS.md and HANDOFF.md guide the work and its checked deliverables.
Complete associated skills, supporting files and licences are included. Choose only the methods needed for the actual task. Keep context, working files and accepted feedback in your AI project.
Use this specialist through MCP or the API
Call prepare_specialist with role_id engineering-payments-billing-engineer only. No task is required to load it. Your AI asks what job you need done, what you want back and which relevant context it can use.
For task-led hiring, call find_specialist, explain the suggested specialists and let the user accept or change the team.
Complete ZIP: Download base specialist. API: GET /api/v1/specialists/engineering-payments-billing-engineer/pack. The host AI supplies its own model, tools and execution; a pack does not connect accounts or run a task.
Inputs and helpful context
The specialist starts from the task brief. Only active methods require their inputs.
For the primary method, when used
- Your payment provider, what you sell, and the currencies you take
- Your checkout flow and what happens after payment, including refunds
- Your stack, such as language, database and queue
- A sample webhook payload, with names, emails and keys removed (optional)
- A payout report and your order list for the same dates, if the problem is a mismatch (optional)
Helpful context (optional)
- A list of the webhook events you receive today.
- Your refund and cancellation policy.
- Your finance team's month-end process.
Tools and access
- Claude, ChatGPT or Gemini with file upload: They can read your webhook samples and payout files alongside your brief.
- Your provider's test mode: It lets you try declines, 3-D Secure and replays with no real money.
Functions and deliverables
- Payments and billing engineer agent: Plan a Stripe, Adyen, Braintree or PayPal build with no double charges, safe webhooks, a small card-data footprint and daily reconciliation.
- A map of the money flow from checkout to payout, with each place it can fail
- Payment and subscription states, with every change and what must happen
- A webhook plan covering verify, store, dedupe and process
- The idempotency key to use for each money action
- Card-data scope advice and a failure test list
- A daily reconciliation check, and the questions still open
- Stripe payments builder: Describe your billing rules. Get Stripe code drafts for checkout, subscriptions, webhooks and local test steps.
- Checkout and subscription code
- A webhook route with a signature check
- Upgrade and downgrade code with a price preview
- Customer portal code
- An eight-step test run using the Stripe CLI
- Recoverable agent job queue builder: Plan an AI agent job queue that survives crashes, with no repeated paid work, capped retries, lost-job recovery and a safe path for failed jobs.
- A worker plan with the code changes needed in your files
- The job states and who moves a job from one to the next
- Start-up recovery steps and a dead-letter path with replay rules
- A failure checklist for the 10 most common queue problems
- Test cases to run before you rely on it
- Agent database setup planner: Plan the database your AI agents need. Get a schema map, migration steps, access rules and a staging test plan that keeps existing data safe.
- A schema map: the tables, columns, keys and indexes for jobs and activity
- Migration files in order, forward only, with what each one changes
- An access rule for each table, and which key belongs where
- A staging test plan using made-up rows
- A rollback and recovery plan
- A list of missing inputs and checks that did not run
- me.md builder: Answer a few questions, or let your AI use what it remembers. Get one private file that tells any AI who you are.
- One me.md file with up to ten dated sections
- A list of facts taken from memory, for you to check
- A short note of what it removed for privacy
- The two next steps, to save it and set it up
- John Carmack: Find a bug, slow step or excess scope through John Carmack’s recorded approach. Follow the actual run, measure first and expose hidden state.
- Your problem worked on the way John Carmack would: their questions, their method, their push-back
- The answer or the work, in John Carmack's voice, using their ideas by name
- Anything that goes beyond their public record, marked
- One suggested next step
- Margaret Hamilton: Review a system failure plan using Margaret Hamilton’s recorded approach. Check handoffs, priorities, warnings and what happens when people make mistakes.
- Your problem worked on the way Margaret Hamilton would: their questions, their method, their push-back
- The answer or the work, in Margaret Hamilton's voice, using their ideas by name
- Anything that goes beyond their public record, marked
- One suggested next step
Tasks you can use it for
- You are adding Stripe, Adyen, Braintree or PayPal checkout and never want to charge twice.
- Orders ship twice or not at all because payment webhooks arrive late or twice.
- You sell subscriptions and need rules for trials, upgrades, failed payments and cancels.
- Your payout from the processor doesn't match your orders and you can't see why.
Limits to check before starting
- You want your store's checkout settings checked, such as Shopify payments. Use the Payments and checkout settings checker.
- You want to learn why subscribers cancel. Use the Subscription churn auditor.
- You need to change live payments, issue refunds or answer a dispute. Do that in your processor's dashboard, with a qualified person for PCI sign-off.
Best way to use this role
Give it one clear outcome, the actual files and a definition of done. Keep the work in one AI project so it can reuse checked context and earlier files.
- Download the pack and add it to your AI as a skill. Or open a new chat and paste SKILL.md, then references/source-agent.md.
- Describe your provider, products, currencies and flow. Paste a sample webhook with all personal data and keys removed.
- Never paste card numbers, secret API keys or webhook signing secrets into any chat.
- It cannot reach your payment account or run on a schedule. It plans the daily check for your own system to run. To check a mismatch now, paste the payout report and the order list for the same dates.
- Read "Money flow" and "State tables" first. Check them against how your business really works.
- Run the failure test list in your provider's test mode before you go live.
- Ask a payments or security expert to review the design before it touches real money.
Read it as data
Read the complete role setup as JSON. Connect your AI to the AI Blocks MCP library and read aiblocks://roles/engineering-payments-billing-engineer for its role instructions and pinned sources.
This is a prepared AI role. No task has run. Your AI carries out authorized work using its available tools and reports the actual deliverables and checks.