Create a plan
A price and a period for recurring invoices, on the key's app. Each period every active subscription to it gets an invoice: a payment the customer pays on its checkout page (no auto-debit).
apiKeyheader
AuthorizationBearer <token>lbp_test_... or lbp_live_...
Idempotency-Key*stringLength
length <= 255application/json- body
name*stringLength
1 <= length <= 100amount*integerWhole rupiah per period: 1,000 to 50,000,000 (QRIS up to 10,000,000; a VA from 10,000).
interval*method?stringHow each invoice is paid: any (the customer picks among the app's methods), qris, or va with va_bank.
Default
"any"Value in
"any""qris""va"va_bank?stringValue in
"mandiri""bri""bni""bsi""cimb""permata""maybank""danamon"expires_in?integerSeconds each invoice stays payable.
Range
3600 <= value <= 2592000Default
604800metadata?The plan
application/json- response
id*stringobject*"plan"Value in
"plan"app_id*stringmode*stringValue in
"test""live"name*stringamount*integerinterval*method*stringValue in
"any""qris""va"va_bank*string|nullexpires_in*integeractive*booleanmetadata*created_at*stringFormat
date-timecurl -X POST 'https://pay.piti.id/v1/billing/plans' \ -H 'Idempotency-Key: string' \ -H 'Content-Type: application/json' \ -d '{ "name": "Internet 20 Mbps", "amount": 150000, "interval": { "unit": "month", "count": 1 }}'Contoh respons
{ "id": "string", "object": "plan", "app_id": "string", "mode": "test", "name": "string", "amount": 0, "interval": { "unit": "day", "count": 0 }, "method": "any", "va_bank": "string", "expires_in": 0, "active": true, "metadata": {}, "created_at": "2019-08-24T14:15:22Z"}