![]() |
Start here |
![]() |
Configuration |
![]() |
WSPG |
![]() |
APIPG |
![]() |
Webhooks |
![]() |
Charts |
![]() |
Example |
![]() |
Downloads |
![]() |
SandBox |
![]() |
WSPG - Web Service Pagadito |
![]() |
Start here |
![]() |
Configuration |
![]() |
WSPG |
![]() |
APIPG |
![]() |
Webhooks |
![]() |
Charts |
![]() |
Example |
![]() |
Downloads |
![]() |
SandBox |
Pagadito offers its WSPG, a web service that Pagadito Merchants will be able to consume from its platforms and use as a payment method.
Pagadito allows Pagadito Merchants to make payments quickly and safely through its payment platform. The technology developed in Pagadito enables communication with multiple platforms synchronously, through safe, unique, and authorized connections.
The communication mechanism works in such a way that Pagadito Merchant connects to the web service WSPG and this in turn with Pagadito. WSPG works as an intermediary between systems. Pagadito is in charge of carrying out the transactions, thus securing the data of both the buyer user and Pagadito Merchant. Once the payment is completed, the control is returned to Pagadito Merchant.
When performing tests in the SandBox, the Developers must connect to the WSPG, pointing to the Connection URL https://sandbox.pagadito.com/comercios/wspg/charges.php
Pagadito Merchants in production phase, must connect to WSPG, pointing to Connection URL https://comercios.pagadito.com/wspg/charges.php
All operations return data in a structure defined below in a coded format defined in the requests:
A request in JSON format is presented as follows:
{"code":"PG1001","message":"Connection successful.","value":"5140aebdd0dddf14795c7d69438f2aac"}
After decoding, it is presented as follows:
stdClass Object ( [code] => PG1001 [message] => Connection successful. [value] => 5140aebdd0dddf14795c7d69438f2aac [datetime] => 2011-11-08 12:01:56 )
A request in PHP format is presented as follows:
O:8:"stdClass":4:{s:4:"code";s:6:"PG1001";s:7:"message";s:22:"Connection successful.";s:5:"value";s:32:"5140aebdd0dddf14795c7d69438f2aac";s:6:";}
After decoding, it is presented as follows:
stdClass Object ( [code] => PG1001 [message] => Connection successful. [value] => 5140aebdd0dddf14795c7d69438f2aac [datetime] => 2011-11-08 12:01:56 )
A request in XML format is presented as follows:
<response> <code>PG1001</code> <message>Connection successful.</message> <value>5140aebdd0dddf14795c7d69438f2aac</value> <value>2011-11-08 12:01:56</value> </response>
The "code" index returns a unique code that identifies the type of WSPG response. The "message" index returns a message describing the response. In the index "value" a value is returned when the type of response requires it. The "datetime" index returns the date and time at which the WSPG responds.
code | message | value | datetime | Description |
---|---|---|---|---|
PG1001
|
Connection successful. | X | X | Successful Connection of Pagadito Merchant with WSPG. |
PG1002
|
Transaction register successful. | X | X | Transaction sent by Pagadito Merchant was registered successfully by WSPG. |
PG1003
|
Transaction status. | X | X | The transaction status request has been successfully processed. |
PG1004
|
Exchange Rate. | X | X | The Exchange Rate request has been successfully processed. |
PG1005
|
Transfer. | X | X | The transfer request has been successfully processed. |
PG1006
|
Authorization. | X | X | The authorization request has been successfully processed. |
PG1007
|
Get Authorization token. | X | X | The authorization token request has been successfully processed. |
PG1008
|
Authorization for Recurring Payments. | X | X | The Authorization for Recurring Payments request has been successfully processed. |
PG1009
|
Get Authorization token for Recurring payments. | X | X | The Authorization token for Recurring Payments request has been successfully processed. |
PG1010
|
Pending transaction status. | X | X | The Pending transaction status request has been successfully processed. |
PG1012
|
Recurring Payments. | X | X | The Recurring Payments request has been successfully processed. |
PG1014
|
Valid authorization token. | X | The Valid authorization token request has been successfully processed. | |
PG1017
|
Multiple transactions. | X | X | The Multiple transactions request has been successfully processed. |
PG1018
|
Multiple transactions status. | X | X | The Multiple transactions status request has been successfully processed. |
PG2001
|
Incomplete data. | X | Pagadito Merchant failed to send all the required parameters. | |
PG2002
|
Incorrect format data. | X | Data sent by Pagadito Merchant is not in the right format. | |
PG3001
|
Connection couldn't be established. | X | The connection credentials are not registered. | |
PG3002
|
We're sorry. An error has occurred. | X | An error not controlled by the WSPG occurred and the request could not be processed. | |
PG3003
|
Unregistered transaction. | X | The requested transaction has not been registered. | |
PG3004
|
Transaction amount doesn't match with calculated amount. | X | The sum of the product amount and the detail price is not equal to the amount of the transaction. | |
PG3005
|
Connection is disabled. | X | Pagadito Merchant has been validated, but the connection is disabled. | |
PG3006
|
Amount has exceeded the maximum. | X | The transaction has been denied because it exceeds the maximum amount per transaction. | |
PG3007
|
Denied access. | X | Access has been denied because the token is invalid. | |
PG3008
|
Currency not supported. | X | The requested currency is not supported by Pagadito. | |
PG3009
|
Amount is lower than the minimum allowed. | X | The transaction has been denied because the amount is lower than the minimum amount allowed. | |
PG3015
|
Incorrect authorization token. | X | The transaction has been denied because the authorization token is incorrect. | |
PG3018
|
You have already sent this ERN. | X | The transaction was denied because the ERN has already been sent. | |
PG3022
|
Amount of recurrent payments is higher than the maximum allowed. | X | The transaction has been denied because the amount of recurring payments is higher than the maximum allowed. | |
PG3024
|
Permissions not allowed. | X | The transaction has been denied because the permissions provided are not allowed. | |
PG3025
|
Cross-site scripting found on parameter. | X | The transaction has been denied because a malicious code was detected. |
WSPG contains the following operations:
Returns the connection token in case of successful validation of the UID and WSK credentials submitted.
Returns a string containing the Structure in the format defined in the format_return parameter. On success, WSPG returns a message code PG1001 and the token is in the "value" index of the returned structure. Otherwise, the returned message code may be: PG2001, PG3001, PG3002 or PG3005.
To see the complete list of WSPG response codes, messages, and descriptions, go to Response Listing.
Returns the URS to which Pagadito Merchant must redirect, after successfully processing the requested transaction, based on the parameters sent, in order for Pagadito to charge the buyer user.
array( array( "quantity" => 2, "description" => "Producto X", "price" => 1.50, "url_product" => "http://www.misitio.com/ver.php?id=12" ), array( "quantity" => 4, "description" => "Producto Y", "price" => 4.00, "url_product" => "http://www.misitio.com/ver.php?id=34" ), array( "quantity" => 3, "description" => "Producto Z", "price" => 0.75, "url_product" => "http://www.misitio.com/ver.php?id=67 ) )
<details> <detail> <quantity>2</quantity> <description>Producto X</description> <price>1.50</price> <url_product>http://www.misitio.com/ver.php?id=12</url_product> </detail> <detail> <quantity>4</quantity> <description>Producto Y</description> <price>4.00</price> <url_product>http://www.misitio.com/ver.php?id=34</url_product> </detail> <detail> <quantity>3</quantity> <description>Producto Z</description> <price>0.75</price> <url_product>http://www.misitio.com/ver.php?id=67</url_product> </detail> </details>
Array ( [param1] => Value of parameter 1 [param2] => Value of parameter 2 [param3] => Value of parameter 3 [param4] => Value of parameter 4 [param5] => Value of parameter 5 )A request in JSON format is presented as follows:
<custom_params> <param1>Value of parameter 1</param1> <param2>Value of parameter 2</param2> <param3>Value of parameter 3</param3> <param4>Value of parameter 4</param4> <param5>Value of parameter 5</param5> </custom_params>
Returns a string containing the Structure in the format defined in the format_return parameter. When successful, the WSPG returns a PG1002 message code and the url is in the "value" index of the returned structure. Otherwise, the message code returned may be: PG2001, PG2002, PG3002, PG3003, PG3004, PG3006, PG3007 or PG3008.
To see a complete listing of codes, messages and descriptions of WSPG responses go to Response Listing.
It returns the status of the transaction identified by the token_trans. In case it is finished, aside from the status it returns a transaction ID.
It returns a string containing the Structure in the format defined in the format_return parameter. In case of success, the WSPG returns a message code PG1003 and in the index "value" returns the following structure:
A request in JSON format is presented as follows:
stdClass Object ( [status] => COMPLETED [reference] => 7DFC8A49F5B87B8734F9E28B08456002 [date_trans] => 2011-11-08 12:03:11 )
A request in PHP format is presented as follows:
Array ( [status] => COMPLETED [reference] => 7DFC8A49F5B87B8734F9E28B08456002 [date_trans] => 2011-11-08 12:03:11 )
A request in XML format is presented as follows:
<status>COMPLETED</status> <reference>7DFC8A49F5B87B8734F9E28B08456002</reference> <date_trans>2011-11-08 12:03:11</date_trans>
The transaction status is in the "status" index. It may be as follows:
status | reference | date_trans | Description |
---|---|---|---|
REGISTERED | The transaction has been successfully registered in Pagadito but is still in process. At this point, the collection has not been made yet. | ||
COMPLETED | X | X | The transaction has been processed successfully in Pagadito. At this point the collection has already been made. |
VERIFYING | X | X | The transaction has been processed in Pagadito, but it has remained in a verification stage. At this point collection has received administrative validation. Subsequently, the transaction may be marked as valid or denied. Therefore, it should be monitored by this function until its status changes to COMPLETED or REVOKED. |
REVOKED | X | X | The transaction in VERIFYING status has been denied by Pagadito. At this point the charge has already been canceled. |
FAILED | The transaction has been correctly registered in Pagadito, but it could not be processed. At this point, the collection has not been made yet. | ||
CANCELED | The transaction has been canceled by the user in Pagadito, the transaction shows this status when the user clicks on the "return to commerce" link on the Pagadito payment screen. | ||
EXPIRED | The transaction has expired in Pagadito. The transaction has this status when the time to complete the transaction by the user in Pagadito has ended, the time to complete the transaction in Pagadito by the user is 10 minutes. Pagadito is also responsible for assigning an EXPIRED status to all transactions that were not complete, because the user unexpectedly left the payment process, for example by closing the browser window. |
In case of "COMPLETED" status, the transaction reference is in the "reference" index and the date and time it was processed in the "date_trans" index.
In case of unsuccessful processing of the request, the returned message code can be: PG2001, PG3002, PG3003 or PG3007.
To see the complete listing of WSPG response codes, messages, and descriptions, go to Response Listing.
Returns the exchange rate of the currency requested.
It returns a string that contains the structure in the format defined in the format_return parameter. In the event of success, WSPG returns a message code PG1004 and the exchange rate is in the "value" index of the returned structure. Otherwise, the message code returned may be: PG2001, PG3002, PG3007 or PG3008.
To see the full list of codes, messages, and descriptions of WSPG responses, go to Response Listing.