01.software Docs

Create a PaymentSession

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

All HTTP operations
POST
/api/payment-sessions/create

Authorization

headerX-Publishable-Key<token>

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

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
Accept?"application/vnd.01software.portone-action-capabilities.v1+json"

Opt in to Standard V2 action capability literals with this exact single media type. Lists, wildcards, parameters, and q-values do not opt in and receive the released exact action projection.

Value in"application/vnd.01software.portone-action-capabilities.v1+json"

Request Body

application/json
  1. body
checkoutToken*string
Length1 <= length <= 512
provider*"toss"
Value in"toss"
providerOptions*

Response Body

Create a PaymentSession result

  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/create' \  -H 'X-Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "checkoutToken": "string",  "provider": "toss",  "providerOptions": {    "profile": "widget_v2"  }}'
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}