Modify an existing plan
PUT
bearerAuthheader
AutorizaciónBearer <token>Your API key, created in Configuración → Claves API. The key alone, without the Bearer prefix, is accepted too.
application/json- body
name*stringLongitud
4 <= lengthdescription?string|nullcurrency?stringValor en
"VES""USD""EUR"status?stringValor en
"ACTIVE""INACTIVE"schedule?stringValor en
"SUBSCRIPTION_START""PLAN_DATES"billingCycle?|nulladvanceBillingDays?numberRango
0 <= valueadvanceDueDateDays?numberRango
0 <= value <= 300price*numberRango
1 <= valuelateFee?numberRango
0 <= valuelateFeeType?stringValor en
"PERCENTAGE""FIXED"discountExpiresIn?numberRango
0 <= valuediscountValue?numberRango
0 <= valuediscountValueType?stringValor en
"PERCENTAGE""FIXED"billingDates?array<>accountPaymentMethodIds?array<string>singleInvoicePerSubscription?booleanplanProducts?array<>Elementos
items <= 20Por defecto
[]planId*stringPatrón
^[cC][0-9a-z]{6,}$Formato
cuidSuccessful response
application/json- response
schedule*stringValor en
"SUBSCRIPTION_START""PLAN_DATES"billingCycle*|nullcurrency*stringValor en
"VES""USD""EUR"pricingMode*stringValor en
"CURRENCY""REFERENCE"status*stringValor en
"ACTIVE""INACTIVE"lateFeeType*|nulldiscountValueType*|nullid*stringPatrón
^[cC][0-9a-z]{6,}$Formato
cuidaccountId*stringname*stringdescription*string|nullprice*numberadvanceBillingDays*|nulladvanceDueDateDays*|nullstartDate*stringendDate*string|nulllateFee*number|nulldiscountValue*number|nulldiscountExpiresIn*|nullsingleInvoicePerSubscription*booleancreatedAt*stringupdatedAt*stringcurl -X PUT 'https://api.unopago.com/v1/plans' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "price": 1, "planId": "string"}'Ejemplo de respuesta
{ "schedule": "SUBSCRIPTION_START", "billingCycle": "WEEKLY", "currency": "VES", "pricingMode": "CURRENCY", "status": "ACTIVE", "lateFeeType": "PERCENTAGE", "discountValueType": "PERCENTAGE", "id": "string", "accountId": "string", "name": "string", "description": "string", "price": 0, "advanceBillingDays": -9007199254740991, "advanceDueDateDays": -9007199254740991, "startDate": "string", "endDate": "string", "lateFee": 0, "discountValue": 0, "discountExpiresIn": -9007199254740991, "singleInvoicePerSubscription": true, "createdAt": "string", "updatedAt": "string"}
