Commerce API
Purchase intents, store verification, restore, subscriptions and store notifications.
On this page
Contract version 1.1.0. 14 operations; 14 served, 0 specified only.
Note
"Served" means the endpoint exists in the runtime, not that it is enabled for your app. Provider-backed endpoints return 503 FEATURE_UNAVAILABLE until the matching connection is ready.
| Method | Path | Summary | Auth | Status |
|---|---|---|---|---|
| POST | /v1/commerce/purchase-intents | Create purchase intent | Consumer session | served |
| GET | /v1/commerce/purchase-intents/{intent_id} | Get my purchase intent | Consumer session | served |
| GET | /v1/commerce/purchases | List my purchases | Consumer session | served |
| POST | /v1/commerce/purchases/verify | Submit purchase | Consumer session | served |
| GET | /v1/commerce/purchases/{purchase_id} | Get my purchase | Consumer session | served |
| POST | /v1/commerce/purchases/{purchase_id}/refund | Request refund | Operator session | served |
| POST | /v1/commerce/reconciliation | Start reconciliation | Operator session | served |
| POST | /v1/commerce/restore | Restore purchases | Consumer session | served |
| GET | /v1/commerce/subscriptions | List my subscriptions | Consumer session | served |
| GET | /v1/commerce/subscriptions/{subscription_id} | Get subscription | Consumer session | served |
| POST | /webhooks/apple-store/{connection_ref} | Webhook apple store | Provider signature | served |
| POST | /webhooks/google-play/{connection_ref} | Webhook google play | Provider signature | served |
| POST | /webhooks/razorpay/{connection_ref} | Webhook razorpay | Provider signature | served |
| POST | /webhooks/stripe/{connection_ref} | Webhook stripe | Provider signature | served |
POST /v1/commerce/purchase-intents
Create purchase intent.
| Operation ID | createPurchaseIntent |
| Auth | Consumer session (app user) |
| Status | Served |
| Idempotency-Key | Required — see idempotency |
Request body (application/json, required): PurchaseCreate
Responses
200Successful operation —PurchaseIntent
Errors: 400 401 403 404 409 422 429 503 as problem details.
GET /v1/commerce/purchase-intents/{intent_id}
Get my purchase intent.
| Operation ID | getMyPurchaseIntent |
| Auth | Consumer session (app user) |
| Status | Served |
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
intent_id | path | string | yes | min length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$ |
Responses
200Successful operation —PurchaseIntent
Errors: 400 401 403 404 409 422 429 503 as problem details.
GET /v1/commerce/purchases
List my purchases.
| Operation ID | listMyPurchases |
| Auth | Consumer session (app user) |
| Status | Served |
Responses
200Successful operation — Envelope{ request_id, data, next_cursor? }(data shape not yet pinned in the contract)
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /v1/commerce/purchases/verify
Submit purchase.
| Operation ID | submitPurchase |
| Auth | Consumer session (app user) |
| Status | Served |
| Idempotency-Key | Required — see idempotency |
Request body (application/json, required): PurchaseSubmit
Responses
200Successful operation —VerifiedPurchase
Errors: 400 401 403 404 409 422 429 503 as problem details.
GET /v1/commerce/purchases/{purchase_id}
Get my purchase.
| Operation ID | getMyPurchase |
| Auth | Consumer session (app user) |
| Status | Served |
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
purchase_id | path | string | yes | min length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$ |
Responses
200Successful operation —VerifiedPurchase
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /v1/commerce/purchases/{purchase_id}/refund
Request refund. Only supported provider actions. Full/partial/quantity validate remaining refundable balance/provider capability. Apple user refund request flow differs. Never imply arbitrary refund authority.
| Operation ID | requestRefund |
| Auth | Operator session (console) |
| Status | Served |
| Idempotency-Key | Required — see idempotency |
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
purchase_id | path | string | yes | min length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$ |
Request body (application/json, required): RefundRequest
Responses
202Accepted for asynchronous processing —Job
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /v1/commerce/reconciliation
Start reconciliation.
| Operation ID | startReconciliation |
| Auth | Operator session (console) |
| Status | Served |
| Idempotency-Key | Required — see idempotency |
Request body (application/json, required): ReasonRequest
Responses
202Accepted for asynchronous processing —Job
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /v1/commerce/restore
Restore purchases.
| Operation ID | restorePurchases |
| Auth | Consumer session (app user) |
| Status | Served |
| Idempotency-Key | Required — see idempotency |
Request body (application/json, required): RestoreRequest
Responses
202Accepted for asynchronous processing —Job
Errors: 400 401 403 404 409 422 429 503 as problem details.
GET /v1/commerce/subscriptions
List my subscriptions.
| Operation ID | listMySubscriptions |
| Auth | Consumer session (app user) |
| Status | Served |
Responses
200Successful operation — Envelope{ request_id, data, next_cursor? }(data shape not yet pinned in the contract)
Errors: 400 401 403 404 409 422 429 503 as problem details.
GET /v1/commerce/subscriptions/{subscription_id}
Get subscription.
| Operation ID | getSubscription |
| Auth | Consumer session (app user) |
| Status | Served |
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
subscription_id | path | string | yes | min length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$ |
Responses
200Successful operation —Subscription
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /webhooks/apple-store/{connection_ref}
Webhook apple store. Raw body authentication and provider-specific schema. Persist before ACK; app/environment/account verification required. Opaque connection_ref is routing, not authentication.
| Operation ID | webhookAppleStore |
| Auth | Provider signature (store / provider webhook) |
| Status | Served |
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
connection_ref | path | string | yes | min length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$ |
Request body (application/json, required): object
Responses
200Successful operation — Envelope{ request_id, data, next_cursor? }(data shape not yet pinned in the contract)
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /webhooks/google-play/{connection_ref}
Webhook google play. Raw body authentication and provider-specific schema. Persist before ACK; app/environment/account verification required. Opaque connection_ref is routing, not authentication.
| Operation ID | webhookGooglePlay |
| Auth | Provider signature (store / provider webhook) |
| Status | Served |
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
connection_ref | path | string | yes | min length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$ |
Request body (application/json, required): object
Responses
200Successful operation — Envelope{ request_id, data, next_cursor? }(data shape not yet pinned in the contract)
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /webhooks/razorpay/{connection_ref}
Webhook razorpay. Raw body authentication and provider-specific schema. Persist before ACK; app/environment/account verification required. Opaque connection_ref is routing, not authentication.
| Operation ID | webhookRazorpay |
| Auth | Provider signature (store / provider webhook) |
| Status | Served |
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
connection_ref | path | string | yes | min length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$ |
Request body (application/json, required): object
Responses
200Successful operation — Envelope{ request_id, data, next_cursor? }(data shape not yet pinned in the contract)
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /webhooks/stripe/{connection_ref}
Webhook stripe. Raw body authentication and provider-specific schema. Persist before ACK; app/environment/account verification required. Opaque connection_ref is routing, not authentication.
| Operation ID | webhookStripe |
| Auth | Provider signature (store / provider webhook) |
| Status | Served |
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
connection_ref | path | string | yes | min length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$ |
Request body (application/json, required): object
Responses
200Successful operation — Envelope{ request_id, data, next_cursor? }(data shape not yet pinned in the contract)
Errors: 400 401 403 404 409 422 429 503 as problem details.