Spanish Portuguese

Introduction Last update 2019-06-01

You can integrate payments through Paygol easily using our Webcheckout Implementation, without the need for technical knowledge. So Likewise, we offer alternatives such as a Whitelabel Webcheckout Implementation and a comprehensive API for developers who want additional functionality.

All the options mentioned above allow the automatic notification of payments to your platform, avoiding the need to manually deliver products / services to your customers.

Base URL: https://www.paygol.com

Webcheckout

Below you will find a sample code for your payment button. Just replace the sample values ​​as required and you are ready to start receiving payments.

POST /pay
Parameters
pg_serviceid
Required
string Paygol merchant ID
pg_price
Required
string Payment amount: ex. 1000.00 /^[0-9]+\.[0-9]{2}$/
pg_currency
Required
string Currency type specified in ISO 4217 alphabetic code
pg_country
Optional
string ISO 3166-2 country code
pg_method
Optional
string Payment method code
pg_email
Optional
string Payer's email
pg_first_name
Optional
string Payer name
pg_last_name
Optional
string Payer surname
pg_personalid
Optional
string Payer's document number
pg_phone
Optional
string Payer's phone number
pg_sub_merchant_id
Optional
string Code used to distinguish between different merchants that use our service through their platform
pg_sub_merchant_url
Optional
string Website of the merchant where the payment originates from
pg_return_url
Optional
string Redirect url for completed payments
pg_cancel_url
Optional
string Redirect url for when the payment is failed or canceled by the payer
pg_language
Optional
string ISO 639-1 language
pg_name
Optional
string Description of your product / service, which will be shown in the payment screen (Max: 255)
pg_custom
Optional
string Flexible field, can be used to track user, inventory, etc. (Max. 255)

API

Our API implementation offers a high level of customization, allowing you to implement a white label payment solution directly on your platform in a fast and easy way.

This implementation is based on POST calls to web services, which will deliver a response in JSON format. The response will contain the URL to which you will have to redirect your customers to start the payment process.

Signature

All requests to the payment API must be signed using the merchant's secret key with the HMAC SHA256 algorithm. The signature should be calculated using the request payload, sorted in ascending order, and adding this result in a request header named X-Pg-Sig.

Get token
Headers
X-PG-SIG
Required
string HMAC-SHA256 request signature
Parameters
pg_serviceid
Required
string Paygol merchant ID
POST /api/v2/auth/token
Response 200 OK - Content-Type: application/json

{
  "token": "dce5b070ba65626dccd4ad700fdf3c1d219105a1"
}
							
Create payment
Headers
X-PG-SIG
Required
string HMAC-SHA256 request signature
Parameters
pg_serviceid
Required
string Paygol merchant ID
pg_ip
Required
string IP address of the payer.
pg_price
Required
string Payment amount: ex. 1000.00 /^[0-9]+\.[0-9]{2}$/
pg_currency
Required
string Currency type specified in ISO 4217 alphabetic code
pg_country
Required
string ISO 3166-2 country code
pg_method
Required
string Payment method code
pg_email
Required
string Payer's email
pg_first_name
Required
string Payer name
pg_last_name
Required
string Payer surname
pg_personalid
Optional
string Payer's document number
pg_phone
Optional
string Payer's phone number
pg_sub_merchant_id
Optional
string Code used to distinguish between different merchants that use our service through their platform
pg_sub_merchant_url
Optional
string Website of the merchant where the payment originates from
pg_return_url
Required
string Redirect url for completed payments
pg_cancel_url
Required
string Redirect url for when the payment is failed or canceled by the payer
pg_custom
Optional
string Flexible field, can be used to track user, inventory, etc. (Max. 255)
pg_address
Optional
string Payer's Address (Max 256)
pg_city
Optional
string Payer's City (Max 64)

Note

Some countries have special requirements for certain payment methods.

