Get Payment details by ID
https://gate.qorepay.com/api/v1/purchases/{id}
To get a payment details in your application use GET
/purchases/{id}
HEADER PARAMS
authorization
String
required
Set value to
BEARER SECRET_KEY
content-type
String
required
Set value to
JSON
PATH PARAMS
id
string
required
ID associated with the payment. This is usually returned when you call the
POST
/purchases
endpoint to register or initialize a payment.
RESPONSES
200
OK
404
No such object
Query
Javascript
const options = {
method: 'GET',
headers: {
accept: 'application/json'
}
};
fetch('https://gate.qorepay.com/api/v1/purchases/id/', 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));