You are on page 1of 18

Implementation Guide

v2.1 – Jan 2016


1. Confidentiality....................................................................................................................3

2. Communication Security..........................................................................................4

3. Sandbox/Testing Environment...........................................................................5

4. Avaiable Methods..........................................................................................................6

4.1 Generate an ATM reference Multibanco ...........................7

4.2 Generate a Payshop reference .................................................8

4.3 Generate a Payshop reference .................................................9

4.4 Generate MB WAY Request …...................................................12

4.5 Know more information about a reference ...................14

5. Status Code......................................................................................................................16

6. Callback in Real Time...............................................................................................17

7. Additional Information..............................................................................................18

Pág. 2 euPago – Instituição de Pagamento, Lda.


Rua do Paraíso, 260 4000-376 Porto – Portugal | NIPC: 513212744 | Capital Social € 90.000,00 (noventa mil euros)
Instituição acreditada e supervisionada pelo Banco de Portugal.
1 . Confidentiality
By proceeding, you hereby acknowledg e that all the information contained herein constitutes valuable
property and trade secrets of euPago, which are strictly confidential.

You agree that you shall not directly or indirectly:

1. Use or permit the use of this document for, or in connection with, any other business whatsoever, or
for any purpose other than the analysis of the project contemplated hereby, or

2. Disclose or permit the disclosure of any part of this document to any person or entity other than
office rs, shareholders or representatives of your same organization who are made aware of the
confidential nature of this document and the restrictions on the disclosure or use of its contents and for
the purpose stated.

Lastly, you agree to immediately notify euPago of the circumstances surrounding any breach of this
confidentiality of which you become aware.

THIS DOCUMENT CONSTITUTES INTELLECTUAL PROPERTY OF euPago.

euPago – Instituição de Pagamento, Lda. Pág. 3


Rua do Paraíso, 260 1º 4000-376 Porto – Portugal | NIPC: 513212744 | Capital Social € 90.000,00
Instituição acreditada e supervisionada pelo Banco de Portugal.
2 . Communication Security
To ensure communication safety and message integrity, euPago platform has been enhanced with a
wide range of standard and proprietary security measures. Some of the measures are listed below:

API Permission system. Partners may only use the API functions they need in accordance with their
contract with euPago. No unauthorized API calls are allowed and all calls are logged.

SSL-protected communications: Electronic communications are performed via an SSL-protected


channel.

Pág. 4 euPago – Instituição de Pagamento, Lda.


Rua do Paraíso, 260 4000-376 Porto – Portugal | NIPC: 513212744 | Capital Social € 90.000,00 (noventa mil euros)
Instituição acreditada e supervisionada pelo Banco de Portugal.
3. Sandbox/Testing Environment
Before moving any euPago-based application/web site into production, you should test the application
in the Sandbox to ensure that it functions as you intend . To get access to the "sandbox", credentials are
require: A security key that can be asked to our services through our website: http://www.eupago.pt,
or via email: geral@eupago.pt

The sandbox is available at:

https://replica.eupago.pt/clientes/users/login

euPago – Instituição de Pagamento, Lda. Pág. 5


Rua do Paraíso, 260 1º 4000-376 Porto – Portugal | NIPC: 513212744 | Capital Social € 90.000,00
Instituição acreditada e supervisionada pelo Banco de Portugal.
4.Avaiable Methods:

4.1 Generate an ATM reference - Multibanco

Method name: gerarReferenciaMB


Description: Method to generate ATM reference´s

INPUT PARAMETERS:

PARAMETER DESCRIPTION TYPE

chave API Key Channel,given by euPago. string

valor The value of the Multibanco refe- float


rence.
id Unique identifier of an order crea- string
ted by the user.

campos_extra Additional information to associate string


the extra fields.

OUTPUT PARAMETERS:

PARAMETER DESCRIPTION TYPE

entidade Entity for payment. string


referencia Reference generated for ATM string
payment.

valor The value of the Multibanco refe- float


rence.
estado API response code. Int

resposta Descriptive message about the string


code that comes in the state.

Pág. 6 euPago – Instituição de Pagamento, Lda.


