Skip to main content
POST
Update Merchant Subscription Config

Endpoint Overview

POST https://api.unibee.dev/merchant/subscription/config/update Update Merchant Subscription Config

Authorization

All UniBee Merchant API requests require authentication via API key.

Parameters

Parameters for this endpoint are listed below. The schema is also shown in the Try it panel.

Request body


Request examples

cURL

Sandbox


Response

Success responses return a JSON envelope with code, data, message, redirect, and requestId. code 0 indicates success.

Error handling

When code in the response body is non-zero, check message for details. Use requestId when contacting support.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
autoChargeMaxRetryCount
integer<*int64>

AutoChargeMaxRetryCount, max automatic-charge attempts for one invoice including the first automatic attempt; 0 = unlimited (current behavior). Omit to leave unchanged.

autoChargeRetryInterval
integer<*int64>

AutoChargeRetryInterval, seconds to wait before retrying a failed auto-charge within the window (default 12h). Omit to leave unchanged.

discountNewUserIgnoreFreeZeroInvoice
boolean<*bool>

DiscountNewUserIgnoreFreeZeroInvoice, when true ignore only true free-plan zeros (no discount code / discount amount / promo credit) for new-user scope; default false = legacy any paid invoice. Omit to leave unchanged.

downgradeEffectImmediately
boolean<*bool>

DowngradeEffectImmediately, Immediate Downgrade (by default, the downgrades takes effect at the end of the period )

downgradeNonImmediatelyEffectBeforePeriodEnd
integer<*int64>

DowngradeNonImmediatelyEffectBeforePeriodEnd, seconds, For non-immediate downgrade, can take effect before period end (default 30 minutes, 1800 seconds)

gatewayVATRule
object[]
incompleteExpireTime
integer<*int64>

IncompleteExpireTime, seconds, Incomplete Status Duration(The period during which subscription remains in 'incomplete')

invoiceEmail
boolean<*bool>

InvoiceEmail, Enable Invoice Email (Toggle to send invoice email to customers)

showZeroInvoice
boolean<*bool>

ShowZeroInvoice, Display Invoices With Zero Amount (Invoice With Zero Amount will hidden in list by default)

tryAutomaticPaymentBeforePeriodEnd
integer<*int64>

TryAutomaticPaymentBeforePeriodEnd, Auto-charge Start Before Period End (Time Difference for Auto-Payment Activation Before Period End)

upgradeProration
boolean<*bool>

UpgradeProration, Prorated Upgrade Invoices(Upgrades will generate prorated invoice by default)

upgradeResetBillingCycle
boolean<*bool>

UpgradeResetBillingCycle, same-interval upgrades only: full new-plan cycle from upgrade time and reset due day when true (default); legacy fixed-end proration when false. Omit on update to leave unchanged.

Response

200 - application/json
code
integer<int>
data
object
merchantId
integer<int64>
message
string<string>
redirect
string<string>
requestId
string<string>