When to use this
Customer changes plan, pauses, or extends their subscription. Update the schedule in place rather than tearing down and re-creating.
Endpoint
POST https://accounts.paytia.com/api/payment_service
Try it
Paste your sandbox key, edit any field, and hit Execute. Nothing is stored — the key travels to the Paytia proxy and the response comes straight back.
Sandbox or live key — nothing is stored.
Date: Supported format is date (YYYY-MM-DD) example 2022-06-16 This field provides the starting date of the subscription.
Date: Supported format is date (YYYY-MM-DD) example 2022-06-16 The date at which this phase of the subscription ends. If set, 'intervafrequency' must not be set.
String: Daily,weekly,monthly This provides three intervals for a subscription like: Subscription For - Daily | Weekly | Monthly
Integer: The number of intervals (specified in the interval attribute) between subscription billings. For Example: Interval=month and interval_count=3 bills every 3 months.
Numeric: value for the subscription gross charge stated to two decimal places.
Stripe Gateway Only Enter the subscription reference number that was returned when the payment schedule was set up We are expecting a value starting sub_sched_ or sub_
String value - Required field - Allows you to complete a validation, Reserve, and Capture payment type Supported values remove - this removes a Reserve Pre-Auth set on a card reserve_settle - Completes a Reserve Pre-Auth charge for the amount sent. Works with the Stripe pi_ value returned in the transaction post API. store_payment - works with a (Stripe) pm_ value. Card on file payment processed. cancel - cancels a subscription update - updates a subscription
Integer: representing the multiplier applied to the price interval. For Example - intervalfrequency=2 applied to a price with interval-month and intervalcount=3 results in a phase of duration 2*3 months = 6 months. If set, end_date must not be set.
curl --location --request POST 'https://accounts.paytia.com/api/payment_service' \
--header 'X-API-KEY: YOUR_API_KEY' \
--form 'start_date=2022-11-01' \
--form 'end_date=2023-12-31' \
--form 'interval=daily' \
--form 'intervalcount=1' \
--form 'subscription_amount=650' \
--form 'sub_sched_id={Enter the Stripe reference for the plan to be changed}' \
--form 'type=cancel'No response yet. Paste your key, tweak the values, and click Execute.
Fields
Full field-by-field reference below. Required vs optional varies by flow — the try-it explorer above starts with sensible defaults.
| Field | Type | Description |
|---|---|---|
| start_date | text | Date: Supported format is date (YYYY-MM-DD) example 2022-06-16 This field provides the starting date of the subscription. |
| end_date | text | Date: Supported format is date (YYYY-MM-DD) example 2022-06-16 The date at which this phase of the subscription ends. If set, 'intervafrequency' must not be set. |
| interval | select | String: Daily,weekly,monthly This provides three intervals for a subscription like: Subscription For - Daily | Weekly | Monthly |
| intervalcount | text | Integer: The number of intervals (specified in the interval attribute) between subscription billings. For Example: Interval=month and interval_count=3 bills every 3 months. |
| subscription_amount | text | Numeric: value for the subscription gross charge stated to two decimal places. |
| sub_sched_id | text | Stripe Gateway Only Enter the subscription reference number that was returned when the payment schedule was set up We are expecting a value starting sub_sched_ or sub_ |
| type | select | String value - Required field - Allows you to complete a validation, Reserve, and Capture payment type Supported values remove - this removes a Reserve Pre-Auth set on a card reserve_settle - Completes a Reserve Pre-Auth charge for the amount sent. Works with the Stripe pi_ value returned in the transaction post API. store_payment - works with a (Stripe) pm_ value. Card on file payment processed. cancel - cancels a subscription update - updates a subscription |
| intervalfrequency | text | Integer: representing the multiplier applied to the price interval. For Example - intervalfrequency=2 applied to a price with interval-month and intervalcount=3 results in a phase of duration 2*3 months = 6 months. If set, end_date must not be set. |