Did you know that...

Payphone allows you 0 cost, i.e., the same as cash.

What is Express Checkout?

If you want to receive payments on your website in a simple, fast and easy way, our Express Checkout allows you to do it, follow our tutorial and in a few minutes you will have your payment button active and functional.

Express Checkout is the fastest way to integrate the payment button Payphone, using HTML and Javascript code which allows you to receive Visa and Mastercard credit and debit card payments, as well as gift cards and balance Payphone from your customers using our app.

Express Checkout Flow

To receive payments with our gateway just follow these simple steps:

  1. Add our code to your website.
  2. Prepare the transaction to be paid, indicating amount, taxes, customer data, etc.
  3. Wait for the customer to make the payment on our platform.
  4. Consult the result of the transaction through our confirmation service.

Environment configuration

To implement the payment button you must meet certain requirements that we divide into two categories: Business Requirements and Development Requirements.

Business Requirements:

  • The establishment that is going to receive the payments must be registered in Payphone Business. To start the registration you can click here.
  • With the store active and ready to transact, you must create a "developer"type user, which we will explain later.

Development Requirements:

  • You must configure in our website for developers "Payphone Developer" your development environment where you can get all your authentication token with which you identify yourself in the services of Payphone.

Create developer user

Go to Payphone Business, and log in with your ruc, email and password, (if you do not have access, the company administrator can log in and create your user) and go to the "Users" section and then select "Create User":

Click on "Users" followed by "Create user".

Enter all the developer's data in the form, don't forget that in the "Roles" field you must enter "Developer". (The administrator must provide the e-mail address and password entered).

With this process ready, the user developer can start the implementation.

Payphone Developer

Configuring the development environment allows you to have full control over the transactions made through Payphone. Please follow the steps below:

1. Login as a developer

Go to https://appdeveloper.payphonetodoesposible.com/ and log in with your developer user credentials (Ruc, email and password).


2. Create Application Payphone:

The development applications Payphone allows you to configure your test environment, connection parameters or test users, and helps you to obtain your authentication credentials such as the token.

To create your application click on the "+" at the top. If you are upgrading your express checkout to a new version we recommend you to create a new application.

A form will open where you must enter the fields of your application, and complete mainly:

First you must fill in the informative data, if your platform is not shown you can select the one you like, remember that your type of application must be web WEB.

  • Web domain: The url of your website that will connect to the Payphone button. ONLY THE WEB DOMAIN HAS ACCESS TO THE PAYMENT BUTTON, if you do not open the Express checkout from your web domain, it will not give you access.
  • Response Url: This is the url where the transaction status will be notified.

Press Save

Obtain authentication token

With the application configured you must click the top menu on the credentials tab, and you will have the button to copy your token...

Prepare transaction

Integrating the button into your website is very simple, just add two scripts and an html tag to make the button appear.

  • The first script you must add in your file header and you must put your application identifier after "appID=". You can find the application identifier in the configuration of your application in the Payphone Developer page.

