01.software Docs

Cancel a PaymentSession as a server

Use the SDK for application integration. This read-only reference covers Commerce, Customer Auth, Membership and Events.

All HTTP operations
POST
/api/payment-sessions/server/cancel

Requires a tenant server credential with write scope. Optional initiatedBy (customer or operator) reports the initiator on behalf of that authenticated tenant server; omission defaults to operator. It grants no authority and preserves tenant and cancelability checks, including the PortOne Standard restriction. Retry with the original idempotency key preserves previously stored cancellation attribution, not the final no-capture verification method or actual customer departure cause. PortOne Hosted close alone does not confirm no capture or end the session; deferred expiry, webhook or reconcile release retains stored attribution even for omitted-field server calls and browser cancellation. Absent or null reasons keep existing expiry/provider classification without backfill. Deploy Console support before publishing the SDK and enabling callers to send this field; older Consoles reject it with 400 validation_failed without executing cancellation or releasing the slot. Older request/response shapes remain compatible, while later cancellationReason values may retain operator/customer instead of expired/provider.

Authorization

publishableKeyserverSecretKey
headerX-Publishable-Key<token>

Tenant publishable key for authentication (sent via X-Publishable-Key header)

headerAuthorizationBearer <token>

Public integration credential: opaque sk01_ secret API key only; PAT and Customer JWT are not supported by this scheme. Requires tenant binding and the read or write scope named by the operation.

Header Parameters

X-Idempotency-Key*string

Caller-generated retry identity. Reuse the same key only when retrying the same logical operation.

Match^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|ik_[A-Za-z0-9_-]{22})$
Lengthlength <= 255

Request Body

application/json
  1. body
paymentSessionId*string
Length1 <= length <= 255
initiatedBy?string
Value in"customer""operator"

Response Body

Cancel a PaymentSession as a server result

application/json
  1. response
id*string
Length1 <= length
money*
expiresAt*|
Formatdate-time
provider*"toss"
Value in"toss"
providerStatus*string
Value in"requires_payment_method""requires_action"
sessionRole*"active"
Value in"active"
presentationStatus*"actionable"
Value in"actionable"
finalizationStatus*"not_ready"
Value in"not_ready"
nextAction*
reconciliation*
order*|
Value innull

Examples may be generated from schemas; they are illustrative, not recorded successful API calls. Example snippets may omit required authentication headers.

Example Request
curl -X POST 'https://api.01.software/api/payment-sessions/server/cancel' \  -H 'X-Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "paymentSessionId": "string"}'
Example Response
{  "id": "string",  "money": {    "amountMinor": 0,    "currency": "string"  },  "expiresAt": "2019-08-24T14:15:22Z",  "provider": "toss",  "providerStatus": "requires_payment_method",  "sessionRole": "active",  "presentationStatus": "actionable",  "finalizationStatus": "not_ready",  "nextAction": {    "type": "toss_widget",    "clientKey": "string",    "paymentMethodVariantKey": "string",    "agreementVariantKey": "string",    "providerOrderId": "string",    "providerCustomerKey": "string",    "orderName": "string",    "customerName": "string",    "customerEmail": "user@example.com"  },  "reconciliation": {    "status": "none"  },  "order": null}