Skip to main content
POST
C#

Cancel Escrow

Cancel an active escrow transaction. When an escrow order is cancelled before fulfillment or release of funds, StarPay marks the transaction as cancelled and initiates the refund workflow for the customer.

Endpoint

Authentication

Include your API secret in the request header. Header:
  • x-api-secret (string) — Required. Your StarPay API secret key. Generate this key from the Merchant Portal under API Keys.
Example:

Request Body

escrowId

The unique identifier of the escrow transaction you wish to cancel. Type: string — Required Example:

Example Request


Response

Success Response (200 OK)


Important Considerations

  • Cancellation Window: An escrow order can only be cancelled while funds are in the held state and before allocations have been fully released to merchants.
  • Customer Refund: Depending on the payment method used, the customer will receive an automatic refund or a refund credit in accordance with platform settlement policies.

Headers

x-api-secret
string
required

Your StarPay API secret key.

Example:

"SplFeYdc/Hc5S1CGmVDtETLYUJY/10a38ejamzwb1YH30h+u8sOK2fpTlyKitpPk"

Body

application/json

Escrow ID to cancel.

escrowId
string
required

Unique escrow transaction identifier to cancel.

Example:

"59667344"

Response

Escrow cancelled successfully.

status
string
required
Example:

"success"

timestamp
string<date-time>
required
Example:

"2026-07-29T11:30:00Z"

message
string
required
Example:

"Escrow cancelled successfully"

data
object
required