Skip to main content

Documentation

Retrieve Discount - Subscription

Retrieve a discount applied to a specific subscription.

    • discount

    • ID of the discount. String starting with dis_.

  • /v1/subscriptions/discount/:discount

  • Retrieve Discount - Subscription

  • curl -X get
    https://sandboxapi.rapyd.net/v1/subscriptions/discount/dis_102b6bdb1fd9082db2f85e1316bd0cdc
    -H 'access_key: your-access-key-here'
    -H 'Content-Type: application/json'
    -H 'salt: your-random-string-here'
    -H 'signature: your-calculated-signature-here'
    -H 'timestamp: your-unix-timestamp-here'
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "08337454-c6ec-4658-a3b8-6ff194ba684c"
        },
        "data": {
            "id": "dis_102b6bdb1fd9082db2f85e1316bd0cdc",
            "coupon": {
                "id": "coupon_99c19f1da7217045dc56557ff9a25f2c",
                "amount_off": 0,
                "created": 1646322980,
                "currency": "USD",
                "duration": "forever",
                "duration_in_months": 0,
                "max_redemptions": 2,
                "metadata": {},
                "percent_off": 10,
                "redeem_by": 0,
                "times_redeemed": 1,
                "discount_valid_until": null,
                "discount_validity_in_months": 0,
                "discount_duration_in_uses": 4,
                "description": "Discount for subscription",
                "valid": true
            },
            "end": -1,
            "start": 1646322994,
            "subscription": "sub_ae120415469a888cf5388d20ef450aa9",
            "number_of_uses": 1,
            "valid": true
        }
    }