<?php

$payloadSyncpay = [
    "amount" => 10,
    "customer" => [
        "name" => "Paulo Queiroz",
        "email" => "cliente@email.com",
        "cpf" => "02965847521"
    ],
    "postbackUrl" => "https://exemple/webhook/"
];

$apiKey = "119bfe02965b44092e728664";
$apiEncoded = base64_encode($apiKey);

$ch = curl_init("https://api.syncpay.pro/v1/gateway/api/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payloadSyncpay));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Basic ' . $apiEncoded,
    'Content-Type: application/json'
]);

$response = curl_exec($ch);

var_dump($response);