Paxful developers resources Paxful developers resources Paxful developers resources Paxful developers resources
  • Blog
  • Support
Paxful developers resources Paxful developers resources
  • Blog
  • Support

PHP example for generate payment links:


$this->apiKey = $apiKey;
$this->secretKey = $secretKey;
}
/**
* @param array $queryParams
*
* @return string
*/
public function generatePaymentLink(array $queryParams): string
{
$queryParams = array_merge(
['merchant' => $this->merchantId],
$queryParams,
['apikey' => $this->apiKey]
);

$queryString = http_build_query($queryParams, null, '&', PHP_QUERY_RFC3986);

$apiseal = hash_hmac(self::DIGEST_ALGORITHM, $queryString, $this->secretKey);

return self::ENDPOINT . $queryString . '&apiseal=' . $apiseal;
}
}

$queryParams = [
'fiat_amount' => 100,
'fiat_currency' => 'USD',
'saveaddress' => 1,
'to' => 'muxy2TuEVmSDhYJ5naEAcYDfiV6bajhLcX',
'track_id' => '1234567890',
'user_email' => '[email protected]',
];

$merchantId = 'dXxL5g35BeZ';
$apiKey = 'TEUbtrJ8hu2W1N3u4jwcXN5rA6ngssqq';
$secret = 'YfG0BZ8isHZ6w2iNEa6VqzTLdqdLVEKl';

$paxfulMerchant = new PaxfulMerchant($merchantId, $apiKey, $secret);

$paymentLink = $paxfulMerchant->generatePaymentLink($queryParams);

echo $paymentLink;

PAXFUL API

  • Getting started
  • Webhooks

BUY BITCOIN WIDGET

  • Introduction to buy bitcoin widget
  • Authentication / requirements
  • Modification options

PAY WITH PAXFUL

  • Introduction to Pay with Paxful
  • Authentication / requirements
  • Examples

PUBLIC DATA

  • Trades average
  • Trades history

API V1

  • API Reference
  • Paxful
  • Blog
  • Support
  • Github
  • Follow us on Twitter
  • Like us on Facebook