Skip to main content
POST
Cancel unpaid payment
Cancels a receive Payment before provider detection or verified escrow funds. Send a reasonCode (customer_request, duplicate, abandoned or other) and an optional reason. Replaying the cancel on an already-cancelled Payment returns the same Payment. Outgoing executions cannot be cancelled until cancellation can be guaranteed safe across every payment source. See Error handling.

Authorizations

Authorization
string
header
required

HTTP Basic auth. Username is the Stableyard app ID. Password is the app secret. The optional Stableyard-Version request header must match the environment pin.

Headers

Stableyard-Version
enum<string>

Optional contract-version assertion. Omit it to use the app environment's pinned version. A different supported version is accepted only after that environment is explicitly migrated.

Available options:
2026-09-09

Path Parameters

paymentId
string
required

Canonical payment_* identifier. Internal execution identifiers are never accepted by Partner Payment routes.

Pattern: ^payment_[A-Za-z0-9_-]+$
Example:

"payment_123"

Body

application/json
reasonCode
enum<string>
required
Available options:
customer_request,
duplicate,
abandoned,
other
reason
string
Required string length: 1 - 500

Response

Cancelled payment

payment
object
required
nextAction
Action required · object
required

The exact action the caller must complete. Null means Stableyard needs no action from the partner right now.

checkout
object