Skip to main content
POST
Create subscription

Authorizations

public-api-key
string
header
required

Your public API key from the Yuno Dashboard

private-secret-key
string
header
required

Your private secret key (server-side only)

Body

application/json
customer_id
string<uuid>
required

The customer for this subscription

Example:

"c9d0e1f2-3a4b-5c6d-7e8f-9a0b1c2d3e4f"

amount
object
required
Example:
country
string
required

ISO 3166-1 alpha-2 country code

Pattern: ^[A-Z]{2}$
Example:

"BR"

interval
enum<string>
required

Billing interval

Available options:
DAILY,
WEEKLY,
MONTHLY,
YEARLY
Example:

"MONTHLY"

payment_method_id
string<uuid>

Enrolled payment method to charge

Example:

"pm_1a2b3c4d-5e6f-7890-abcd-ef1234567890"

description
string

Subscription description

Example:

"Premium Plan - Monthly"

start_date
string<date-time>

When to start billing

Example:

"2026-03-01T00:00:00.000Z"

Response

Subscription created successfully

id
string<uuid>
status
enum<string>
Available options:
ACTIVE,
PAUSED,
CANCELLED,
PAST_DUE,
EXPIRED
amount
object
Example:
interval
enum<string>
Available options:
DAILY,
WEEKLY,
MONTHLY,
YEARLY
next_payment_date
string<date-time>
created_at
string<date-time>
updated_at
string<date-time>