Webcheckout

Web checkout implementation
Parameters description
Available Payment methods.

Web checkout Implementation

Below you will find a sample code for your payment button. Simply replace the example values as required and you’ll be ready to start receiving payments.

 

Parameters description

Parameter Type Description Requirement
pg_serviceid integer Service ID of your account. Mandatory
pg_price numeric The price of the product/service. Mandatory
pg_currency string Type of currency specified in alphabetic code ISO 4217 you want to use (eg: EUR, USD, GBP, MXN, etc.). See the full list of the currency codes. Mandatory
pg_country string Country of the payer, in ISO 3166-2 format (e.g. GB, DE, ES).
See the list of the country codes.
Mandatory
pg_language string Language, in ISO 639-1 format (e.g. en, es). If the provided language is not available, defaults to english. optional
pg_method string Payment method. Please check the table below for a list of available payment methods and their codes. For more information regarding each payment method, please check our Pricing page. Mandatory only for whitelabel checkout
pg_name string Description of your product/service, which will be shown on the payment screen. optional
pg_custom string Custom field, can be used to identify customer, inventory, etc. optional
pg_email string Email address of the payer. Mandatory only for whitelabel checkout
pg_phone string Phone number of the payer. Mandatory only for whitelabel checkout for some payment methods.
pg_first_name string First name of the payer. Mandatory only for whitelabel checkout
pg_last_name string Last name of the payer. Mandatory only for whitelabel checkout
pg_personalid string Local personal ID number of the payer. Mandatory only for whitelabel checkout for some payment methods
pg_sub_merchant_url string optional
pg_sub_merchant_id string optional
pg_return_url string After the payment process your customers will be redirected here (e.g. https://www.mysite.com/thanks). optional
pg_cancel_url string Your customer will be redirected to after a cancelled or failed payment process (e.g. https://www.mysite.com/failed). optional

Available Payment methods:

Name Code Description

Credit Card

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory

Bitcoin

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory

Webpay

pg_country Mandatory
pg_email Mandatory

Multicaja

pg_country Mandatory
pg_email Mandatory

Servipag

pg_country Mandatory
pg_email Mandatory

PagoEfectivo

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory
pg_personalid Mandatory
pg_phone Mandatory

Pago Facil

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory
pg_personalid Mandatory

Rapipago

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory
pg_personalid Mandatory

Paysafecard

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory

Giropay

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory
pg_personalid Mandatory

iDEAL

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory

Sofort

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory

Przelewy24

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory

Bancontact

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory

Bradesco

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory
pg_personalid Mandatory
pg_phone Mandatory

OXXO

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory
pg_personalid Mandatory

Itaú

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory
pg_personalid Mandatory
pg_phone Mandatory

Davivienda

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory
pg_personalid Mandatory

Boleto

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory
pg_personalid Mandatory

Redpagos

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory
pg_personalid Mandatory

Santander Brasil

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory
pg_personalid Mandatory
pg_phone Mandatory

Santander México

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory
pg_personalid Mandatory

Banco do Brasil

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory
pg_personalid Mandatory
pg_phone Mandatory

PSE

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory
pg_personalid Mandatory

Efecty

pg_country Mandatory
pg_email Mandatory
pg_first_name Mandatory
pg_last_name Mandatory
pg_personalid Mandatory
Instant Payment Notification (IPN)

What is IPN?
Instant Payment Notification (IPN) is a service that notifies you of events related to Paygol transactions. You can use it to automate back-office and administrative functions, such as fulfilling orders, inserting points or coins, upgrading membership, tracking customers, and providing status and other information related to a transaction.

Information about the payment
Paygol will make a GET request to your IPN file when your customer completes a transaction. You can use this notification to kick-off order fulfillment, enable digital media downloads, store information in a customer relationship management (CRM) or accounting system, and so on.

How to receive the IPN information in my web page?
Paygol provides samples of Instant Payment Notification (IPN) code for popular development environments. For custom IPN files, you can use the following sample code as a starting point.

Example:

<?php 

$secret_key = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee";  // Enter secret key for your service. 

// Secret key validation 
if ($secret_key != $_GET['key']) {
    echo "Validation error"; 
    exit;
}

// get the variables from Paygol system
$transaction_id	   = $_GET['transaction_id'];
$service_id	       = $_GET['service_id'];
$country	          = $_GET['country'];
$custom	           = $_GET['custom'];
$price	            = $_GET['price'];
$currency  	       = $_GET['currency'];

// Here you can do whatever you want with the variables, for instance inserting or updating data into your Database 

IPN Parameters description