Model payment states and outcomes
Define paid, failed, pending, canceled, and refunded states so order, access, and payment records agree.
Connect payment state to the product and operations around it.
Need this done for you?
Tell us about your projectThe short answer
What should a payment integration scope cover beyond the pay button?
List the payment states your business uses, what each one allows, and how provider notifications are verified and de-duplicated. Include refunds, failed renewals and cancellations in testing.
A fictional membership site charges monthly. One member's renewal fails. The site still shows them as active, and nobody on the team knows.
Concept data only. Your provider, plans and rules decide the real states.
Output: A failed renewal changes the member's state once, sends one message, alerts one named person and can be reversed when payment succeeds.
Define paid, failed, pending, canceled, and refunded states so order, access, and payment records agree.
Verify webhook signatures, return 2xx fast, log event IDs, and handle out-of-order delivery.
Use idempotency keys, test renewals and cancellations, and confirm PCI scope with your provider.
Planning payments for your product?
Tell us about your projectWrite each payment state and what it permits for access and fulfillment.
Decide which notifications update your records and which system stores the result.
Require signature checks, a fast success reply and a log of processed event IDs.
Say which requests are safe to repeat and how repeats are recognized.
List refunds, cancellations, failed renewals and plan changes and the expected result of each.
Test each state in the provider's test mode and record the customer message and internal record for each.
| State | Customer sees | Access or fulfillment | Team action |
|---|---|---|---|
| Paid | Receipt | Granted | None |
| Pending | Awaiting confirmation | Held | Check again later |
| Failed | Retry message | Not granted | Alert after repeated failures |
| Refunded | Refund notice | Removed | Update the order record |
| Event | Question for the brief | Record to check |
|---|---|---|
| Full refund | Is access removed, and when? | Order and access records |
| Partial refund | Does the order stay paid in part? | Order amount and status |
| Cancellation | Does access end now or at period end? | Access end date |
| Plan change | Is the change applied now or next cycle? | Plan and next charge |
| Failed renewal | What is the grace rule, and who is told? | State, message and alert |
Fill in one line per point.
Payment states: paid, pending, failed, canceled, refunded
Access per state: what each state allows
Source of truth: which record holds payment status
Notifications: which events update your records
Verification: signature checked before any action
Duplicates: processed event IDs are logged
Ordering: logic does not depend on arrival order
Repeatable requests: how a repeat is recognized
Later events: refunds, cancellations, failed renewals, plan changes
Card data: responsibilities confirmed with provider or adviser
Alerts: named person for failed eventsYou don’t need a finished brief. Tell us what you want to change or build, and we’ll reply by email with a sensible first step.