Getnet DocsGetnet Docs

Update Plan status

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

__Update Plan status__<br> <br>This endpoint allows you to update the status of an existing recurrence plan. You can use it to **activate** or **deactivate** (inactive) a plan depending on your business needs. It is commonly used for enabling or pausing plans without deleting them.<br> <br>**Usage Scenarios:**<br>_- Activating a new plan after initial setup.<br>- Temporarily deactivating a plan that is no longer available for new subscriptions.<br>- Enabling or disabling a plan based on promotional periods or internal business rules._<br> <br>**Notes:**<br>_- The_ `plan_id` _must be provided in the path of the request URL.<br>- The new status (_`active` _or_ `inactive`_) is also passed as a path parameter._

Header Parameters

Content-Typestringrequired

Content type.

usernamestring

User who is registering. This information can be used for audit purposes.

Path Parameters

plan_idstringrequired

Plan identifier.

statusstringrequired

Plan status.

Response

Returns plan data.

seller_idstring<uuidv4>

E-commerce identification code.

plan_idstring<uuidv4>

Plan identifier.

namestring

Plan name.

descriptionstring

Description of the plan.

amountinteger

Plan value.

currencystring

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

payment_types"credit_card" | "debit_card"

Types of payments accepted.

sales_taxinteger

Tax value.

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.

create_datestring<YYYY-MM-DDTHH:MM:SSZ>

Plan creation date.

status"active" | "inactive"

Plan status.

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[]

Preconfigured list of installments that will have a different value when the Subscription is created. This functionality can be used to create tasting installments with zero value, one input value or discounted installments. The use of this functionality and its purpose expected will depend on the enablement of a specific product at Getnet.

Show floating_data properties
installmentinteger<int32>

Number of the installment to which the change will be applied.

amountinteger

New charge amount for a given portion of the plan. When a Subscription is created with this Plan it will have this characterstatic, for example for installment 2 apply the amount of R$ 10.00. That value can be zero, greater or less than the original value of the Plan.

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>/status/<status>" \
  -H "Content-Type: <Content-Type>" \
  -H "username: <username>"
Response
{
  "seller_id": "6eb2412c-165a-41cd-b1d9-76c575d70a28",
  "plan_id": "51995e24-b1ae-4826-8e15-2a568a87abdd",
  "name": "Plano flex",
  "description": "Flex plan",
  "amount": 19990,
  "currency": "BRL",
  "payment_types": "",
  "sales_tax": 0,
  "product_type": "service",
  "create_date": "2017-04-19T16:30:30Z",
  "status": "active",
  "period": {
    "type": "monthly",
    "billing_cycle": 12,
    "specific_cycle_in_days": 0
  },
  "floating_data": [
    {
      "installment": 2,
      "amount": 19990
    }
  ]
}