Skip to main content
POST
/
v1
/
accounts
/
{account_id}
/
price-trigger-swaps
/
{price_trigger_swap_id}
/
cancel
curl
curl -X POST "https://api.services.payward.com/v1/accounts/W4BE9868GY65TB6523/price-trigger-swaps/swap_01J0M7C0Z9F8YX3GQH8E/cancel" \
  -H "API-Key: $PWS_API_KEY" \
  -H "API-Nonce: $PWS_API_NONCE" \
  -H "API-Sign: $PWS_API_SIGN" \
  -H "Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000"
{
  "error": {
    "instance": "<string>",
    "causes": [
      {
        "code": "<string>",
        "param": "<string>",
        "detail": "<string>"
      }
    ],
    "doc_url": "<string>"
  }
}

Authorizations

API-Key
string
header
required

Your public API key. Identifies the partner making the request.

API-Nonce
string
header
required

Monotonically increasing nonce included in the request signature.

API-Sign
string
header
required

HMAC signature over the request, computed with your private key.

Headers

Idempotency-Key
string<uuid>

Client-generated UUIDv4 for safe retries. Sent as the Idempotency-Key HTTP header. Replayed responses include the Idempotent-Replayed: true header.

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
Example:

"550e8400-e29b-41d4-a716-446655440000"

Path Parameters

account_id
string
required

ID of the account the request applies to. This refers to one of the accounts held by the user the request is acting on behalf of (typically the user's main account, but any of the user's accounts is accepted). Routes the request to that specific account container. Canonical identifier for an account in the Payward public API.

Required string length: 14 - 42
price_trigger_swap_id
string
required

ID of the price trigger swap to cancel (prefixed with swap_).

Response

Cancelled. The response body is empty; re-fetch the swap via GET /v1/accounts/{account_id}/price-trigger-swaps/{price_trigger_swap_id} if you need the post-cancel state.