subscriptions
Create subscription
subscriptions
Create subscription
Create a subscription
POST
/
v0
/
subscriptions
/
create
curl --request POST \
--url https://api.fungies.io/v0/subscriptions/create \
--header 'Content-Type: application/json' \
--header 'x-fngs-public-key: <api-key>' \
--header 'x-fngs-secret-key: <api-key>' \
--data '{
"userId": "<string>",
"userEmail": "<string>",
"backdateStartDate": 4503599627370495,
"billingCycleAnchor": 4503599627370495,
"trialEnd": 4503599627370495,
"skipTrial": true,
"skipNotifications": true,
"items": [
{
"offerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": 123,
"quantity": 1
}
]
}'
{
"status": "<string>",
"data": {
"subscription": {
"object": "subscription",
"id": "<string>",
"status": "all",
"createdAt": 4503599627370495,
"currentIntervalEnd": 4503599627370495,
"currentIntervalStart": 4503599627370495,
"cancelAtIntervalEnd": false,
"canceledAt": null,
"userId": null,
"user": null,
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderNumber": "<string>",
"order": {
"object": "order",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "<string>",
"status": "PENDING"
},
"lastPaymentId": null,
"lastPaymentNumber": null,
"lastPayment": null
}
}
}
Body
application/json
POST /v0/subscriptions/create Request body
Required range:
0 <= x <= 9007199254740991
Required range:
0 <= x <= 9007199254740991
Required range:
0 <= x <= 9007199254740991
Response
200
application/json
POST /v0/subscriptions/create Positive response
Allowed value:
"success"
Available options:
all
, active
, canceled
, incomplete
, incomplete_expired
, past_due
, trialing
, paused
, unpaid
Required range:
0 <= x <= 9007199254740991
Required range:
0 <= x <= 9007199254740991
Required range:
0 <= x <= 9007199254740991
Available options:
PENDING
, PAID
, FAILED
, UNPAID
, CANCELLED
, REFUNDED
, PARTIALLY_REFUNDED
, EXPIRED
Available options:
order
Available options:
subscription
Required range:
0 <= x <= 9007199254740991
Available options:
one_time
, subscription_initial
, subscription_update
, subscription_interval
, subscription_extra
, claim_free
Available options:
PENDING
, PAID
, FAILED
, UNPAID
, CANCELLED
, REFUNDED
, PARTIALLY_REFUNDED
, EXPIRED
Available options:
payment
curl --request POST \
--url https://api.fungies.io/v0/subscriptions/create \
--header 'Content-Type: application/json' \
--header 'x-fngs-public-key: <api-key>' \
--header 'x-fngs-secret-key: <api-key>' \
--data '{
"userId": "<string>",
"userEmail": "<string>",
"backdateStartDate": 4503599627370495,
"billingCycleAnchor": 4503599627370495,
"trialEnd": 4503599627370495,
"skipTrial": true,
"skipNotifications": true,
"items": [
{
"offerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": 123,
"quantity": 1
}
]
}'
{
"status": "<string>",
"data": {
"subscription": {
"object": "subscription",
"id": "<string>",
"status": "all",
"createdAt": 4503599627370495,
"currentIntervalEnd": 4503599627370495,
"currentIntervalStart": 4503599627370495,
"cancelAtIntervalEnd": false,
"canceledAt": null,
"userId": null,
"user": null,
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderNumber": "<string>",
"order": {
"object": "order",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "<string>",
"status": "PENDING"
},
"lastPaymentId": null,
"lastPaymentNumber": null,
"lastPayment": null
}
}
}