Hosted Payment Page

Hosted Payment Page with PayBull is a reliable and fast payment method that enables businesses to easily receive online payments. This solution allows you to receive payments through a link hosted by PayBull and provides the option to make callbacks to specified callback URLs after payment.


Method API Endpoint Content Type
POST /purchase/link application/x-www-form-urlencoded


Parameter Requirement Content Type
Authorization Mandatory Bearer
Accept Mandatory application/json


Parameter Data Type Requirement Description
merchant_key string Mandatory Unique Merchant Key obtained from PayBull
invoice array Mandatory JSON-formatted string combining quantity, amount, unit price, discount, coupon, etc.
name string Optional Name of the person purchasing the product
surname string Optional Surname of the person purchasing the product
currency_code string Mandatory Currency code. e.g., USD, TRY, EUR
max_installment string Optional Maximum number of installments to be displayed to the user
bill_address1 string Optional 1st Address Line of the purchaser
bill_address2 string Optional 2nd Address Line of the purchaser
bill_city string Optional City of the purchaser
bill_postcode string Optional Postal code of the purchaser
bill_state string Optional State of the purchaser
bill_country string Optional Country of the purchaser
bill_email string Optional Email address of the purchaser
bill_phone string Optional Phone number of the purchaser
card_program string Optional One of the values: WORLD, BONUS, MAXIMUM, BANKKART_COMBO, PARAF, AXESS, ADVANT, CARD_FNS
ip string Optional IP address of the purchaser
transaction_type string Optional Sent with parameters PreAuth / Auth. Payment must be completed or canceled within 20 days, otherwise, it will be automatically canceled.
sale_webhook_key string Optional When a purchase request is completed, PayBull sends a POST request. The Sale Webhook URL must be assigned in the PayBull Merchant Panel.


$invoice['invoice_id'] = “345345535”; // One unique id which will  be available in the return or cancel URL

$invoice['invoice_description'] = “ INVOICE  TEST DESCRIPTION” ;

$invoice['total'] =  1300

$invoice[discount] =  220 //The amount of coupon code or discount value

$invoice[coupon] =  “3XY8P”  //couponn code in  case applicable

$invoice['return_url'] =  “https://<your_success_url>”

$invoice['cancel_url'] =   “https://<your_fail_or_cancel_url>”

$invoice['items'] = array(

array(“name”=>”Item1”,”price”=>200,”qnantity”=>2,”description”=>”item1 description”),

array(“name”=>”Item2”,”price”=>100,”qnantity”=>1,”description”=>”item2 description”),

array(“name”=>”Item3”,”price”=>400,”qnantity”=>2,”description”=>”item3 description”),

//billing info

    $invoice['bill_address1'] = 'Address 1'; //should not more than 100 characters

    $invoice['bill_address2'] = 'Address 2'; //should not more than 100 characters
    $invoice['bill_city'] = 'Istanbul';

    $invoice['bill_postcode'] = '1111';

    $invoice['bill_state'] = 'Istanbul';

    $invoice['bill_country'] = 'TURKEY';

    $invoice['bill_phone'] = '008801777711111';

    $invoice['bill_email'] = '[email protected]';

$invoice['sale_webhook_key'] = 'sale_webhook_key';// This key must be assigned in the paybull merchant panel.

All taxes and shipping charges will be added as an item in the invoice items sequence.
The item names should be "Tax" and "Shipping Charge" with quantity 1 respectively.