v1
latestOpenAPI 3.1.02026-07-241040774.6 KBIncluir desconto
Este recurso permite adicionar um desconto, através do identificador da assinatura (subscription_id).
post/subscriptions/{subscription_id}/discounts
Path parameters
subscription_idstring required
Código da assinatura.<br>Formato sub_XXXXXXXXXXXXXXXX
Request body
Response
200
Example response
{
"id": "dis_LP4j5dXztPSj5A02",
"value": 10,
"discount_type": "percentage",
"cycles": 1,
"status": "active",
"created_at": "2019-05-22T14:23:55Z",
"updated_at": "2019-05-22T14:23:55Z",
"subscription": {
"id": "sub_DvPanXLsqcQnk8e1",
"code": "5Z7ZU01F60",
"start_at": "2019-05-22T00:00:00Z",
"interval": "day",
"interval_count": 1,
"billing_type": "prepaid",
"next_billing_at": "2019-05-25T00:00:00Z",
"payment_method": "credit_card",
"currency": "BRL",
"installments": 1,
"minimum_price": 10,
"status": "active",
"boleto_due_days": 5,
"created_at": "2019-05-22T14:05:49Z",
"updated_at": "2019-05-22T14:21:51Z"
}
}