Skip to content
API reference

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.

MethodPathSummaryAuthStatus
POST/v1/commerce/purchase-intentsCreate purchase intentConsumer sessionserved
GET/v1/commerce/purchase-intents/{intent_id}Get my purchase intentConsumer sessionserved
GET/v1/commerce/purchasesList my purchasesConsumer sessionserved
POST/v1/commerce/purchases/verifySubmit purchaseConsumer sessionserved
GET/v1/commerce/purchases/{purchase_id}Get my purchaseConsumer sessionserved
POST/v1/commerce/purchases/{purchase_id}/refundRequest refundOperator sessionserved
POST/v1/commerce/reconciliationStart reconciliationOperator sessionserved
POST/v1/commerce/restoreRestore purchasesConsumer sessionserved
GET/v1/commerce/subscriptionsList my subscriptionsConsumer sessionserved
GET/v1/commerce/subscriptions/{subscription_id}Get subscriptionConsumer sessionserved
POST/webhooks/apple-store/{connection_ref}Webhook apple storeProvider signatureserved
POST/webhooks/google-play/{connection_ref}Webhook google playProvider signatureserved
POST/webhooks/razorpay/{connection_ref}Webhook razorpayProvider signatureserved
POST/webhooks/stripe/{connection_ref}Webhook stripeProvider signatureserved

POST /v1/commerce/purchase-intents

Create purchase intent.

Operation IDcreatePurchaseIntent
AuthConsumer session (app user)
StatusServed
Idempotency-KeyRequired — see idempotency

Request body (application/json, required): PurchaseCreate

Responses

Errors: 400 401 403 404 409 422 429 503 as problem details.

GET /v1/commerce/purchase-intents/{intent_id}

Get my purchase intent.

Operation IDgetMyPurchaseIntent
AuthConsumer session (app user)
StatusServed

Parameters

NameInTypeRequiredNotes
intent_idpathstringyesmin length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$

Responses

Errors: 400 401 403 404 409 422 429 503 as problem details.

GET /v1/commerce/purchases

List my purchases.

Operation IDlistMyPurchases
AuthConsumer session (app user)
StatusServed

Responses

  • 200 Successful 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 IDsubmitPurchase
AuthConsumer session (app user)
StatusServed
Idempotency-KeyRequired — see idempotency

Request body (application/json, required): PurchaseSubmit

Responses

Errors: 400 401 403 404 409 422 429 503 as problem details.

GET /v1/commerce/purchases/{purchase_id}

Get my purchase.

Operation IDgetMyPurchase
AuthConsumer session (app user)
StatusServed

Parameters

NameInTypeRequiredNotes
purchase_idpathstringyesmin length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$

Responses

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 IDrequestRefund
AuthOperator session (console)
StatusServed
Idempotency-KeyRequired — see idempotency

Parameters

NameInTypeRequiredNotes
purchase_idpathstringyesmin length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$

Request body (application/json, required): RefundRequest

Responses

  • 202 Accepted for asynchronous processing — Job

Errors: 400 401 403 404 409 422 429 503 as problem details.

POST /v1/commerce/reconciliation

Start reconciliation.

Operation IDstartReconciliation
AuthOperator session (console)
StatusServed
Idempotency-KeyRequired — see idempotency

Request body (application/json, required): ReasonRequest

Responses

  • 202 Accepted for asynchronous processing — Job

Errors: 400 401 403 404 409 422 429 503 as problem details.

POST /v1/commerce/restore

Restore purchases.

Operation IDrestorePurchases
AuthConsumer session (app user)
StatusServed
Idempotency-KeyRequired — see idempotency

Request body (application/json, required): RestoreRequest

Responses

  • 202 Accepted for asynchronous processing — Job

Errors: 400 401 403 404 409 422 429 503 as problem details.

GET /v1/commerce/subscriptions

List my subscriptions.

Operation IDlistMySubscriptions
AuthConsumer session (app user)
StatusServed

Responses

  • 200 Successful 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 IDgetSubscription
AuthConsumer session (app user)
StatusServed

Parameters

NameInTypeRequiredNotes
subscription_idpathstringyesmin length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$

Responses

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 IDwebhookAppleStore
AuthProvider signature (store / provider webhook)
StatusServed

Parameters

NameInTypeRequiredNotes
connection_refpathstringyesmin length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$

Request body (application/json, required): object

Responses

  • 200 Successful 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 IDwebhookGooglePlay
AuthProvider signature (store / provider webhook)
StatusServed

Parameters

NameInTypeRequiredNotes
connection_refpathstringyesmin length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$

Request body (application/json, required): object

Responses

  • 200 Successful 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 IDwebhookRazorpay
AuthProvider signature (store / provider webhook)
StatusServed

Parameters

NameInTypeRequiredNotes
connection_refpathstringyesmin length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$

Request body (application/json, required): object

Responses

  • 200 Successful 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 IDwebhookStripe
AuthProvider signature (store / provider webhook)
StatusServed

Parameters

NameInTypeRequiredNotes
connection_refpathstringyesmin length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$

Request body (application/json, required): object

Responses

  • 200 Successful 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.