ILENPAY
Search
K

Transaksi Baru

Request nominal dibawah 20.000 dikenakan biaya tambahan sebesar 3%
Contoh: jika rate 0.82 maka akan menjadi 0.79
post
https://api.ilenpay.co.id
/v1/transaksi/baru
Parameters
Header
Authorization*
String
Api Key
Body
type*
String
( redirect / direct )
return_url*
String
URL mengalihkan pelanggan Anda kembali
operator*
String
( telkomsel, xl, tri, smartfren )
nominal*
Int
Nominal pembayaran
reff_id*
String
Kode unik anda. Min 5 Max 20 karakter
sign*
String
format md5()
Responses
200: OK
Respon sukses type Redirect
200: OK
Respon sukses type Direct

Contoh Untuk PHP

<?php
$api_key = 'Production Key';
$api_user = 'User Key';
$type = 'direct'; // Type: direct / redirect
$return_url = 'https://domain.com/riwayat/8833';
$operator = 'telkomsel';
$nominal = '15000';
$reff_id = 'trx68164343fdgsfdg';
$sign = md5($operator.'+'.$nominal.'+'.$reff_id.'+'.$api_user);
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_FRESH_CONNECT => true,
CURLOPT_URL => 'https://api.ilenpay.co.id/v1/transaksi/baru',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => false,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => http_build_query(array(
'type' => $type,
'return_url'=> $return_url,
'operator' => $operator,
'nominal' => $nominal,
'reff_id' => $reff_id,
'sign' => $sign
)),
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded',
'Authorization: ' . $api_key
),
CURLOPT_FAILONERROR => false,
CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4
]);
$response = curl_exec($curl);
$error = curl_error($curl);
curl_close($curl);
print_r(empty($error) ? $response : $error);