Skip to main content
PATCH
/
v0
/
subscriptions
/
{id}
Update
curl --request PATCH \
  --url https://api.paygentic.io/v0/subscriptions/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "endingAt": "2023-11-07T05:31:56Z",
  "terminatedAt": "2023-11-07T05:31:56Z",
  "terminatedBy": "<string>",
  "terminationReason": "<string>",
  "autoCharge": true,
  "taxExempt": true,
  "minimumAccountBalance": "<string>",
  "renewalReminderEnabled": true,
  "renewalReminderDays": 15
}
'
{
  "id": "sub_z1a2b3c4d5e6f7g8",
  "object": "subscription",
  "autoCharge": true,
  "taxExempt": false,
  "createdAt": "2024-01-10T08:00:00Z",
  "customerId": "cus_q3r4s5t6u7v8w9x0",
  "endingAt": "2024-12-31T23:59:59Z",
  "estimatedTaxRate": 8.5,
  "name": "StartupXYZ - Image Generation Service",
  "payment": null,
  "planId": "plan_t9u0v1w2x3y4z5a6",
  "prefundAmount": "50000000000",
  "startedAt": "2024-01-10T08:00:00Z",
  "status": "active",
  "terminatedAt": null,
  "terminatedBy": null,
  "terminationReason": null,
  "updatedAt": "2024-03-15T10:30:00Z",
  "walletId": "acc_b7c8d9e0f1g2h3i4"
}

Documentation Index

Fetch the complete documentation index at: https://docs.paygentic.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key authentication

Path Parameters

id
string
required

Body

application/json
endingAt
string<date-time>
status
enum<string>
Available options:
active,
terminated
terminatedAt
string<date-time>
terminatedBy
string

Identifier of entity that cancelled the subscription. Sample values: 'cust_abc123' for customer-initiated cancellation, 'org_xyz789' for merchant-initiated cancellation

terminationReason
string

Explanation for subscription cancellation. Sample values: 'Customer requested cancellation', 'Payment failure', 'Service migration', 'Contract expiration'

autoCharge
boolean

Enable or disable automatic charging of invoices using stored payment methods.

taxExempt
boolean

When true, forces tax rate to 0%.

minimumAccountBalance
string

Minimum wallet balance requirement in decimal dollars (e.g., '100.00'). Can be set to '0' to disable. Maximum allowed is $5,000. Contact support for higher limits. Note: If the calculated charge amount at renewal is below payment processor minimums (typically $1.00), it will be automatically adjusted upward to meet the minimum requirement. Changes apply at next renewal.

renewalReminderEnabled
boolean | null

Override plan setting for renewal reminder emails. Set to true to enable, false to disable, or null to use plan default.

renewalReminderDays
integer | null

Override plan setting for number of days before renewal to send the reminder. Set to null to use plan default.

Required range: 1 <= x <= 30

Response

Subscription updated

id
string
required
object
enum<string>
required
Available options:
subscription
createdAt
string<date-time>
required
customerId
string
required
name
string
required
planId
string
required
startedAt
string<date-time>
required
status
enum<string>
required
Available options:
pending_payment,
active,
terminated
updatedAt
string<date-time>
required
autoCharge
boolean
default:false

Whether automatic charging is enabled for this subscription. When true, invoices will be automatically paid using stored payment methods.

endingAt
string<date-time>
estimatedTaxRate
number

Projected tax percentage rate. Sample values: 8.875 indicates 8.875% tax rate, 10.0 indicates 10% tax rate, 0 indicates no tax applied

taxExempt
boolean
default:false

When true, tax rate is forced to 0%.

payment
object

Payment session details when upfront payment is required, or confirmation of a zero-amount paid invoice

prefundAmount
string

@deprecated Use minimumAccountBalance instead. Minimum required wallet balance in atomic units. Sample values: '200000000000' equals $200.00 minimum, '1000000000000' equals $1000.00 minimum

minimumAccountBalance
string

Minimum wallet balance requirement in nanodollars. Can be '0' to disable. The system calculates the difference between this minimum and the customer's current balance, charging only what's needed to reach the minimum. Note: If the calculated charge amount is below payment processor minimums (typically $1.00), the actual charged amount may be automatically adjusted upward to meet the minimum requirement. Sample values: '200000000000' equals $200.00 minimum, '1000000000000' equals $1000.00 minimum

terminatedAt
string<date-time>
terminatedBy
string

ID of who terminated the subscription (customer ID or merchant ID)

terminationReason
string

Reason for termination

testClockId
string

Test clock ID if this subscription is attached to a test clock. Only present in non-production environments.

walletId
string

Optional (virtual) wallet ID for the subscription

renewalReminderEnabled
boolean | null

Whether renewal reminder emails are enabled for this subscription. Null means use plan default.

renewalReminderDays
integer | null

Number of days before renewal to send the reminder. Null means use plan default.

autoApprove
boolean | null

Subscription-level auto-approval override. Null means plan default is used.

customer
object

Customer details with merchant and consumer information. Only included when include=customer is specified in the list query.