Example
CURL
curl -X POST https://api.excoinz.com/payment/ready \
-H "EXCOINZ_SECRET: Bearer ${SECRET_KEY}" \
-H "Content-Type: application/json" \
-d '{
"client_id": "YOUR_CLIENT_ID",
"item_name": "YOUR_ITEM_NAME",
"item_img_url": "YOUR_ITEM_IMAGE_URL",
"partner_order_id": "YOUR_PARTNER_ORDER_ID",
"partner_user_id": "YOUR_PARTNER_USER_ID",
"amount": "YOUR_AMOUNT",
"locale": "YOUR_LOCALE"
}'NodeJS
const axios = require('axios');
const REQUEST_PATH = 'payment/ready';
const headers = {
'EXCOINZ_SECRET': `Bearer ${process.env.SECRET_KEY}`,
'Content-Type': 'application/json'
};
const data = {
"client_id": "YOUR_CLIENT_ID",
"item_name": "YOUR_ITEM_NAME",
"item_img_url": "YOUR_ITEM_IMAGE_URL",
"partner_order_id": "YOUR_PARTNER_ORDER_ID",
"partner_user_id": "YOUR_PARTNER_USER_ID",
"amount": "YOUR_AMOUNT",
"locale": "YOUR_LOCALE"
};
axios.post(`https://api.excoinz.com/${REQUEST_PATH}`, data, { headers: headers })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error.response.data);
});JAVA
PHP
Last updated