<script> srchttps://pay.payphonetodoesposible.com/api/button/js?appId=TUIDDEAPLICACION«></script>

  • The second script is the one that will allow you to control the actions of request and response of the button, you must insert it in the same way in the header:
        window.onload = function() {
            //token obtenido desde la consola de developer
            token: "TU-TOKEN-DE-AUTENTICACION",
            btnHorizontal: true,
            btnCard: true,

            createOrder: function(actions){
            //Se ingresan los datos de la transaccion ej. monto, impuestos, etc
            return actions.prepare({
                            amount: 100,
                            amountWithoutTax: 100,
                            currency: "USD",
                            clientTransactionId: "identificador-único",
                            return paramlog;
                            return paramlog2;

                    onComplete: function(model, actions){

Express Checkout Settings

In our Express Checkout you can configure graphical and behavioral aspects of the button:

  • btnHorizontal: If this parameter is set to true the button layout will be shown horizontally, if false it will be shown vertically.
  • btnCard: If this parameter is set to true, the Visa and Mastercard buttons will be displayed for direct payment without the need of the app Payphone.

Parameters in the request

You use the transaction data to detail the amounts to be charged, the currency, customer data and references you need to send for payment:

Name Description Data type Optional
Total value of the invoice receivable, is the sum of amountWithTax, amountWithoutTax, Tax, service and tip.
Value not taxed.
X - only if VAT is charged, it is mandatory if no VAT is charged
Taxable value, without tax included.
X - only if values are charged without VAT, mandatory if values are charged with VAT.
Value of the tax.
X - only if values are charged without VAT, mandatory if values are charged with VAT.
Value of the service.
Value of the tip.
Currency receivable /e.g. USD
Transaction identifier, you must generate it, it is a unique identifier.
This parameter can be obtained in the "Company Request" section of the PayPhone Developer page, in the list button.
Payment reference that you can send.
Customer's phone number, if you don't send it, the button will request it to the customer.
Customer's email, if you do not send it the button will request it to the customer.
Customer identification number, if you do not send it the button will request it to the customer.
  • The third element you must add is a DIV tag that you must place in the section where you want the payment button to appear.
					<div id="pp-button"></div>

The values to be charged are integers and must be multiplied by 100, for example $1 dollar = 100. Below you can see an example of charging $1 dollar with tax.

amount: 112,

tax: 12,

amountWithTax: 100,

To collect $1 dollar without taxes, the values would be as follows:

amount: 100,
amountWithoutTax: 100,

The payment button gives you certain response data so that you can process the result of the transaction and take action according to the result:

    • statusCode: Transaction status code. 2=Canceled.03=Approved.
    • transactionStatus: Trans action status.

With the statusCode and transactionStatus you can show your customer if the payment was approved or rejected. The rest of the parameters for reconciliation, transaction and authorization number we recommend you to manage them in your response URL.

With this configuration, your Express Checkout is ready and your customers can pay. You just need to configure your response URL.

Confirm transaction

To query the transaction status, you must create a file in your response URL (configured in your Payphone Developer page), this web is invoked by Payphone in a Server - Server call, sending the transaction ID and ClientTransactionID parameters. With those parameters you must call our CONFIRM web service to get the transaction response data.

The method confirms to the service Payphone that you received the response from the payment button and also queries the result of the transaction. You must make a POST call to the following address: https://pay.payphonetodoesposible.com/api/button/V2/Confirm with the ID and ClientTransactionID parameter. Do not forget to attach your authentication token in the header.

The response parameters you will receive are as follows:

Name Description
Transaction status code. 2=Canceled.03=Approved
Transaction status.
Transaction identifier that you sent in the request.
Bank authorization code.
Transaction identifier assigned by PayPhone.
The e-mail address used by the user for payment.
Telephone number used by the user for payment.
ID number used by the user for payment.
Total amount paid.
Type of card used, either credit or debit.
Card brand code.
Card brand.
First 6 digits of the card used.
Last digits of the card used.
Deferral code used by the user. Here you can learn more about deferrals.
Deferred message.
Boolean variable indicating whether a deferral was used or not.
In case of error, the error is displayed in this parameter. You can consult the error catalog by clicking here.
Message code.
Currency used for payment.
Optional parameter
If it exists, it gives you the reference sent to you

The following is an example of a PHP web service call:

"clientTxId"=&gt;$client );

$data = json_encode($data_array);

//Iniciar Llamada
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://pay.payphonetodoesposible.com/api/button/V2/Confirm");
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt_array($curl, array(
"Authorization: Bearer TU TOKEN DE AUTENTICACIÓN", "Content-Type:application/json"),
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($curl);

//En la variable result obtienes todos los parámetros de respuesta
echo $result;

That's it, if you have reached this point, congratulations, your integration is complete, in the next section we will tell you how to test and move to production.

Testing and production

As we have already told you in Payphone all the control is yours, and you are the one who decides how to run the tests and go to production. You don't need any certification process and you can publish yourself without any problem. Here we give you a guide.

Your application created on the Payphone Developer site has two pre-established environments which are "TESTING" and "PRODUCTION". When you enter the configuration of your application from our Developers site you can select the environment you need.

In testing all your transactions will be approved but no transactions will be connected to any bank processor, so you can use your cards and no charge will be made, or any valid Visa or Mastercard.

In production environment the behavior is the same, but if the bank connection is made, the transactions are already real and you have your payment button active.

With your application in production the process is complete, congratulations for integrating your Express Checkout.