v1

latestOpenAPI 3.1.02026-07-241040774.6 KB

Remover desconto

Com o verbo HTTP DELETE, através dos identificadores do desconto (discount_id) e da assinatura associada (subscription_id) é possível remover um desconto do plano.

delete/subscriptions/{subscription_id}/discounts/{discount_id}

Path parameters

subscription_idstring required

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

discount_idstring required

Código do desconto.<br>Formato: dis_XXXXXXXXXXXXXXXX.

Response

200

idstring
valueinteger
discount_typestring
statusstring
created_atstring
deleted_atstring

Example response

{
  "id": "dis_kqGj1JMCaGSRm9Yz",
  "value": 10,
  "discount_type": "percentage",
  "status": "deleted",
  "created_at": "2017-04-04T18:40:15Z",
  "deleted_at": "2017-04-04T18:40:48Z",
  "subscription": {
    "id": "sub_o0Jw4WYCMuPNqzGr",
    "code": "09NFPLBZY0",
    "start_at": "2017-04-04T00:00:00Z",
    "interval": "month",
    "interval_count": 1,
    "billing_type": "postpaid",
    "next_billing_at": "2017-05-04T00:00:00Z",
    "payment_method": "credit_card",
    "currency": "BRL",
    "statement_descriptor": "Spotify",
    "installments": 1,
    "status": "active",
    "created_at": "2017-04-04T18:21:17Z",
    "updated_at": "2017-04-04T18:21:17Z"
  }
}