---
title: "Editar data de faturamento da assinatura"
url: "https://devcenter.stone.com.br/apis/v5-docs-legacy/versions/b9aaff36-6dcc-4353-8398-836d6c13dfa5/operations/editar-meio-de-pagamento-da-assinatura-1"
---

> Full API specification: https://devcenter.stone.com.br/apis/v5-docs-legacy/versions/b9aaff36-6dcc-4353-8398-836d6c13dfa5.md

# Editar data de faturamento da assinatura

`PATCH` `/subscriptions/{subscription_id}/billing-date`

Operation ID: `editar-meio-de-pagamento-da-assinatura-1`

Com o verbo _HTTP PATCH_, através do identificador da assinatura (`subscription_id`) é possível atualizar a data de faturamento da assinatura.

## Path parameters

- `subscription_id` (string, required) - Código da assinatura.<br>Formato: `sub_XXXXXXXXXXXXXXXX`.

## Request body

Content types: `application/json`

## Responses

- `200` - 200
- `404` - 404
- `422` - 422

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Pagar.me v5 API (Legado)
  version: 5.0.0
servers:
  - url: https://api.stone.com.br/core/v5
paths:
  /subscriptions/{subscription_id}/billing-date:
    patch:
      summary: Editar data de faturamento da assinatura
      description: Com o verbo _HTTP PATCH_, através do identificador da assinatura
        (`subscription_id`) é possível atualizar a data de faturamento da
        assinatura.
      operationId: editar-meio-de-pagamento-da-assinatura-1
      parameters:
        - name: subscription_id
          in: path
          description: "Código da assinatura.<br>Formato: `sub_XXXXXXXXXXXXXXXX`."
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - next_billing_at
              properties:
                next_billing_at:
                  type: string
                  description: Próxima data de cobrança.
            examples:
              Request Example:
                value:
                  next_billing_at: 2020-04-03
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value: >-
                    {
                        "id": "sub_lmxK4k0hPfJ5z58w",
                        "code": "9X8HROC4E0",
                        "start_at": "2017-04-03T00:00:00Z",
                        "interval": "month",
                        "interval_count": 1,
                        "billing_type": "prepaid",
                        "gateway_affiliation_id": "C56A4180-65AA-42EC-A945-5FD21DEC0538",
                        "boleto_due_days":5,
                        "minimum_price": 10000,
                        "current_cycle": {
                            "id": "cycle_3zyegLyCDyTZQ6Z0",
                            "start_at": "2017-04-03T00:00:00Z",
                            "end_at": "2017-05-02T23:59:59",
                            "billing_at": "2017-04-03T00:00:00Z"
                        },
                        "next_billing_at": "2017-04-05T00:00:00Z",
                        "payment_method": "credit_card",
                        "currency": "BRL",
                        "statement_descriptor": "Spotify",
                        "installments": 1,
                        "status": "active",
                        "created_at": "2017-04-03T19:04:24Z",
                        "updated_at": "2017-04-03T19:04:24Z",
                        "customer": {
                            "id": "cus_J4wRXJ0U6ytZrpOx",
                            "name": "Tony Stark",
                            "email": "tstark@avengers.com",
                            "delinquent": false,
                            "created_at": "2016-09-28T21:04:37Z",
                            "updated_at": "2017-03-22T19:06:14Z"
                        },
                        "credit_card": {
                            "id": "card_pEYq7rDbFeiW8V6k",
                            "last_four_digits": "8229",
                            "brand": "Amex",
                            "holder_name": "Tony Stark",
                            "exp_month": 1,
                            "exp_year": 2018,
                            "status": "active",
                            "created_at": "2016-11-16T17:02:39Z",
                            "updated_at": "2016-12-29T12:03:24Z",
                            "billing_address": {
                                "line_1": "10880, Malibu Point, Malibu Central",
                                "zip_code": "90265",
                                "city": "Malibu",
                                "state": "CA",
                                "country": "US"
                            }
                        },
                        "plan": {
                            "id": "plan_pzrg5YhjyiqBgDw3",
                            "name": "Plano Premium",
                            "description": "Vá de Premium. E seja feliz!",
                            "url": "/plans/plan_pzrg5YhjyiqBgDw3/mundipagg-teste/plano-premium",
                            "statement_descriptor": "Spotify",
                            "interval": "month",
                            "interval_count": 1,
                            "billing_type": "prepaid",
                            "payment_methods": [
                                "credit_card"
                            ],
                            "installments": [
                                1
                            ],
                            "status": "active",
                            "currency": "BRL",
                            "created_at": "2017-04-03T19:04:05Z",
                            "updated_at": "2017-04-03T19:04:05Z"
                        },
                        "items": [
                            {
                                "id": "si_K1Mj03JPSWFwxan4",
                                "description": "Bola",
                                "quantity": 1,
                                "status": "active",
                                "created_at": "2017-04-03T19:04:24Z",
                                "updated_at": "2017-04-03T19:04:24Z",
                                "pricing_scheme": {
                                    "price": 1490,
                                    "scheme_type": "unit"
                                }
                            }
                        ]
                    }
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: sub_lmxK4k0hPfJ5z58w
                  code:
                    type: string
                    example: 9X8HROC4E0
                  start_at:
                    type: string
                    example: 2017-04-03T00:00:00Z
                  interval:
                    type: string
                    example: month
                  interval_count:
                    type: integer
                    example: 1
                    default: 0
                  billing_type:
                    type: string
                    example: prepaid
                  gateway_affiliation_id:
                    type: string
                    example: C56A4180-65AA-42EC-A945-5FD21DEC0538
                  boleto_due_days:
                    type: integer
                    example: 5
                    default: 0
                  minimum_price:
                    type: integer
                    example: 10000
                    default: 0
                  current_cycle:
                    type: object
                    properties:
                      id:
                        type: string
                        example: cycle_3zyegLyCDyTZQ6Z0
                      start_at:
                        type: string
                        example: 2017-04-03T00:00:00Z
                      end_at:
                        type: string
                        example: 2017-05-02T23:59:59
                      billing_at:
                        type: string
                        example: 2017-04-03T00:00:00Z
                  next_billing_at:
                    type: string
                    example: 2017-04-05T00:00:00Z
                  payment_method:
                    type: string
                    example: credit_card
                  currency:
                    type: string
                    example: BRL
                  statement_descriptor:
                    type: string
                    example: Spotify
                  installments:
                    type: integer
                    example: 1
                    default: 0
                  status:
                    type: string
                    example: active
                  created_at:
                    type: string
                    example: 2017-04-03T19:04:24Z
                  updated_at:
                    type: string
                    example: 2017-04-03T19:04:24Z
                  customer:
                    type: object
                    properties:
                      id:
                        type: string
                        example: cus_J4wRXJ0U6ytZrpOx
                      name:
                        type: string
                        example: Tony Stark
                      email:
                        type: string
                        example: tstark@avengers.com
                      delinquent:
                        type: boolean
                        example: false
                        default: true
                      created_at:
                        type: string
                        example: 2016-09-28T21:04:37Z
                      updated_at:
                        type: string
                        example: 2017-03-22T19:06:14Z
                  credit_card:
                    type: object
                    properties:
                      id:
                        type: string
                        example: card_pEYq7rDbFeiW8V6k
                      last_four_digits:
                        type: string
                        example: "8229"
                      brand:
                        type: string
                        example: Amex
                      holder_name:
                        type: string
                        example: Tony Stark
                      exp_month:
                        type: integer
                        example: 1
                        default: 0
                      exp_year:
                        type: integer
                        example: 2018
                        default: 0
                      status:
                        type: string
                        example: active
                      created_at:
                        type: string
                        example: 2016-11-16T17:02:39Z
                      updated_at:
                        type: string
                        example: 2016-12-29T12:03:24Z
                      billing_address:
                        type: object
                        properties:
                          line_1:
                            type: string
                            example: 10880, Malibu Point, Malibu Central
                          zip_code:
                            type: string
                            example: "90265"
                          city:
                            type: string
                            example: Malibu
                          state:
                            type: string
                            example: CA
                          country:
                            type: string
                            example: US
                  plan:
                    type: object
                    properties:
                      id:
                        type: string
                        example: plan_pzrg5YhjyiqBgDw3
                      name:
                        type: string
                        example: Plano Premium
                      description:
                        type: string
                        example: Vá de Premium. E seja feliz!
                      url:
                        type: string
                        example: /plans/plan_pzrg5YhjyiqBgDw3/mundipagg-teste/plano-premium
                      statement_descriptor:
                        type: string
                        example: Spotify
                      interval:
                        type: string
                        example: month
                      interval_count:
                        type: integer
                        example: 1
                        default: 0
                      billing_type:
                        type: string
                        example: prepaid
                      payment_methods:
                        type: array
                        items:
                          type: string
                          example: credit_card
                      installments:
                        type: array
                        items:
                          type: integer
                          example: 1
                          default: 0
                      status:
                        type: string
                        example: active
                      currency:
                        type: string
                        example: BRL
                      created_at:
                        type: string
                        example: 2017-04-03T19:04:05Z
                      updated_at:
                        type: string
                        example: 2017-04-03T19:04:05Z
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: si_K1Mj03JPSWFwxan4
                        description:
                          type: string
                          example: Bola
                        quantity:
                          type: integer
                          example: 1
                          default: 0
                        status:
                          type: string
                          example: active
                        created_at:
                          type: string
                          example: 2017-04-03T19:04:24Z
                        updated_at:
                          type: string
                          example: 2017-04-03T19:04:24Z
                        pricing_scheme:
                          type: object
                          properties:
                            price:
                              type: integer
                              example: 1490
                              default: 0
                            scheme_type:
                              type: string
                              example: unit
        "404":
          description: "404"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "message": "Subscription not found."
                    }
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Subscription not found.
        "422":
          description: "422"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "message": "The request is invalid.",
                        "errors": {
                            "next_billing_at": [
                                "The next_billing_at field is invalid."
                            ]
                        },
                        "request": {}
                    }
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The request is invalid.
                  errors:
                    type: object
                    properties:
                      next_billing_at:
                        type: array
                        items:
                          type: string
                          example: The next_billing_at field is invalid.
                  request:
                    type: object
                    properties: {}
      deprecated: false
security:
  - sec0: []
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic
```
