Remove a payment link
** DELETE **
https://api.okepay.info/v1.0/Invoice/id/
PHPBash
// $instanceName is a part of the url where you access your okepay installation.
// https://{$instanceName}.okepay.info
$instanceName = 'INSTANCE_NAME';
// $secret is the okepay secret for the communication between the applications
// if you think someone got your secret, just regenerate it in the okepay administration
$secret = 'INSTANCE_API_SECRET';
$okepay = new \Okepay\Okepay($instanceName, $secret);
// init empty request object
$invoice = new \Okepay\Models\Request\Invoice();
$invoice->setId(1);
// fire request with created and filled link request-object.
try {
$response = $okepay->delete($invoice);
var_dump($response);
} catch (\Okepay\OkepayException $e) {
print $e->getMessage();
}
apiSignature=`echo -n "" | openssl dgst -sha256 -hmac "INSTANCE_API_SECRET" -binary | openssl enc -base64`
curl --request DELETE "https://api.okepay.info/v1.0/Invoice/1/?instance=INSTANCE_NAME" --data-urlencode "ApiSignature=$apiSignature"
PATH PARAMS | |
---|---|
id int32 |
REQUIRED The id of the invoice to delete |
QUERY PARAMS | |
---|---|
instance string |
REQUIRED Your OkePay instance name |
Next to read:
Log in a subscription customer
Log in a subscription customer