POST /api/v2/payment/create
Response 200 OK - Content-Type: application/json
{
  "data": {
    "service_id": "PAYGOL_SERVICE_ID",
    "transaction_id": "OO3Q-73HT-ALEB-Y0G2",
    "status": "created",
    "payment_method": "webpay",
    "amount": "3500.00",
    "currency": "CLP",
    "payment_method_url": "https://www.paygol.com/api/pay-direct/OO3Q-73HT-ALEB-Y0G2",
    "custom": "Pago cuenta VIP",
    "customer": {
      "first_name": "Roberto",
      "last_name": "Fernandez",
      "email": "[email protected]",
      "phone": "",
      "personal_id": "",
      "country": "CL"
    },
    "redirect_urls": {
      "success_url": "http://www.mi-sitio.com/pago-ok",
      "cancel_url": "http://www.mi-sitio.com/pago-cancelado"
    }
  }
}
Get payment status
Headers
X-PG-SIG
Required
string HMAC-SHA256 request signature
Parameters
pg_serviceid
Required
string Paygol merchant ID
pg_token
Required
string Auth token
transaction_id
Required
string Paygol transaction ID
POST /api/v2/payment/status
Response 200 OK - Content-Type: application/json
{
  "payment": {
    "service_id": "PAYGOL_SERVICE_ID",
    "transaction_id": "OO3Q-73HT-ALEB-Y0G2",
    "status": "completed",
    "payment_method": "webpay",
    "amount": "3500.00",
    "currency": "CLP",
    "created_at": "2021-01-02 23:11:00",
    "completed": "2021-01-02 23:13:00",
    "custom": "Pago cuenta VIP",
    "customer": {
      "first_name": "Roberto",
      "last_name": "Fernandez",
      "email": "[email protected]",
      "phone": "",
      "personal_id": "",
      "country": "CL"
    }
  }
}

Notifications

IPN (Instant Payment Notification) is a notification that is sent from one server to another through a HTTP POST call in relation to your transactions.

To receive notifications of events in your system, you must have previously configured a notification url to which Paygol has access.

To guarantee the security of the exchanges, the data will be signed using the merchant secret_key .

Note

The notification URL and the secret_key can be found in the Merchant panel, Notifications section.

Confirmation

If your notification script executes very complex logic or makes calls to the network, it is possible that the waiting time will expire before Paygol receives the reception confirmation. Ideally, your code that handles receiving notifications (acknowledging with 2xx status code) is independent of any other logic.

Handling duplicate notifications

Notification endpoints can sometimes receive the same notification more than once. This is why we recommend that you avoid duplicate notification receipts by making your event processing idempotent.

Notifications
{
    "country": "CL",
    "completed_at": "2020-11-26T16:22:32-03:00",
    "currency": "CLP",
    "created_at": "2020-11-26T16:19:27-03:00",
    "custom": "Pago cuenta VIP",
    "method": "webpay",
    "price": "7500.00",
    "service_id": "PAYGOL_SERVICE_ID",
    "status": "completed",
    "transaction_id": "ZISS-A7Q8-RE2Z-S73W",
}
	
Retrieve notification information

Plugins

In this section you can find all the plugins that you have available to use.

Prestashop
  1. Download the plugin .zip file
  2. In prestashop go to "Modules > Module manager" and select "Upload a module", then search for and select the Paygol plugin downloaded in the previous point.
  3. In "Module Manager" find the "Paygol" plugin and press the "Configure" button.
  4. In "Enviroment" select "Production" and configure the module with the "Token Service/Service ID" and "Token Secret/ Secret Key" delivered by Paygol (to perform tests in a "testing" environment, you must change the "enviroment" to "development").
  5. For international payment to work properly, you must go to "Payment" > "Preferences" and in the "Currency restrictions" section configure the restrictions that apply and then adjust the restrictions to the countries where Paygol will be enabled as a means of payment
  6. In the "International" section then go to "Geographical Locations", in the "Countries" tab you must configure the countries where Paygol will be enabled as a means of payment
  7. Your e-commerce is ready to accept payments through Paygol. If you have any problems or doubts with the installation of the plugin, you can contact us at [email protected]