Rua do Paraíso, 260 4000-376 Porto – Portugal | NIPC: 513212744 | Capital Social € 90.000,00 (noventa mil euros)
Instituição acreditada e supervisionada pelo Banco de Portugal.
/*********** Example of the method gerarReferenciaMB ***************/

function geraReferenciaMB($chave_api, $nota_de_encomenda, $valor_da_encomenda) {

$client = @new SoapClient('https://seguro.eupago.pt/eupagov1.wsdl'); // SOAP


service

$arraydados = array("chave" => $chave_api, "valor" => $valor_da_encomenda, "id"


=> $nota_de_encomenda);//each channel have an API key

$result = $client->gerarReferenciaMB($arraydados);

// Check the errors and show the output

if (is_soap_fault($result)) {

//trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring:


{$result->faulstring})", E_ERROR);

} else {

if ($result->estado == 0) { // 0 sucess -10. Invalid Key. -9 Incorrects


values

return $result; // return 3 values: entity, reference and value

} else {

//insucess action

/***********End of gerarReferenciaMB ***************/

euPago – Instituição de Pagamento, Lda. Pág. 7


Rua do Paraíso, 260 1º 4000-376 Porto – Portugal | NIPC: 513212744 | Capital Social € 90.000,00
Instituição acreditada e supervisionada pelo Banco de Portugal.
4.2 Generate an Payshop reference

Method name: gerarReferenciaPS


Description: Method to generate Payshopreference´s

INPUT PARAMETERS:

PARAMETER DESCRIPTION TYPE

chave API Key Channel,given by euPago. string

valor The value of the Payshop referen- float


ce.
id Unique identifier of an order crea- string
ted by the user.

campos_extra Additional information to associate string


the extra fields.

OUTPUT PARAMETERS:

PARAMETER DESCRIPTION TYPE

referencia Reference generated for Payhsop string


payment.
valor The value of the Payshop referen- float
ce.
estado API response code. Int

resposta Descriptive message about the string


code that comes in the state.

Pág. 8 euPago – Instituição de Pagamento, Lda.


Rua do Paraíso, 260 4000-376 Porto – Portugal | NIPC: 513212744 | Capital Social € 90.000,00 (noventa mil euros)
Instituição acreditada e supervisionada pelo Banco de Portugal.
/*********** Example of the method gerarReferenciaPS ***************/

function geraReferenciaPS($chave_api, $nota_de_encomenda, $valor_da_encomenda) {

$client = @new SoapClient('https://seguro.eupago.pt/eupagov1.wsdl'); // SOAP


service

$arraydados = array("chave" => $chave_api, "valor" => $valor_da_encomenda, "id"


=> $nota_de_encomenda);//each channel have an API key

$result = $client->gerarReferenciaMB($arraydados);

// Check the errors and show the output

if (is_soap_fault($result)) {

//trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring:


{$result->faulstring})", E_ERROR);

} else {

if ($result->estado == 0) { // 0 sucess -10. Invalid Key. -9 Incorrects


values

return $result; // return 2 values: reference and value

} else {

//insucess action

/***********End of gerarReferenciaPS***************/

euPago – Instituição de Pagamento, Lda. Pág. 9


Rua do Paraíso, 260 1º 4000-376 Porto – Portugal | NIPC: 513212744 | Capital Social € 90.000,00
Instituição acreditada e supervisionada pelo Banco de Portugal.
4.3 Generate an Pagaqui reference

Method name: gerarReferenciaPQ


Description: Method to generate Pagaquireference´s

INPUT PARAMETERS:

PARAMETER DESCRIPTION TIYPE

chave API Key Channel,given by euPago. string


valor The value of the Pagaqui reference. float
id Unique identifier of an order created by the user. string
campos_extra Additional information to associate the extra fields. string

OUTPUT PARAMETERS:

PARAMETER DESCRIPTION TIYPE

referencia Reference generated for Pagaqui payment. string

valor The value of the Pagaqui reference. float

estado API response code. int

resposta Descriptive message about the code that comes in string


the state.

Pág. 10 euPago – Instituição de Pagamento, Lda.


Rua do Paraíso, 260 4000-376 Porto – Portugal | NIPC: 513212744 | Capital Social € 90.000,00 (noventa mil euros)
Instituição acreditada e supervisionada pelo Banco de Portugal.
/*********** Example of the method gerarReferenciaPQ in php ***************/

function geraReferenciaPQ($chave_api, $nota_de_encomenda, $valor_da_encomenda) {

$client = @new SoapClient('https://seguro.eupago.pt/eupagov3.wsdl'); // SOAP service


production

//$client = @new SoapClient('http://replica.eupago.pt/replica.eupagov3.wsdl'); // SOAP service


- sandbox

$arraydados = array("chave" => $chave_api, "valor" => $valor_da_encomenda, "id" =>


$nota_de_encomenda);//each channel have an API key

$result = $client->gerarReferenciaPQ($arraydados);

// Check the errors and show the output

if (is_soap_fault($result)) {

//trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result-


>faulstring})", E_ERROR);

} else {

if ($result->estado == 0) { //posssible states: 0 sucess. -10 Invalid key. -9


Incorrect values

//put the success of action

return $result; // returns 3 values: entity, reference and value

} else {

//insucess action

/*********** End of gerarReferenciaPQ ***************/

euPago – Instituição de Pagamento, Lda. Pág. 11


Rua do Paraíso, 260 1º 4000-376 Porto – Portugal | NIPC: 513212744 | Capital Social € 90.000,00
Instituição acreditada e supervisionada pelo Banco de Portugal.
4.4 MB WAY REQUEST

Method name: MBWrequest


Description: Method to generate MB WAY request

INPUT PARAMETERS:

PARAMETER DESCRIPTION TYPE

chave API Key Channel,given by euPago. string


valor The value of the MB WAY reference. float
id Unique identifier of an order created by the user. string
campos_extra Additional information to associate the extra fields. string
alias Previously associated mobile number associated with the MB WAY string
service

OUTPUT PARAMETERS:

PARAMETER DESCRIPTION TYPE

referencia Reference generated for MB WAY payment. string

valor The value of the MB WAY reference. float

estado API response code.. int

resposta Descriptive message about the code that comes in string


the state.
alias Previously associated mobile number associated with the string
MB WAY service

Pág. 12 euPago – Instituição de Pagamento, Lda.


Rua do Paraíso, 260 4000-376 Porto – Portugal | NIPC: 513212744 | Capital Social € 90.000,00 (noventa mil euros)
Instituição acreditada e supervisionada pelo Banco de Portugal.
/*********** Example of the method pedidoMBW in php ***************/

function pedidoMBW($chave_api, $nota_de_encomenda, $valor_da_encomenda,$alias) {

$client = @new SoapClient('https://seguro.eupago.pt/eupagov3.wsdl'); // SOAP service -


production

//$client = @new SoapClient('http://replica.eupago.pt/replica.eupagov3.wsdl'); // SOAP service


- sandbox

$arraydados = array("chave" => $chave_api, "valor" => $valor_da_encomenda, "id" =>


$nota_de_encomenda,"alias"=>$alias);//each channel have an API key

$result = $client->pedidoMBW($arraydados);

// Check the errors and show the output

if (is_soap_fault($result)) {

//trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result-


>faulstring})", E_ERROR);

} else {

if ($result->estado == 0) { //possible states: 0 sucess. -10 Invalid key. -9 Incorrect


values

//put the success of action

return $result; // returns 3 values: entity, reference and value

} else {

//insucess action

/*********** End of pedidoMBW *******************

euPago – Instituição de Pagamento, Lda. Pág. 13


Rua do Paraíso, 260 1º 4000-376 Porto – Portugal | NIPC: 513212744 | Capital Social € 90.000,00
Instituição acreditada e supervisionada pelo Banco de Portugal.
4.5 Get Informations about a reference

Method name: informacaoReferencia


Description: Knowing the status and other information available for a reference.

INPUT PARAMETERS:

PARAMETER DESCRIPTION TYPE

chave API Key Channel, given by euPago. string


referencia Multibanco, Payshop Pagaqui or MB WAY reference. string

PARAMETROS DE SAÍDA:

PARAMETER DESCRIPTION TYPE

data_pagamento Payment date (if any) of a reference date

hora_pagamento Time of payment (if any) of a reference date

local_pagamento Place of payment (if any) of a reference string

data_previsao_transferencia Scheduled date for payment (if any) string

valor Reference value creating machine float

comissao Value of commission charged by euPago float

estado_referencia State in which a reference is string


estado Code API response on the action performed int

resposta Descriptive message about the code that comes in string


the state

Pág. 14 euPago – Instituição de Pagamento, Lda.


Rua do Paraíso, 260 4000-376 Porto – Portugal | NIPC: 513212744 | Capital Social € 90.000,00 (noventa mil euros)
Instituição acreditada e supervisionada pelo Banco de Portugal.
/*********** Example os informacaoReferencia php ***************/

function informacao($chave_api, $ref) {

$client = @new SoapClient('https://seguro.eupago.pt/eupagov1.wsdl');

$arraydados = array("chave" => $chave_api, "referencia" => $ref);

$result = $client->informacaoReferencia($arraydados);

if (is_soap_fault($result)) {

trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result-


>faulstring})", E_ERROR);

} else {

if ($result->estado == 0) { //possible states: 0 sucess. -10Invalid Key. -9 Incorrect


Value

return $result;

} else {

switch ($result->estado) {

case -10:

echo "Invalid key";

exit;

case -9:

echo "Incorrect Values ";

exit;

case -8:

echo "Invalid Reference";

exit;

default :

echo ‘Unknow Error’;

exit;

/*********** End of informacaoReferencia ***************/

euPago – Instituição de Pagamento, Lda. Pág. 15


Rua do Paraíso, 260 1º 4000-376 Porto – Portugal | NIPC: 513212744 | Capital Social € 90.000,00
Instituição acreditada e supervisionada pelo Banco de Portugal.
5 .Status table:

5.1 References

Status Description

Pendente The reference was generated and is waiting to be paid by the customer.
Paga The reference is paid by your client, but not yet transferred to your bank account.
Transferida The reference is paid by your client, and the amount transferred to your bank account.

5.2 API responses

Code Description

0 Sucess

-8 Invalid reference

-9 Incorrect Values

-10 Incorrect key

Pág. 16 euPago – Instituição de Pagamento, Lda.


Rua do Paraíso, 260 4000-376 Porto – Portugal | NIPC: 513212744 | Capital Social € 90.000,00 (noventa mil euros)
Instituição acreditada e supervisionada pelo Banco de Portugal.
6 .Callback in Real Time
In addition to the email notification, we also sent a notification to a URL provided by our client. To that
notification we call it the "callback", and this method allows your web applications know in real time when
your reference was paid.

EXAMPLE:

https://url_do_cliente/callback.php?
valor=6&canal=nome_do_canal&referencia=xxxxxxxx&transacao=xxxx&identificador=xxxxx&mp=PC:PT&chave_api=xxxx-
xxx-ttt-ttta&data=yyyy-mm-dd:hh:mm&entidade=xxxx&comissao=xxx&local=PORTO

VARIABLE DESCRIPTION

valor receives the monetary value associated with the reference

canal receives the channel identification

referência receives the reference

transacao receives the transaction identifier

Identificador receives the order identifier

mp gets the type of transaction **

chave_api receives euPago API key

data receives the date to which the reference was paid

hora receive the honor to which reference has been paid

entidade receiving entity

comissao Receives euPago amount of commission

local receives the place where the reference was paid

**Possible mp variable values: PC:PT -> multibanco


PS:PT -> payshop
MW:PT -> mbway
PQ:PT -> pagaqui

euPago – Instituição de Pagamento, Lda. Pág. 17


Rua do Paraíso, 260 1º 4000-376 Porto – Portugal | NIPC: 513212744 | Capital Social € 90.000,00
Instituição acreditada e supervisionada pelo Banco de Portugal.
6 . Additional Information
Questions or more information, please contact us by e-mail: geral@eupago.pt.

Address: Rua do Paraíso 260


4000-376 Porto Portugal
Tel: 222 061 597
Email: geral@eupago.pt
Website: http://www.eupago.pt

Pág. 18 euPago – Instituição de Pagamento, Lda.


Rua do Paraíso, 260 4000-376 Porto – Portugal | NIPC: 513212744 | Capital Social € 90.000,00 (noventa mil euros)
Instituição acreditada e supervisionada pelo Banco de Portugal.

You might also like