Getnet DocsGetnet Docs

Update Plan

PATCH/rpy/be-plan/v1/plans/{plan_id}

__Update a Plan__<br> <br>This endpoint allows you to update the attributes of an existing recurrence plan. It is typically used to modify plan metadata such as the name, description, or floating installment data without altering its identity or subscription history.<br> <br>**Usage Scenarios:**<br>_- Correcting or improving plan presentation on user-facing interfaces.<br>- Adjusting installment options (e.g. adding or modifying floating amounts per installment)._<br> <br>**Notes:**<br>_- You can update attributes like the plan’s **name**, **description**, and **floating_data**, which contains customized **installment** options (**installment number** and corresponding **amount** in cents).<br>- Only the fields included in the request body will be updated. Fields not present will remain unchanged._

Header Parameters

usernamestring

User who is registering. This information may be used for auditing purposes.

Path Parameters

plan_idstringrequired

Plan identifier.

Body application/json

namestringrequired

Plan name.

descriptionstring

Plan description.

amountintegerrequired

Purchase value in cents. It must be an integer.

currencystringrequired

Currency identification (See code in <a href="https://docs.globalgetnet.com/es/articles/currency-codes">this</a> section).

payment_types"credit_card" | "debit_card"[]required
sales_taxinteger

Tax amount.

product_type"cash_carry" | "digital_content" | "digital_goods" | "gift_card" | "physical_goods" | "renew_subs" | "shareware" | "service"

Identifier of the type of product sold among the options.

periodobjectrequired

Plan period.

Show period properties
type"yearly" | "monthly" | "bimonthly" | "quarterly" | "semesterly" | "specific"required

Type of periodicity.

billing_cycleintegerrequired

Plan duration based on frequency type. For example, for a 12-month plan, where billing will be done monthly (type = monthly) the value to be assigned is 12.

specific_cycle_in_daysnumber

Specific billing cycle in days. When the type of periodicity is specific (type = specific) the number of days must be assigned in which the billing cycle will be carried out. For example, if the durationthe one in the plan is 12 (billing_cycle = 12) and the specific cycle is 10 (specific_cycle_in_days = 10), This means that the charge will occur every 10 days in total of 12 charges.

status"active" | "inactive"required
floating_dataobject[]
Show floating_data properties
installmentinteger<int32>required
amountinteger<int32>required

Response

OK

seller_idstring<uuid>
plan_idstring<uuid>
namestring
descriptionstring
amountinteger<int32>
currencystring
sales_taxinteger<int32>
product_type"cash_carry" | "digital_content" | "digital_goods" | "gift_card" | "physical_goods" | "renew_subs" | "shareware" | "service"
payment_types"credit_card" | "debit_card"[]
status"active" | "inactive"
create_datestring<date-time>
periodobject

Plan period.

Show period properties
type"yearly" | "monthly" | "bimonthly" | "quarterly" | "semesterly" | "specific"

Type of periodicity.

billing_cycleinteger

Plan duration based on frequency type. For example, for a 12-month plan, where billing will be done monthly (type = monthly) the value to be assigned is 12.

specific_cycle_in_daysnumber

Specific billing cycle in days. When the type of periodicity is specific (type = specific) the number of days must be assigned in which the billing cycle will be carried out. For example, if the durationthe one in the plan is 12 (billing_cycle = 12) and the specific cycle is 10 (specific_cycle_in_days = 10), This means that the charge will occur every 10 days in total of 12 charges.

floating_dataobject[]
Show floating_data properties
installmentinteger<int32>
amountinteger<int32>

Invalid Requisition

messagestring

Detailed error message.

namestring

Name of the module or system in which the error occurred.

status_codeinteger<int32>

HTTP status code of the error.

detailsobject[]

Error details.

Show details properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

paymentsobject[]

Error details.

Show payments properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

combined_idstring

combinedId.

order_idstring

orderId.

seller_idstring

sellerId.

Not Found

messagestring

Detailed error message.

namestring

Name of the module or system in which the error occurred.

status_codeinteger<int32>

HTTP status code of the error.

detailsobject[]

Error details.

Show details properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

paymentsobject[]

Error details.

Show payments properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

combined_idstring

combinedId.

order_idstring

orderId.

seller_idstring

sellerId.

Unprocessable Entity

messagestring

Detailed error message.

namestring

Name of the module or system in which the error occurred.

status_codeinteger<int32>

HTTP status code of the error.

detailsobject[]

Error details.

Show details properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

paymentsobject[]

Error details.

Show payments properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

combined_idstring

combinedId.

order_idstring

orderId.

seller_idstring

sellerId.

Internal server or service error

messagestring

Detailed error message.

namestring

Name of the module or system in which the error occurred.

status_codeinteger<int32>

HTTP status code of the error.

detailsobject[]

Error details.

Show details properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

paymentsobject[]

Error details.

Show payments properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

combined_idstring

combinedId.

order_idstring

orderId.

seller_idstring

sellerId.

Request
curl -X PATCH "https://api.pre.globalgetnet.com/rpy/be-plan/v1/plans/<plan_id>" \
  -H "Content-Type: application/json" \
  -H "username: <username>" \
  -d '{
  "name": "flex plan",
  "description": "flex plan",
  "amount": 8900,
  "currency": "BRL",
  "payment_types": [
    "credit_card"
  ],
  "sales_tax": 0,
  "product_type": "cash_carry",
  "period": {
    "type": "monthly",
    "billing_cycle": 12,
    "specific_cycle_in_days": 0
  },
  "status": "active",
  "floating_data": [
    {
      "installment": 0,
      "amount": 0
    }
  ]
}'
Response
{
  "seller_id": "00000000-0000-0000-0000-000000000000",
  "plan_id": "00000000-0000-0000-0000-000000000000",
  "name": "string",
  "description": "string",
  "amount": 0,
  "currency": "string",
  "sales_tax": 0,
  "product_type": "cash_carry",
  "payment_types": [
    "credit_card"
  ],
  "status": "active",
  "create_date": "1970-01-01T00:00:00.000Z",
  "period": {
    "type": "monthly",
    "billing_cycle": 12,
    "specific_cycle_in_days": 0
  },
  "floating_data": [
    {
      "installment": 0,
      "amount": 0
    }
  ]
}