Woocommerce
  1. Download the plugin .zip file
  2. Go to the "Plugins" section, select "Add new" and press the "Upload Plugin" button to load the Paygol plugin. Once installed, select "Activate Plugin".
  3. To configure the Paygol plugin, go to "Woocommerce" > "Settings" > "Payment" and press "Manage" in Paygol
  4. In "Enviroment" select "Production" and configure the module with the "Token Service/Service ID" and "Token Secret/ Secret Key" delivered by Paygol (to perform tests in a "testing" environment, you must change the "enviroment" to "development").
  5. Your e-commerce is ready to accept payments through Paygol. If you have any problems or doubts with the installation of the plugin, you can contact us at [email protected]
    NOTE: For its proper functioning, you need to add the "country" field on your payment form
Magento
  1. Download the plugin .zip file (The server must have Magento 2.4.3 installed)
  2. Unzip the Paygol plugin inside "path_base_magento"/app/code/ (With a client FTP, ej: FileZilla)
  3. From the terminal (SSH), position yourself in public_html (inside the server)
  4. Then run the following commands to enable the module dependencies
    composer config repositories.paygol-core "path_base_magento"/app/code/Paygol/PaygolMagento/paygol-core
    composer require kdu/paygolcore Aqui puedes ver como obtener las credenciales
    composer install
    composer dump-autoload
  5. Finally, run the following commands to activate the module
    php bin/magento module:enable Paygol_PaygolMagento --clear-static-content
    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento setup:static-content:deploy -f
    php bin/magento cache:flush
  6. Once inside Magento, go to the "Stores" section, then enter "Configuration"
  7. In "Configuration", select "Sales" and then "Payment Methods"
  8. Once inside, in "Merchant Country" you must select the country of origin of your store, then in "Other Payments", you must search for Paygol Spa
  9. Change the "Environment" to "Production" configure the module with the “Token Service/Service ID” and “Token Secret/ Secret Key” delivered by Paygol
  10. For international payment to work properly, it must be configured in which country Paygol will be enabled as a means of payment
  11. Your e-commerce is ready to accept payments through Paygol. If you have any problems or doubts with the installation of the plugin, you can contact us at [email protected]

Payment methods

Internacional
Credit Card creditcard pg_phone is required for this payment method
Bitcoin bitcoin
Argentina
Pago Fácil pagofacil pg_personalid is required for this payment method
Rapipago rapipago pg_personalid is required for this payment method
Brasil
Ame Digital amedigital pg_personalid (CPF/CNPJ) y pg_phone son Required para este método de pago
Boleto Bancario boleto pg_personalid (CPF/CNPJ) y pg_phone son Required para este método de pago
Banco do Brazil bancodobrasil pg_personalid (CPF/CNPJ) y pg_phone son Required para este método de pago
Bradesco bradesco pg_personalid (CPF/CNPJ) y pg_phone son Required para este método de pago
Caixa caixa pg_personalid (CPF/CNPJ) y pg_phone son Required para este método de pago
Itaú itau pg_personalid (CPF/CNPJ) y pg_phone son Required para este método de pago
Lottery lottery pg_personalid (CPF/CNPJ) y pg_phone son Required para este método de pago
PicPay picpay pg_personalid (CPF/CNPJ) y pg_phone son Required para este método de pago
Pix pix pg_personalid (CPF/CNPJ) y pg_phone son Required para este método de pago
Santander santander pg_personalid (CPF/CNPJ) y pg_phone son Required para este método de pago
Mercadopago mercadopago_br pg_personalid (CPF/CNPJ) is required for this payment method
Chile
Webpay webpay
Multicaja multicaja
MACH mach
Khipu khipu
Colombia
Efecty efecty pg_address y pg_city son Required para este método de pago
PSE pse pg_address y pg_city son Required para este método de pago
Bancolombia bancolombia
Apostar apostar
Puntored puntored pg_address y pg_city son Required para este método de pago
Susuerte susuerte
Su Red sured
Gana gana
Exito efecty pg_address y pg_city son Required para este método de pago
Moviired moviired pg_address y pg_city son Required para este método de pago
México
Banamex banamex
Bancomer bancomer
Mastercard Débito debmaster
Visa Débito debvisa
OXXO oxxo
Santander santander
Perú
Pago Efectivo pagoefectivo pg_phone is required for this payment method