Passer au contenu principal
POST
/
v1
/
subscriptions
/
{id}
/
update
Create subscription update
curl --request POST \
  --url https://api.hyperline.co/v1/subscriptions/{id}/update \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "add_product",
  "payload": {
    "product_id": "<string>",
    "billing_interval_count": 123,
    "type": "fee",
    "product_name": "<string>",
    "product_description": "<string>",
    "count": 1,
    "display_interval_dates_in_description": true,
    "prices": [
      {
        "type": "fee",
        "amount": 123
      }
    ]
  },
  "apply_at": "2024-12-20T16:04:11Z",
  "charge_at": "2024-12-20T16:04:11Z"
}
'
{
  "id": "<string>"
}

Autorisations

Authorization
string
header
requis

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

Paramètres de chemin

id
string
requis

Corps

application/json

Add a new product to bill as part of the subscription.

application_schedule
enum<string>
requis
Options disponibles:
immediately,
scheduled
payment_schedule
enum<string>
requis
Options disponibles:
immediately,
next_invoice,
custom
calculation_method
enum<string>
requis
Options disponibles:
pro_rata,
pay_in_full,
do_not_charge
type
requis
Options disponibles:
add_product
payload
object
requis
apply_at
string<date-time>

The date when the update should be applied. Required when application_schedule is 'scheduled'.

Exemple:

"2024-12-20T16:04:11Z"

charge_at
string<date-time>

The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.

Exemple:

"2024-12-20T16:04:11Z"

refund_method
enum<string>

Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's creditNoteWalletRefundEnabled setting.

Options disponibles:
wallet,
original_payment_method,
external

Réponse

Subscription update created

id
string
requis