IkyyxzPay API Documentation

Integrasi Mudah dan Cepat untuk Merchant

Create Payment API

Endpoint:

POST https://ikyyxzpay.xyz/api/live/create/index.php

Headers: Content-Type: application/json

Request Body (JSON)

{
  "api_key": "API_KEY_USER_MERCHANT",
  "amount": 10000
}

Response (Success)

{
  "success": true,
  "invoice_id": "INV45e1c1be9d",
  "amount_original": 10000,
  "fee_unique": 906,
  "total_amount": 10906,
  "payment_url": "https://ikyyxzpay.xyz/invoice.php?id=INV45e1c1be9d"
}

Response (Error)

{
  "success": false,
  "message": "API key tidak valid"
}

Contoh Request

PHP (cURL)

<?php
$api_url = "https://ikyyxzpay.xyz/api/live/create";
$data = [
    "api_key" => "API_KEY_USER_MERCHANT",
    "amount" => 10000
];
$ch = curl_init($api_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result);
?>

JavaScript (Fetch)

const data = {
  api_key: "API_KEY_USER_MERCHANT",
  amount: 10000
};
fetch("https://ikyyxzpay.xyz/api/live/create/index.php", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify(data)
})
.then(res => res.json())
.then(console.log)
.catch(console.error);

Python (requests)

import requests
url = "https://ikyyxzpay.xyz/api/live/create/index.php"
data = { "api_key": "API_KEY_USER_MERCHANT", "amount": 10000 }
response = requests.post(url, json=data)
print(response.json())

Callback API

Callback adalah notifikasi otomatis dari IkyyxzPay ke server merchant ketika status pembayaran berubah (misal: pembayaran berhasil). Merchant wajib menyediakan callback_url di dashboard.

Endpoint

POST https://ikyyxzpay.xyz/api/live/callback/index.php

Headers Wajib

Sosiabuzz-Token: sbwhook-mhcwpdloge0invdnsr4iyjfe
Content-Type: application/json

Request Payload (JSON)

{
  "id": "4057675473",
  "amount": 1028,
  "currency": "IDR",
  "amount_settled": 1028,
  "supporter": "tetsing",
  "email_supporter": "tstsing@gmail.com",
  "message": "hai",
  "created_at": "2025-08-27T23:51:41+07:00"
}

Response JSON

Jika pembayaran berhasil:

{
  "success": true,
  "invoice_id": "123",
  "order_id": "4057675473",
  "amount": 1028,
  "fee": 0,
  "total": 1028,
  "status": "PAID",
  "currency": "IDR",
  "supporter": "tetsing",
  "email_supporter": "tstsing@gmail.com",
  "received_at": "2025-08-27T23:51:41+07:00"
}

Jika data tidak valid atau token salah:

{
  "success": false,
  "message": "Invalid token"
}

Tips untuk Merchant

Contoh Kode

PHP

$ch = curl_init('https://ikyyxzpay.xyz/api/live/callback/index.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Sosiabuzz-Token: sbwhook-mhcwpdloge0invdnsr4iyjfe'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);

JavaScript (Fetch)

fetch('https://ikyyxzpay.xyz/api/live/callback/index.php', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Sosiabuzz-Token': 'sbwhook-mhcwpdloge0invdnsr4iyjfe'
  },
  body: JSON.stringify(payload)
})
.then(res => res.json())
.then(data => console.log(data));

Python (requests)

import requests
import json

url = 'https://ikyyxzpay.xyz/api/live/callback/index.php'
headers = {
    'Content-Type': 'application/json',
    'Sosiabuzz-Token': 'sbwhook-mhcwpdloge0invdnsr4iyjfe'
}
payload = {
    "id": "4057675473",
    "amount": 1028,
    "currency": "IDR"
}

response = requests.post(url, headers=headers, data=json.dumps(payload))
print(response.json())

Callback Penjelasan Lengkap

Callback adalah notifikasi otomatis dari IkyyxzPay ke server merchant saat status pembayaran berubah (misal: PAID).

Contoh Callback URL

https://yourdomain.com/payment/callback.php

Data yang dikirim (JSON Payload)

{
  "invoice_id": "INV-00123",
  "order_id": "ORD-8821",
  "amount": 10000,
  "fee": 500,
  "total": 10500,
  "status": "PAID",
  "currency": "IDR",
  "supporter": "John Doe",
  "email_supporter": "johndoe@example.com",
  "received_at": "2025-08-28 20:15:43"
}

Parameter Penjelasan

Parameter Tipe Deskripsi
invoice_idstringID invoice di sistem IkyyxzPay
order_idstringID order unik dari merchant
amountintegerJumlah pembayaran asli (tanpa fee)
feeintegerBiaya layanan
totalintegerTotal yang dibayar (amount + fee)
statusstringStatus pembayaran (PAID, PENDING, FAILED)
currencystringMata uang (default: IDR)
supporterstringNama pembayar
email_supporterstringEmail pembayar
received_atdatetimeWaktu transaksi diproses

Contoh Respon dari Merchant

{
  "success": true,
  "message": "Callback received"
}
⚠️ Catatan: Jika merchant tidak merespon dengan benar, sistem IkyyxzPay akan mencoba mengirim ulang callback beberapa kali.

Check Payment Status API

Endpoint untuk mengecek status invoice / payment.

URL:

GET https://ikyyxzpay.xyz/api/live/status/index.php?id=INVOICE_ID

Contoh Kode

PHP

<?php
$invoice_id = "INV-TEST123";
$url = "https://ikyyxzpay.xyz/api/live/status?id=".$invoice_id;
$response = file_get_contents($url);
print_r(json_decode($response,true));
?>

JavaScript (Fetch)

fetch("https://ikyyxzpay.xyz/api/live/status/index.php?id=INV-TEST123")
  .then(res => res.json())
  .then(console.log)
  .catch(console.error);

Python (requests)

import requests
invoice_id = "INV-TEST123"
url = f"https://ikyyxzpay.xyz/api/live/status/index.php?id={invoice_id}"
response = requests.get(url)
print(response.json())

Node.js (fetch)

import fetch from 'node-fetch';
const invoice_id = "INV-TEST123";
const url = `https://ikyyxzpay.xyz/api/live/status/index.php?id=${invoice_id}`;
fetch(url)
  .then(res => res.json())
  .then(console.log)
  .catch(console.error);