Endpoints
Última actualización
¿Te fue útil?
Última actualización
¿Te fue útil?
Learn how to automate your reconciliation tasks by integrating our Reconciliation API endpoint.
Once your account is ready to use the Merchant API, the first step will be to authenticate. This authentication process requires sending a POST request to the login endpoint. Mentioned below. This request must include the access key (email) and secret key (password) in JSON format to validate and establish the user's credentials.
POST
https://merchants-api-stg.tupayonline.com/v1/auth/login
Staging
Producción
accessKey*
string
Configured API user email address
secretKey*
string
Password of the configured API user
The response will include a header field called Set-Cookie. This particular field will carry a cookie labeled BEARER_TOKEN which must be sent back to the server in all subsequent requests to stay logged in.
Example of cookie in header with value BEARER_TOKEN:
The endpoints for each type of transaction are described below.
To send requests, be sure to include the BEARER_TOKEN obtained from the login endpoint in the authentication header field of the requests. You can use it in the following ways:
As part of the header:
Or as a cookie:
There are certain parameters that you can send in the GET request. These parameters come in name-value pairs known as name-value. They are added to the URL after a “?” sign, and multiple parameters can be used, separated by an “&” sign. The name and value are always separated by an “=” sign.
The syntax is as follows (examples):
Staging
Production
A basic answer has the following format:
The data field is an array that will contain multiple JSON objects, one for each transaction. Each one with its own details.
The response from these endpoints can display a maximum of 50 records per page. In case there are more than 50 records, you will need to request the next page using the page parameter in the GET request. Always start with page = 0.
The rows field indicates how many transactions the request returned.
The maxRows field shows the maximum transactions a request can retrieve. In case the "rows" is equal to "maxRows", you should do another request specifying the page plus one. Repeat this until the rows value is lesser than the maxRows one.
Staging https://merchants-api-stg.tupayonline.com/v1/deposits
Production https://merchants-api.tupayonline.com/v1/deposits
from
integer
Transaction creation date range in format
paymentMethod
string
(max legth: 2)
Payment method code. (XA/XAQR)
country
string
(PE)
Country code
page
integer
The page number. Each page contains as many transactions as indicated by the maxRows value.
to
integer
Transaction creation date range in format
clienteDocument
String
The client document.
status
Transaction status values: PENDING APPROVED COMPLETED CANCELLED DECLINED
Content-Type
String
application/json
Cookie
String
BEARER_TOKEN=U3dcUx8IRJ5nLjb0WYM4cHa3qHFqnrqAk
Authorization
String
BEARER_TOKEN=U3dcUx8IRJ5nLjb0WYM4cHa3qHFqnrqAk
Staging https://merchants-api-stg.tupayonline.com/v1/cashout
Producción https://merchants-api.tupayonline.com/v1/cashout
from
integer
Transaction creation date range in format
paymentMethod
string
(max legth: 2)
Payment method code.(XA/XAQR)
country
string
(PE)
Country code
page
integer
The page number. Each page contains as many transactions as indicated by the maxRows value.
to
integer
Transaction creation date range in format
clienteDocument
string
The client document.
status
string
Transaction status values:
ON_HOLD PENDING DELIVERED COMPLETED REJECTED CANCELLED DECLINED
Content-Type
String
application/json
Cookie
String
BEARER_TOKEN=U3dcUx8IRJ5nLjb0WYM4cHa3qHFqnrqAk
Authorization
String
BEARER_TOKEN=U3dcUx8IRJ5nLjb0WYM4cHa3qHFqnrqAk
This endpoint allows you to retrieve the details of your daily Balance Report in a given time.
Staging GET https://merchants-api-stg.tupayonline.com/v1/balance/report
Production GET https://merchants-api.tupayonline.com/v1/balance/report
Query Parameters
from
string
to
string
page
string
The page number. Each page contains as many transactions as indicated in the maxRows value.
This endpoint allows you to retrieve the details of your Total Available Balance.
Staging: GET https://merchants-api-stg.tupayonline.com/v1/balance
Production: GET https://merchants-api-stg.tupayonline.com/v1/balance
DELETE
https://merchants-api-stg.tupayonline.com/v1/auth/session/destroy
Cookie*
string
BEARER_TOKEN=U3dcUx8IRJ5nLjb0WYM4cHa3qHFqnrqAk
Please see this for more information about cookies.
The "from" and "to" values follow the format, allowing a maximum difference of up to 60 days between them. The "from" value cannot exceed the "to" value.
maximum difference with value "from" 60 days.
maximum difference with value "from" 60 days.
Transaction creation date interval in format.
Transaction creation date interval in format - max difference with "from" value 60 days.
Staging
Producción
Once the token is invalidated, you will need to again before sending a new request.