Repository navigation
docs(sandbox): move the manual cancellation suffixes to their own page #1193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| --- | ||
| hidden: true | ||
| title: "Sandbox Manual Cancellations" | ||
| description: "Simulate a payout that is cancelled and refunded on your customer's request" | ||
| icon: "/images/icons/hammer.svg" | ||
| "og:image": "/images/og/og-api-reference.png" | ||
| --- | ||
|
|
||
| A manual cancellation happens when your customer asks for a payout to be | ||
| cancelled, and the sender is refunded. Use these suffixes on the external | ||
| account a quote pays out to. They work the same way as the | ||
| [quote destination test patterns](/api-reference/sandbox-testing#creating-quotes). | ||
|
|
||
| | Suffix | Behavior | | ||
| |--------|----------| | ||
| | **006** | Cancelled after completion — the payment completes, then about two minutes later the sender is refunded | | ||
| | **008** | Cancelled while processing — the sender is refunded about a minute after execution, then the payment completes about two minutes later | | ||
|
|
||
| In both cases the refund has `reason: USER_CANCELLATION`, and the transaction | ||
| status stays `COMPLETED`. Check the transaction's `refund` object to see that | ||
| the sender got the money back. | ||
|
|
||
| ## Webhook order | ||
|
|
||
| **006 — cancelled after completion:** | ||
|
|
||
| 1. `OUTGOING_PAYMENT.PENDING` | ||
| 2. `OUTGOING_PAYMENT.PROCESSING` | ||
| 3. `OUTGOING_PAYMENT.COMPLETED` | ||
| 4. `OUTGOING_PAYMENT.REFUND_PENDING` | ||
| 5. `OUTGOING_PAYMENT.REFUND_COMPLETED` | ||
|
|
||
| **008 — cancelled while processing:** | ||
|
|
||
| 1. `OUTGOING_PAYMENT.PENDING` | ||
| 2. `OUTGOING_PAYMENT.PROCESSING` | ||
| 3. `OUTGOING_PAYMENT.REFUND_PENDING` | ||
| 4. `OUTGOING_PAYMENT.REFUND_COMPLETED` | ||
| 5. `OUTGOING_PAYMENT.COMPLETED` | ||
|
|
||
| <Info> | ||
| With **008**, `OUTGOING_PAYMENT.COMPLETED` arrives after the refund settles. | ||
| This means the payout was delivered even though the sender was refunded. See | ||
| the Manual Cancellation flow in | ||
| [Transaction Lifecycle](/platform-overview/core-concepts/transaction-lifecycle). | ||
| </Info> |
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing
006and008makes “Any other ending succeeds normally” incorrect. Both endings still trigger refunds, as the new page explains. The shared quote table also labels unlisted endings as successful payments. Developers choosing an unlisted suffix for a normal sandbox payout can therefore trigger a cancellation instead. Exclude these endings from both fallback descriptions without restoring them to the main table.Prompt To Fix With AI