First: the slave and his master mutually agree to this.
Second: the slave requests it, but the master refuses.
Third: the master requests it, but the slave refuses.
If the slave and his master mutually agree to this, it is permissible, because Allah’s right no longer applies owing to the valid excuse of evident inability to pay. According to al-Mudawwana, there is no need to refer the matter to the ruler.
It has also been held that the slave may be declared in default only through the ruler, because their joint assertion is not sufficient to extinguish Allah Most High’s right; it lapses only after the ruler has examined the matter and exercised his judgment.
If the slave requests this but the master refuses, the slave may declare himself in default without recourse to the ruler, because this is a matter that leaves no scope for discretionary judgment and requires no judicial ruling.
If, however, the master requests this but the slave refuses, the master may have him declared in default only through the ruler, after a period of grace and due assessment. Success comes from Allah.