Ir al contenido
UnoPagoDocumentación

Modify an existing plan

PUT
/v1/plans

Autorización

bearerAuth
headerAutorizaciónBearer <token>

Your API key, created in Configuración → Claves API. The key alone, without the Bearer prefix, is accepted too.

application/json
  1. body
name*string
Longitud4 <= length
description?string|null
currency?string
Valor en"VES""USD""EUR"
status?string
Valor en"ACTIVE""INACTIVE"
schedule?string
Valor en"SUBSCRIPTION_START""PLAN_DATES"
billingCycle?|null
advanceBillingDays?number
Rango0 <= value
advanceDueDateDays?number
Rango0 <= value <= 300
price*number
Rango1 <= value
lateFee?number
Rango0 <= value
lateFeeType?string
Valor en"PERCENTAGE""FIXED"
discountExpiresIn?number
Rango0 <= value
discountValue?number
Rango0 <= value
discountValueType?string
Valor en"PERCENTAGE""FIXED"
billingDates?array<>
accountPaymentMethodIds?array<string>
singleInvoicePerSubscription?boolean
planProducts?array<>
Elementositems <= 20
Por defecto[]
planId*string
Patrón^[cC][0-9a-z]{6,}$
Formatocuid

Cuerpo de la respuesta

Successful response

application/json
  1. response
schedule*string
Valor en"SUBSCRIPTION_START""PLAN_DATES"
billingCycle*|null
currency*string
Valor en"VES""USD""EUR"
pricingMode*string
Valor en"CURRENCY""REFERENCE"
status*string
Valor en"ACTIVE""INACTIVE"
lateFeeType*|null
discountValueType*|null
id*string
Patrón^[cC][0-9a-z]{6,}$
Formatocuid
accountId*string
name*string
description*string|null
price*number
advanceBillingDays*|null
advanceDueDateDays*|null
startDate*string
endDate*string|null
lateFee*number|null
discountValue*number|null
discountExpiresIn*|null
singleInvoicePerSubscription*boolean
createdAt*string
updatedAt*string
Ejemplo de solicitud
curl -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"}