Skip to main content
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>"
}
'

Authorizations

x-api-key
string
header
required

API Key da Credential (gerada no Backoffice)

Headers

Idempotency-Key
string

Unique key for request idempotency

Path Parameters

id
string
required

Plan ID

Body

application/json
money
object
required
recurrence
object
required
planItemId
string
Required string length: 1 - 36
planItemKey
string
Required string length: 1 - 100
Pattern: ^[a-z0-9-_]+$
billingScheme
enum<string>
default:fixed
Available options:
fixed,
tiered,
per_unit,
package,
metered
tiers
object[]
packageSize
integer
Required range: x >= 0
meterId
string
Maximum string length: 100
trialSpec
object

Response

Price created and marked as current