Pular para o conteúdo principal
POST
/
plans
/
{id}
/
prices
Create new price version
curl --request POST \
  --url https://billing-api.sandbox.z2pay.com/plans/{id}/prices \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "money": {
    "amount": 1,
    "currency": "<string>"
  },
  "recurrence": {
    "interval": 1,
    "anchorDay": 16,
    "collectionTiming": "prepaid"
  },
  "planItemId": "<string>",
  "planItemKey": "<string>",
  "billingScheme": "fixed",
  "tiers": [
    {
      "upTo": 1,
      "unitAmount": 1
    }
  ],
  "packageSize": 1,
  "meterId": "<string>"
}
'

Autorizações

x-api-key
string
header
obrigatório

API Key da Credential (gerada no Backoffice)

Cabeçalhos

Idempotency-Key
string

Unique key for request idempotency

Parâmetros de caminho

id
string
obrigatório

Plan ID

Corpo

application/json
money
object
obrigatório
recurrence
object
obrigatório
planItemId
string
Required string length: 1 - 36
planItemKey
string
Required string length: 1 - 100
Pattern: ^[a-z0-9-_]+$
billingScheme
enum<string>
padrão:fixed
Opções disponíveis:
fixed,
tiered,
per_unit,
package,
metered
tiers
object[]
packageSize
integer
Intervalo obrigatório: x >= 0
meterId
string
Maximum string length: 100
trialSpec
object

Resposta

Price created and marked as current