Commet
  • Precios
Iniciar SesiónRegistrarse
Create offer POSTDelete offer DELETEGet offer GETList offers GETUpdate offer PATCH
DocumentaciónRecursosConstruir con AIAPI ReferenceWebhooks

Update offer

Replace an offer's catalog definition. Existing offer applications keep their immutable accepted terms.

PATCH
/offers/{id}

Replace an offer's catalog definition. Existing offer applications keep their immutable accepted terms.

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Path Parameters

id*string

Header Parameters

Idempotency-Key?string

Unique key used to safely retry this write for 24 hours without applying it twice.

Length1 <= length <= 200

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name*string
Length1 <= length <= 200
purpose*string

Value in

  • "introductory"
  • "promotional"
planPriceIds*array<>
Items1 <= items
phases*array<|||>
Items1 <= items <= 10
metadata?
Default{}
startsAt?|
Defaultnull
endsAt?|
Defaultnull
active?boolean
Defaulttrue

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/offers/string" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "purpose": "introductory",    "planPriceIds": [      "string"    ],    "phases": [      {        "type": "free_trial",        "durationDays": 1      }    ]  }'
{  "id": "string",  "name": "string",  "purpose": "introductory",  "planPriceIds": [    "string"  ],  "phases": [    {      "type": "free_trial",      "durationDays": 1    }  ],  "metadata": {    "property1": null,    "property2": null  },  "startsAt": "2019-08-24T14:15:22Z",  "endsAt": "2019-08-24T14:15:22Z",  "active": true,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "object": "offer",  "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"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}

List offers GET

List the organization's canonical introductory and promotional offers.

Cancel a payment link POST

Cancel a pending payment link so it can no longer be paid. Only a link that has not been paid or started processing can be canceled; canceling an already canceled link is a no-op. Charges cannot be canceled.