Endpoints manajemen akun iklan, saldo, dan spend cap. Mayoritas adalah mutasi ke Meta Graph: topup spend cap, withdraw, refund, rename, sync. Semua endpoint di bawah middleware: auth:api, myapi .
POST /api/account — Single data akun
POST http://127.0.0.1:8081/api/accountCopy URL
curl PowerShell JavaScript Node.js Python Go PHP Copy
curl --request POST \
--url http://127.0.0.1:8081/api/account $ response = Invoke-WebRequest - Uri ' http://127.0.0.1:8081/api/account ' - Method POST const url = ' http://127.0.0.1:8081/api/account ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} const fetch = require ( ' node-fetch ' );
const url = ' http://127.0.0.1:8081/api/account ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} import requests
url = " http://127.0.0.1:8081/api/account "
response = requests . post ( url )
print ( response . json ()) package main
import (
" fmt "
" net/http "
" io "
)
func main () {
url := " http://127.0.0.1:8081/api/account "
req , _ := http . NewRequest ( " POST " , url , nil )
res , _ := http . DefaultClient . Do ( req )
defer res . Body . Close ()
body , _ := io . ReadAll ( res . Body )
fmt . Println ( res )
fmt . Println ( string ( body ))
} <? php
$ curl = curl_init ();
curl_setopt_array ($ curl , [
CURLOPT_PORT => " 8081 " ,
CURLOPT_URL => " http://127.0.0.1:8081/api/account " ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => " POST " ,
]);
$ response = curl_exec ($ curl );
$ err = curl_error ($ curl );
curl_close ($ curl );
if ($ err ) {
echo " cURL Error #: " . $ err ;
} else {
echo $ response ;
}
Ambil data single akun iklan (getSingleData).
Request body
Field Wajib Tipe account_id✅ string
POST /api/account/balance — Cek saldo riil
POST http://127.0.0.1:8081/api/account/balanceCopy URL
curl PowerShell JavaScript Node.js Python Go PHP Copy
curl --request POST \
--url http://127.0.0.1:8081/api/account/balance $ response = Invoke-WebRequest - Uri ' http://127.0.0.1:8081/api/account/balance ' - Method POST const url = ' http://127.0.0.1:8081/api/account/balance ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} const fetch = require ( ' node-fetch ' );
const url = ' http://127.0.0.1:8081/api/account/balance ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} import requests
url = " http://127.0.0.1:8081/api/account/balance "
response = requests . post ( url )
print ( response . json ()) package main
import (
" fmt "
" net/http "
" io "
)
func main () {
url := " http://127.0.0.1:8081/api/account/balance "
req , _ := http . NewRequest ( " POST " , url , nil )
res , _ := http . DefaultClient . Do ( req )
defer res . Body . Close ()
body , _ := io . ReadAll ( res . Body )
fmt . Println ( res )
fmt . Println ( string ( body ))
} <? php
$ curl = curl_init ();
curl_setopt_array ($ curl , [
CURLOPT_PORT => " 8081 " ,
CURLOPT_URL => " http://127.0.0.1:8081/api/account/balance " ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => " POST " ,
]);
$ response = curl_exec ($ curl );
$ err = curl_error ($ curl );
curl_close ($ curl );
if ($ err ) {
echo " cURL Error #: " . $ err ;
} else {
echo $ response ;
}
Cek sisa saldo riil akun iklan langsung dari Meta (bukan cache).
Field Wajib Tipe account_id✅ string
Response
json Copy &# 123 ;
" status " : true ,
" data " : &# 123 ;
" account_id " : " act_123 " ,
" balance " : 250000 ,
" amount_spent " : 750000 ,
" spend_cap " : 1000000
&# 125 ;
&# 125 ;
POST /api/account/insight — Insight akun
POST http://127.0.0.1:8081/api/account/insightCopy URL
curl PowerShell JavaScript Node.js Python Go PHP Copy
curl --request POST \
--url http://127.0.0.1:8081/api/account/insight $ response = Invoke-WebRequest - Uri ' http://127.0.0.1:8081/api/account/insight ' - Method POST const url = ' http://127.0.0.1:8081/api/account/insight ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} const fetch = require ( ' node-fetch ' );
const url = ' http://127.0.0.1:8081/api/account/insight ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} import requests
url = " http://127.0.0.1:8081/api/account/insight "
response = requests . post ( url )
print ( response . json ()) package main
import (
" fmt "
" net/http "
" io "
)
func main () {
url := " http://127.0.0.1:8081/api/account/insight "
req , _ := http . NewRequest ( " POST " , url , nil )
res , _ := http . DefaultClient . Do ( req )
defer res . Body . Close ()
body , _ := io . ReadAll ( res . Body )
fmt . Println ( res )
fmt . Println ( string ( body ))
} <? php
$ curl = curl_init ();
curl_setopt_array ($ curl , [
CURLOPT_PORT => " 8081 " ,
CURLOPT_URL => " http://127.0.0.1:8081/api/account/insight " ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => " POST " ,
]);
$ response = curl_exec ($ curl );
$ err = curl_error ($ curl );
curl_close ($ curl );
if ($ err ) {
echo " cURL Error #: " . $ err ;
} else {
echo $ response ;
}
Ambil insight performa akun iklan tunggal.
Field Wajib Tipe account_id✅ string date_preset❌ string
POST /api/account/partner — Agensi partner akun
POST http://127.0.0.1:8081/api/account/partnerCopy URL
curl PowerShell JavaScript Node.js Python Go PHP Copy
curl --request POST \
--url http://127.0.0.1:8081/api/account/partner $ response = Invoke-WebRequest - Uri ' http://127.0.0.1:8081/api/account/partner ' - Method POST const url = ' http://127.0.0.1:8081/api/account/partner ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} const fetch = require ( ' node-fetch ' );
const url = ' http://127.0.0.1:8081/api/account/partner ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} import requests
url = " http://127.0.0.1:8081/api/account/partner "
response = requests . post ( url )
print ( response . json ()) package main
import (
" fmt "
" net/http "
" io "
)
func main () {
url := " http://127.0.0.1:8081/api/account/partner "
req , _ := http . NewRequest ( " POST " , url , nil )
res , _ := http . DefaultClient . Do ( req )
defer res . Body . Close ()
body , _ := io . ReadAll ( res . Body )
fmt . Println ( res )
fmt . Println ( string ( body ))
} <? php
$ curl = curl_init ();
curl_setopt_array ($ curl , [
CURLOPT_PORT => " 8081 " ,
CURLOPT_URL => " http://127.0.0.1:8081/api/account/partner " ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => " POST " ,
]);
$ response = curl_exec ($ curl );
$ err = curl_error ($ curl );
curl_close ($ curl );
if ($ err ) {
echo " cURL Error #: " . $ err ;
} else {
echo $ response ;
}
Ambil daftar agensi partner untuk akun.
POST /api/account/rename — Rename akun
POST http://127.0.0.1:8081/api/account/renameCopy URL
curl PowerShell JavaScript Node.js Python Go PHP Copy
curl --request POST \
--url http://127.0.0.1:8081/api/account/rename $ response = Invoke-WebRequest - Uri ' http://127.0.0.1:8081/api/account/rename ' - Method POST const url = ' http://127.0.0.1:8081/api/account/rename ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} const fetch = require ( ' node-fetch ' );
const url = ' http://127.0.0.1:8081/api/account/rename ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} import requests
url = " http://127.0.0.1:8081/api/account/rename "
response = requests . post ( url )
print ( response . json ()) package main
import (
" fmt "
" net/http "
" io "
)
func main () {
url := " http://127.0.0.1:8081/api/account/rename "
req , _ := http . NewRequest ( " POST " , url , nil )
res , _ := http . DefaultClient . Do ( req )
defer res . Body . Close ()
body , _ := io . ReadAll ( res . Body )
fmt . Println ( res )
fmt . Println ( string ( body ))
} <? php
$ curl = curl_init ();
curl_setopt_array ($ curl , [
CURLOPT_PORT => " 8081 " ,
CURLOPT_URL => " http://127.0.0.1:8081/api/account/rename " ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => " POST " ,
]);
$ response = curl_exec ($ curl );
$ err = curl_error ($ curl );
curl_close ($ curl );
if ($ err ) {
echo " cURL Error #: " . $ err ;
} else {
echo $ response ;
}
Ubah nama akun iklan di Facebook.
Field Wajib Tipe account_id✅ string name✅ string
POST /api/account/reset — Reset nama ke default
POST http://127.0.0.1:8081/api/account/resetCopy URL
curl PowerShell JavaScript Node.js Python Go PHP Copy
curl --request POST \
--url http://127.0.0.1:8081/api/account/reset $ response = Invoke-WebRequest - Uri ' http://127.0.0.1:8081/api/account/reset ' - Method POST const url = ' http://127.0.0.1:8081/api/account/reset ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} const fetch = require ( ' node-fetch ' );
const url = ' http://127.0.0.1:8081/api/account/reset ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} import requests
url = " http://127.0.0.1:8081/api/account/reset "
response = requests . post ( url )
print ( response . json ()) package main
import (
" fmt "
" net/http "
" io "
)
func main () {
url := " http://127.0.0.1:8081/api/account/reset "
req , _ := http . NewRequest ( " POST " , url , nil )
res , _ := http . DefaultClient . Do ( req )
defer res . Body . Close ()
body , _ := io . ReadAll ( res . Body )
fmt . Println ( res )
fmt . Println ( string ( body ))
} <? php
$ curl = curl_init ();
curl_setopt_array ($ curl , [
CURLOPT_PORT => " 8081 " ,
CURLOPT_URL => " http://127.0.0.1:8081/api/account/reset " ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => " POST " ,
]);
$ response = curl_exec ($ curl );
$ err = curl_error ($ curl );
curl_close ($ curl );
if ($ err ) {
echo " cURL Error #: " . $ err ;
} else {
echo $ response ;
}
Reset nama akun iklan ke default (updateNameDefault).
POST /api/account/update — Rename + spend cap
POST http://127.0.0.1:8081/api/account/updateCopy URL
curl PowerShell JavaScript Node.js Python Go PHP Copy
curl --request POST \
--url http://127.0.0.1:8081/api/account/update $ response = Invoke-WebRequest - Uri ' http://127.0.0.1:8081/api/account/update ' - Method POST const url = ' http://127.0.0.1:8081/api/account/update ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} const fetch = require ( ' node-fetch ' );
const url = ' http://127.0.0.1:8081/api/account/update ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} import requests
url = " http://127.0.0.1:8081/api/account/update "
response = requests . post ( url )
print ( response . json ()) package main
import (
" fmt "
" net/http "
" io "
)
func main () {
url := " http://127.0.0.1:8081/api/account/update "
req , _ := http . NewRequest ( " POST " , url , nil )
res , _ := http . DefaultClient . Do ( req )
defer res . Body . Close ()
body , _ := io . ReadAll ( res . Body )
fmt . Println ( res )
fmt . Println ( string ( body ))
} <? php
$ curl = curl_init ();
curl_setopt_array ($ curl , [
CURLOPT_PORT => " 8081 " ,
CURLOPT_URL => " http://127.0.0.1:8081/api/account/update " ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => " POST " ,
]);
$ response = curl_exec ($ curl );
$ err = curl_error ($ curl );
curl_close ($ curl );
if ($ err ) {
echo " cURL Error #: " . $ err ;
} else {
echo $ response ;
}
Rename akun + update spend cap sekaligus (updateNameAndSpendCap).
Field Wajib Tipe account_id✅ string name✅ string spend_cap✅ number
POST /api/account/spendcap — Update spend cap
POST http://127.0.0.1:8081/api/account/spendcapCopy URL
curl PowerShell JavaScript Node.js Python Go PHP Copy
curl --request POST \
--url http://127.0.0.1:8081/api/account/spendcap $ response = Invoke-WebRequest - Uri ' http://127.0.0.1:8081/api/account/spendcap ' - Method POST const url = ' http://127.0.0.1:8081/api/account/spendcap ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} const fetch = require ( ' node-fetch ' );
const url = ' http://127.0.0.1:8081/api/account/spendcap ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} import requests
url = " http://127.0.0.1:8081/api/account/spendcap "
response = requests . post ( url )
print ( response . json ()) package main
import (
" fmt "
" net/http "
" io "
)
func main () {
url := " http://127.0.0.1:8081/api/account/spendcap "
req , _ := http . NewRequest ( " POST " , url , nil )
res , _ := http . DefaultClient . Do ( req )
defer res . Body . Close ()
body , _ := io . ReadAll ( res . Body )
fmt . Println ( res )
fmt . Println ( string ( body ))
} <? php
$ curl = curl_init ();
curl_setopt_array ($ curl , [
CURLOPT_PORT => " 8081 " ,
CURLOPT_URL => " http://127.0.0.1:8081/api/account/spendcap " ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => " POST " ,
]);
$ response = curl_exec ($ curl );
$ err = curl_error ($ curl );
curl_close ($ curl );
if ($ err ) {
echo " cURL Error #: " . $ err ;
} else {
echo $ response ;
}
Update nilai spend cap akun tanpa rename (updateSpendCap).
Field Wajib Tipe account_id✅ string spend_cap✅ number
POST /api/account/topup — Tambah spend cap
POST http://127.0.0.1:8081/api/account/topupCopy URL
curl PowerShell JavaScript Node.js Python Go PHP Copy
curl --request POST \
--url http://127.0.0.1:8081/api/account/topup $ response = Invoke-WebRequest - Uri ' http://127.0.0.1:8081/api/account/topup ' - Method POST const url = ' http://127.0.0.1:8081/api/account/topup ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} const fetch = require ( ' node-fetch ' );
const url = ' http://127.0.0.1:8081/api/account/topup ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} import requests
url = " http://127.0.0.1:8081/api/account/topup "
response = requests . post ( url )
print ( response . json ()) package main
import (
" fmt "
" net/http "
" io "
)
func main () {
url := " http://127.0.0.1:8081/api/account/topup "
req , _ := http . NewRequest ( " POST " , url , nil )
res , _ := http . DefaultClient . Do ( req )
defer res . Body . Close ()
body , _ := io . ReadAll ( res . Body )
fmt . Println ( res )
fmt . Println ( string ( body ))
} <? php
$ curl = curl_init ();
curl_setopt_array ($ curl , [
CURLOPT_PORT => " 8081 " ,
CURLOPT_URL => " http://127.0.0.1:8081/api/account/topup " ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => " POST " ,
]);
$ response = curl_exec ($ curl );
$ err = curl_error ($ curl );
curl_close ($ curl );
if ($ err ) {
echo " cURL Error #: " . $ err ;
} else {
echo $ response ;
}
Tambah nilai spend cap Facebook (topupSpendCap). Dipakai setelah pembayaran top-up diverifikasi.
Field Wajib Tipe Keterangan account_id✅ string Akun tujuan amount✅ number Nominal tambahan
Response
json Copy &# 123 ;
" status " : true ,
" data " : &# 123 ;
" success " : true ,
" new_spend_cap " : 1500000
&# 125 ;
&# 125 ;
POST /api/account/withdraw — Kurangi spend cap
POST http://127.0.0.1:8081/api/account/withdrawCopy URL
curl PowerShell JavaScript Node.js Python Go PHP Copy
curl --request POST \
--url http://127.0.0.1:8081/api/account/withdraw $ response = Invoke-WebRequest - Uri ' http://127.0.0.1:8081/api/account/withdraw ' - Method POST const url = ' http://127.0.0.1:8081/api/account/withdraw ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} const fetch = require ( ' node-fetch ' );
const url = ' http://127.0.0.1:8081/api/account/withdraw ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} import requests
url = " http://127.0.0.1:8081/api/account/withdraw "
response = requests . post ( url )
print ( response . json ()) package main
import (
" fmt "
" net/http "
" io "
)
func main () {
url := " http://127.0.0.1:8081/api/account/withdraw "
req , _ := http . NewRequest ( " POST " , url , nil )
res , _ := http . DefaultClient . Do ( req )
defer res . Body . Close ()
body , _ := io . ReadAll ( res . Body )
fmt . Println ( res )
fmt . Println ( string ( body ))
} <? php
$ curl = curl_init ();
curl_setopt_array ($ curl , [
CURLOPT_PORT => " 8081 " ,
CURLOPT_URL => " http://127.0.0.1:8081/api/account/withdraw " ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => " POST " ,
]);
$ response = curl_exec ($ curl );
$ err = curl_error ($ curl );
curl_close ($ curl );
if ($ err ) {
echo " cURL Error #: " . $ err ;
} else {
echo $ response ;
}
Tarik nilai spend cap Facebook (withdrawSpendCap). Dipakai saat member withdraw saldo / pengurangan limit.
Field Wajib Tipe account_id✅ string amount✅ number
POST /api/account/refund — Refund saldo
POST http://127.0.0.1:8081/api/account/refundCopy URL
curl PowerShell JavaScript Node.js Python Go PHP Copy
curl --request POST \
--url http://127.0.0.1:8081/api/account/refund $ response = Invoke-WebRequest - Uri ' http://127.0.0.1:8081/api/account/refund ' - Method POST const url = ' http://127.0.0.1:8081/api/account/refund ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} const fetch = require ( ' node-fetch ' );
const url = ' http://127.0.0.1:8081/api/account/refund ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} import requests
url = " http://127.0.0.1:8081/api/account/refund "
response = requests . post ( url )
print ( response . json ()) package main
import (
" fmt "
" net/http "
" io "
)
func main () {
url := " http://127.0.0.1:8081/api/account/refund "
req , _ := http . NewRequest ( " POST " , url , nil )
res , _ := http . DefaultClient . Do ( req )
defer res . Body . Close ()
body , _ := io . ReadAll ( res . Body )
fmt . Println ( res )
fmt . Println ( string ( body ))
} <? php
$ curl = curl_init ();
curl_setopt_array ($ curl , [
CURLOPT_PORT => " 8081 " ,
CURLOPT_URL => " http://127.0.0.1:8081/api/account/refund " ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => " POST " ,
]);
$ response = curl_exec ($ curl );
$ err = curl_error ($ curl );
curl_close ($ curl );
if ($ err ) {
echo " cURL Error #: " . $ err ;
} else {
echo $ response ;
}
Refund sisa saldo spend cap (refundSpendCap). Dipakai saat akun expired & saldo dikembalikan.
POST /api/account/check — Cek shared
POST http://127.0.0.1:8081/api/account/checkCopy URL
curl PowerShell JavaScript Node.js Python Go PHP Copy
curl --request POST \
--url http://127.0.0.1:8081/api/account/check $ response = Invoke-WebRequest - Uri ' http://127.0.0.1:8081/api/account/check ' - Method POST const url = ' http://127.0.0.1:8081/api/account/check ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} const fetch = require ( ' node-fetch ' );
const url = ' http://127.0.0.1:8081/api/account/check ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} import requests
url = " http://127.0.0.1:8081/api/account/check "
response = requests . post ( url )
print ( response . json ()) package main
import (
" fmt "
" net/http "
" io "
)
func main () {
url := " http://127.0.0.1:8081/api/account/check "
req , _ := http . NewRequest ( " POST " , url , nil )
res , _ := http . DefaultClient . Do ( req )
defer res . Body . Close ()
body , _ := io . ReadAll ( res . Body )
fmt . Println ( res )
fmt . Println ( string ( body ))
} <? php
$ curl = curl_init ();
curl_setopt_array ($ curl , [
CURLOPT_PORT => " 8081 " ,
CURLOPT_URL => " http://127.0.0.1:8081/api/account/check " ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => " POST " ,
]);
$ response = curl_exec ($ curl );
$ err = curl_error ($ curl );
curl_close ($ curl );
if ($ err ) {
echo " cURL Error #: " . $ err ;
} else {
echo $ response ;
}
Cek apakah akun sudah di-share (checkIfShared).
Field Wajib Tipe account_id✅ string
Response
json Copy &# 123 ;
" status " : true ,
" data " : &# 123 ; " is_shared " : false &# 125 ;
&# 125 ;
POST /api/account/sync — Sinkronisasi akun
POST http://127.0.0.1:8081/api/account/syncCopy URL
curl PowerShell JavaScript Node.js Python Go PHP Copy
curl --request POST \
--url http://127.0.0.1:8081/api/account/sync $ response = Invoke-WebRequest - Uri ' http://127.0.0.1:8081/api/account/sync ' - Method POST const url = ' http://127.0.0.1:8081/api/account/sync ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} const fetch = require ( ' node-fetch ' );
const url = ' http://127.0.0.1:8081/api/account/sync ' ;
const options = { method : ' POST ' };
try {
const response = await fetch ( url , options );
const data = await response . json ();
console . log ( data );
} catch ( error ) {
console . error ( error );
} import requests
url = " http://127.0.0.1:8081/api/account/sync "
response = requests . post ( url )
print ( response . json ()) package main
import (
" fmt "
" net/http "
" io "
)
func main () {
url := " http://127.0.0.1:8081/api/account/sync "
req , _ := http . NewRequest ( " POST " , url , nil )
res , _ := http . DefaultClient . Do ( req )
defer res . Body . Close ()
body , _ := io . ReadAll ( res . Body )
fmt . Println ( res )
fmt . Println ( string ( body ))
} <? php
$ curl = curl_init ();
curl_setopt_array ($ curl , [
CURLOPT_PORT => " 8081 " ,
CURLOPT_URL => " http://127.0.0.1:8081/api/account/sync " ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => " POST " ,
]);
$ response = curl_exec ($ curl );
$ err = curl_error ($ curl );
curl_close ($ curl );
if ($ err ) {
echo " cURL Error #: " . $ err ;
} else {
echo $ response ;
}
Sinkronisasi data akun rented (syncRentedAccount) — refresh saldo/spend cap dari Meta.
Transfer via account
Transfer balance sebenarnya memakai grup endpoint /api/transfer-balance — lihat Transfer Balance .
Ringkasan endpoint
Method Endpoint Fungsi POST /api/account/Single data akun POST /api/account/balanceCek saldo riil POST /api/account/insightInsight akun POST /api/account/partnerAgensi partner POST /api/account/renameRename akun POST /api/account/resetReset nama default POST /api/account/updateRename + spend cap POST /api/account/spendcapUpdate spend cap POST /api/account/topupTambah spend cap POST /api/account/withdrawKurangi spend cap POST /api/account/refundRefund saldo POST /api/account/checkCek shared POST /api/account/syncSinkronisasi akun
Error umum
Pesan Kondisi Graph returned an error: (#10) ...Permission / akun tidak punya akses Graph returned an error: (#100) ...Parameter tidak valid Graph returned an error: (#368) ...Standard error saat akses spend cap Account is not activeStatus akun inactive
Langkah berikutnya