Upsert Subscription
Path Parameters
projectId*string
paymentProviderId*string
externalId*string
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
distinctId?string|null
customer?|null
productKey*string
status*string
Value in
- "trialing"
- "active"
- "past_due"
- "canceled"
- "expired"
currentPeriodStart*string
currentPeriodEnd*string
isAutoRenewing*boolean
canceledAt?string|null
updatedAt*string
environment?|null
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/api/v1/projects/string/payment-providers/string/subscriptions/string" \ -H "Content-Type: application/json" \ -d '{ "productKey": "string", "status": "trialing", "currentPeriodStart": "string", "currentPeriodEnd": "string", "isAutoRenewing": true, "updatedAt": "string" }'{ "id": "string", "paymentProviderId": "string", "status": "applied", "pendingReason": "product_not_mapped", "subscriptionId": "string"}{ "error": { "type": "invalid_request", "code": "string", "message": "string", "param": "string" }}{ "error": { "type": "unauthenticated", "code": "string", "message": "string", "param": "string" }}{ "error": { "type": "permission_denied", "code": "string", "message": "string", "param": "string" }}{ "error": { "type": "not_found", "code": "string", "message": "string", "param": "string" }}{ "error": { "type": "conflict", "code": "string", "message": "string", "param": "string" }}{ "error": { "type": "internal", "code": "string", "message": "string", "param": "string" }}