Operations
OperationsGet
https://sandbox-api.srpago.com/v1/operations
Returns a list of operations
headers
AuthorizationBasic
Content-Typeapplication/json
PATH VARIABLES
start_date(YYYY-MM-DD)
end_date(YYYY-MM-DD)
limit(int)
offset(int)
card_typeVISA, MAST, AMEX, CRNT
operator[email protected]
charge_methodCARD, SPE
Example Request
curl --location --request GET "https://sandbox-api.srpago.com/v1/operations" \ --header "Content-Type: application/json" --header "Authorization: Basic"
var settings = {
"url": "https://sandbox-api.srpago.com/v1/operations",
"method": "GET",
"timeout": 0,
"headers": {
"Content-Type": "application/json",
"Authorization": "Basic "
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
require "uri"
require "net/http"
url = URI("https://sandbox-api.srpago.com/v1/operations")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic "
response = http.request(request)
puts response.read_body
import requests
url = 'https://sandbox-api.srpago.com/v1/operations'
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic '
}
response = requests.request('GET', url, headers = headers, data = payload, allow_redirects=False, timeout=undefined, allow_redirects=false)
print(response.text)
var https = require('https');
var options = {
'method': 'GET',
'hostname': 'https://sandbox-api.srpago.com',
'path': '/v1/operations',
'headers': {
'Content-Type': 'application/json',
'Authorization': 'Basic '
}
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
req.end();
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://sandbox-api.srpago.com/v1/operations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => false,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"Authorization: Basic "
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"os"
"path/filepath"
"net/http"
"io/ioutil"
)
func main() {
url := "https://sandbox-api.srpago.com/v1/operations"
method := "GET"
client := &http.Client {
CheckRedirect: func(req *http.Request, via []*http.Request) error {
return http.ErrUseLastResponse
},
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Basic ")
res, err := client.Do(req)
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
Example Response
{
"success": true,
"result": {
"total": 842,
"sales": "707305.04",
"transferences": "401.49",
"commissions": {
"amount": 162.54,
"currency": "MXN"
},
"operations": [
{
"transaction": "MjY2MzYyNQ==",
"timestamp": "2018-10-25T12:48:37-05:00",
"payment_method": "OXX",
"authorization_code": "4174B14B",
"status": "N",
"reference": {
"description": "-"
},
"card": {
"holder_name": "Banco pruebas",
"type": "OXXO",
"number": "0000",
"label": "",
"raw": "0000"
},
"total": {
"amount": "100.00",
"currency": "MXN"
},
"tip": {
"amount": "0.00",
"currency": "MXN"
},
"fee": {
"amount": "54.18",
"currency": "MXN"
},
"fee_details": [
{
"type": "fee",
"percentage": 3.6,
"amount": 4.18,
"description": ""
},
{
"type": "application_fee",
"percentage": 20,
"amount": 20,
"description": "CONTRACARGO DE 50mil"
},
{
"type": "application_fee",
"percentage": 30,
"amount": 30,
"description": "FINANCIAMIENTO 2"
}
],
"origin": {
"location": {
"latitude": "0.000000",
"longitude": "0.000000"
}
},
"affiliation": "0",
"url": "https://sandbox-connect.srpago.com/recipe/OTUzYjg4MmUtYzYyNS00YTEzLTg3NjQtOGRmZWY3N",
"hasDevolution": false,
"commission": {
"amount": "54.18",
"currency": "MXN"
}
},
{
"transaction": "MjY2MzYyNA==",
"timestamp": "2018-10-25T12:32:15-05:00",
"payment_method": "OXX",
"authorization_code": "417478AD",
"status": "N",
"reference": {
"description": "-"
},
"card": {
"holder_name": "Banco pruebas",
"type": "OXXO",
"number": "0000",
"label": "",
"raw": "0000"
},
"total": {
"amount": "100.00",
"currency": "MXN"
},
"tip": {
"amount": "0.00",
"currency": "MXN"
},
"fee": {
"amount": "54.18",
"currency": "MXN"
},
"fee_details": [
{
"type": "fee",
"percentage": 3.6,
"amount": 4.18,
"description": ""
},
{
"type": "application_fee",
"percentage": 20,
"amount": 20,
"description": "CONTRACARGO DE 50mil"
},
{
"type": "application_fee",
"percentage": 30,
"amount": 30,
"description": "FINANCIAMIENTO 2"
}
],
"origin": {
"location": {
"latitude": "0.000000",
"longitude": "0.000000"
}
},
"affiliation": "0",
"url": "https://sandbox-connect.srpago.com/recipe/ZDE4MTY3MDgtZjgxOC00ZmY1LTlkOGUtYTI1MDcwZGZhZjVl",
"hasDevolution": false,
"commission": {
"amount": "54.18",
"currency": "MXN"
}
}
]
}
}