Delete a recurring token associated with a purchase.
https://gate.qorepay.com/api/v1/purchases/{id}/delete_recurring_token
This will set is_recurring_token to false . You won';t be able to use this Purchase';s ID as a recurring_token anymore. The respective ClientRecurringToken, if any, will also be deleted.
If this operation takes too long to be processed on the acquirer side - you will get a response with status code200 a corresponding Webhook callback for apurchase.pending_recurring_token_delete event. To be notified of a successful operation completion, please subscribe topurchase.recurring_token_deleted callback event.
HEADER PARAMS
authorizationString
required
Set value to
BEARER SECRET_KEYcontent-typeString
required
Set value to
JSON
PATH PARAMS
idstring
required
ID associated with the payment. This is usually returned when you call the
POST/purchasesendpoint to register or initialize a payment.
RESPONSES
200OK
400No such object
Query
Javascript
const options = {
method: 'POST',
headers: {
accept: 'application/json'
},
};
fetch('https://gate.qorepay.com/api/v1/purchases/id/delete_recurring_token', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
Sample Response
JSON
const options = {
method: 'POST',
headers: {
accept: 'application/json',
'content-type': 'application/json'
},
body: JSON.stringify({
client: {
email: '[email protected]',
phone: '+2349053693367',
full_name: 'Felix Qorepay',
street_address: '20 Kigali road.',
country: 'NG',
city: 'Yaba'
},
purchase: {
products: [
{
quantity: '2',
name: 'Dog food',
price: 230000
}
],
},
send_receipt: true,
brand_id: '4343434344334343434',
success_redirect: 'https://www.qore.test',
failure_redirect: 'https://www.qore.test.fail'
})
};
fetch('https://gate.qorepay.com/api/v1/purchases/', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));