v1

latestOpenAPI 3.1.02026-07-241040774.6 KB

Listar descontos

Este recurso permite listar os descontos associados a uma assinatura.

get/subscriptions/{subscription_id}/discounts/

Path parameters

subscription_idstring required

Código da assinatura.<br>Formato: sub_XXXXXXXXXXXXXXXX

Response

200

Example response

{
  "data": [
    {
      "id": "dis_IYzpxgjsOs0fDIoP",
      "value": 20,
      "discount_type": "percentage",
      "status": "active",
      "created_at": "2018-03-15T19:49:29Z",
      "subscription": {
        "id": "sub_Yo2VQVyeSWHKmN5k",
        "code": "Z8OXUJI3M5",
        "start_at": "2018-03-15T00:00:00Z",
        "interval": "month",
        "interval_count": 1,
        "billing_type": "prepaid",
        "next_billing_at": "2018-04-15T00:00:00Z",
        "payment_method": "credit_card",
        "currency": "BRL",
        "installments": 1,
        "status": "active",
        "created_at": "2018-03-15T19:49:05Z",
        "updated_at": "2018-03-15T19:49:05Z"
      }
    }
  ],
  "paging": {
    "total": 2
  }
}