• Precios
  • Blog
Iniciar sesiónAgendá una demo
Adjust balance POSTApply an Offer to a subscription PUTCancel subscription POSTChange plan POSTCreate a recovery payment link for a past due subscription POSTCreate subscription POSTGet active subscription GETGet subscription by ID GETList subscriptions GETPreview plan change POSTReactivate a past due or canceled subscription POSTRemove an Offer from a pending checkout DELETETop up balance POSTRevert scheduled cancellation POSTUpdate payment method POST
DocumentaciónRecursosConstruir con AIAPI ReferenceWebhooks

Remove an Offer from a pending checkout

Remove the quoted direct Offer from a subscription's pending payment checkout. The existing checkout URL remains unchanged and returns to its undiscounted price.

DELETE
/subscriptions/{id}/offer

Remove the quoted direct Offer from a subscription's pending payment checkout. The existing checkout URL remains unchanged and returns to its undiscounted price.

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/subscriptions/string/offer"
{  "id": "string",  "customerId": "string",  "plan": {    "id": "string",    "name": "string",    "basePrice": 0  },  "name": "string",  "description": "string",  "status": "draft",  "billingInterval": "weekly",  "trialEndsAt": "2019-08-24T14:15:22Z",  "currentPeriod": {    "start": "2019-08-24T14:15:22Z",    "end": "2019-08-24T14:15:22Z",    "daysRemaining": 0  },  "cancellation": {    "scheduledAt": "2019-08-24T14:15:22Z",    "reason": "string",    "effectiveAt": "2019-08-24T14:15:22Z"  },  "cancelAtPeriodEnd": true,  "scheduledPlanChange": {    "changeType": "plan_downgrade",    "newPlanId": "string",    "newPlanName": "string",    "newBillingInterval": "string",    "scheduledFor": "2019-08-24T14:15:22Z"  },  "startDate": "2019-08-24T14:15:22Z",  "endDate": "2019-08-24T14:15:22Z",  "billingDayOfMonth": -9007199254740991,  "nextBillingDate": "2019-08-24T14:15:22Z",  "checkoutUrl": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "offerApplications": [    {      "id": "string",      "name": "string",      "appliesTo": {        "type": "plan_price",        "id": "string"      },      "offerId": "string",      "source": "direct",      "status": "quoted",      "currency": "string",      "subtotal": -9007199254740991,      "discountAmount": -9007199254740991,      "total": -9007199254740991,      "phases": [        {          "type": "free_trial",          "durationDays": 1,          "durationInterval": "weekly",          "startsAt": "2019-08-24T14:15:22Z",          "endsAt": "2019-08-24T14:15:22Z"        }      ],      "quotedAt": "2019-08-24T14:15:22Z",      "expiresAt": "2019-08-24T14:15:22Z",      "appliedAt": "2019-08-24T14:15:22Z"    }  ],  "planGrant": {    "id": "string",    "plan": {      "id": "string",      "name": "string"    },    "expiresAt": "2019-08-24T14:15:22Z"  },  "consumptionModel": "metered",  "features": [    {      "code": "string",      "name": "string",      "type": "boolean",      "enabled": true,      "baseAccess": {        "enabled": true      }    }  ],  "credits": {    "remaining": 0,    "included": 0,    "purchased": 0  },  "balance": {    "remaining": 0,    "included": 0,    "currency": "string"  },  "priceId": "string",  "object": "subscription",  "livemode": true}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}

Reactivate a past due or canceled subscription POST

Reactivates a subscription. A past_due subscription retries its outstanding renewal charge (recovering to active on success). A canceled subscription generates a fresh invoice, charges the saved card, and resets the billing period. On a successful charge the subscription becomes active; a declined charge returns an error with a recoveryUrl in the error details that can be sent to the customer to update their card. A canceled subscription may apply an Offer by offerId; past-due recovery cannot.

Top up balance POST

Top up a subscription's balance. Charges the customer's payment method for the specified amount.