Listar cobranças
curl --request GET \
--url https://api.malga.io/v1/charges \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>'import requests
url = "https://api.malga.io/v1/charges"
headers = {
"X-Client-Id": "<api-key>",
"X-Api-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Client-Id': '<api-key>', 'X-Api-Key': '<api-key>'}};
fetch('https://api.malga.io/v1/charges', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.malga.io/v1/charges",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>",
"X-Client-Id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.malga.io/v1/charges"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-Id", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.malga.io/v1/charges")
.header("X-Client-Id", "<api-key>")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.malga.io/v1/charges")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Client-Id"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"meta": {
"itemCount": 10,
"totalItems": 20,
"itemsPerPage": 10,
"totalPages": 5,
"currentPage": 2
},
"items": [
{
"id": "148d5db0-f1c3-439f-902d-f1f268086e1d",
"customerId": "82aba896-9e37-45b6-aa90-d510c9050596",
"clientId": "cc0b1e41-2936-45c5-947f-93995ffcdc00",
"createdAt": "2012-06-30 23:59:59 +0000",
"amount": 150,
"currency": "BRL",
"statementDescriptor": "LOJA JOAO",
"description": "Descrição longa da cobrança",
"capture": false,
"isDispute": false,
"orderId": "32c68ff7-902c-408b-b464-cf487c7cda97",
"paymentMethod": {
"paymentType": "credit",
"installments": 1
},
"paymentSource": {
"sourceType": "card",
"cardId": "148d5db0-f1c3-439f-902d-f1f268086e1d"
},
"transactionRequests": [
{
"id": "78601913-a176-4d71-b7e8-abb6fc49a340",
"idempotencyKey": "fafe857b176e45d6b12e32fcaf228996",
"providerId": "2c3b57d8-ee43-4b19-bc8a-949a88c51df1",
"providerType": "STRIPE",
"transactionId": "ch_3JYE7MHjGFBGEeiP0lfTD3Ob",
"amount": 1500,
"authorizationNsu": "1cc8391c-f0d5-4b7a-9fcf-653cea26be13",
"requestStatus": "success",
"requestType": "authorization",
"responseTs": "2633ms",
"createdAt": "2021-08-12T16:08:39.536Z",
"updatedAt": "2021-08-12T16:08:42.212Z",
"providerAuthorization": {
"networkAuthorizationCode": "00",
"networkResponseCode": ""
}
}
],
"appInfo": {
"platform": {
"integrator": "malga",
"name": "pluging-vtex-ppp",
"version": "1.12"
},
"device": {
"name": "iOS",
"version": "10.12"
},
"system": {
"name": "VTEX",
"version": "13.12"
}
}
}
]
}{
"error": {
"code": 123,
"declinedCode": "<string>",
"key": "<string>",
"businessCode": "<string>",
"message": "<string>",
"details": "<array>"
}
}{
"error": {
"code": 123,
"declinedCode": "<string>",
"key": "<string>",
"businessCode": "<string>",
"message": "<string>",
"details": "<array>"
}
}Charges
Listar cobranças
GET
/
v1
/
charges
Listar cobranças
curl --request GET \
--url https://api.malga.io/v1/charges \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>'import requests
url = "https://api.malga.io/v1/charges"
headers = {
"X-Client-Id": "<api-key>",
"X-Api-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Client-Id': '<api-key>', 'X-Api-Key': '<api-key>'}};
fetch('https://api.malga.io/v1/charges', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.malga.io/v1/charges",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>",
"X-Client-Id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.malga.io/v1/charges"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-Id", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.malga.io/v1/charges")
.header("X-Client-Id", "<api-key>")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.malga.io/v1/charges")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Client-Id"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"meta": {
"itemCount": 10,
"totalItems": 20,
"itemsPerPage": 10,
"totalPages": 5,
"currentPage": 2
},
"items": [
{
"id": "148d5db0-f1c3-439f-902d-f1f268086e1d",
"customerId": "82aba896-9e37-45b6-aa90-d510c9050596",
"clientId": "cc0b1e41-2936-45c5-947f-93995ffcdc00",
"createdAt": "2012-06-30 23:59:59 +0000",
"amount": 150,
"currency": "BRL",
"statementDescriptor": "LOJA JOAO",
"description": "Descrição longa da cobrança",
"capture": false,
"isDispute": false,
"orderId": "32c68ff7-902c-408b-b464-cf487c7cda97",
"paymentMethod": {
"paymentType": "credit",
"installments": 1
},
"paymentSource": {
"sourceType": "card",
"cardId": "148d5db0-f1c3-439f-902d-f1f268086e1d"
},
"transactionRequests": [
{
"id": "78601913-a176-4d71-b7e8-abb6fc49a340",
"idempotencyKey": "fafe857b176e45d6b12e32fcaf228996",
"providerId": "2c3b57d8-ee43-4b19-bc8a-949a88c51df1",
"providerType": "STRIPE",
"transactionId": "ch_3JYE7MHjGFBGEeiP0lfTD3Ob",
"amount": 1500,
"authorizationNsu": "1cc8391c-f0d5-4b7a-9fcf-653cea26be13",
"requestStatus": "success",
"requestType": "authorization",
"responseTs": "2633ms",
"createdAt": "2021-08-12T16:08:39.536Z",
"updatedAt": "2021-08-12T16:08:42.212Z",
"providerAuthorization": {
"networkAuthorizationCode": "00",
"networkResponseCode": ""
}
}
],
"appInfo": {
"platform": {
"integrator": "malga",
"name": "pluging-vtex-ppp",
"version": "1.12"
},
"device": {
"name": "iOS",
"version": "10.12"
},
"system": {
"name": "VTEX",
"version": "13.12"
}
}
}
]
}{
"error": {
"code": 123,
"declinedCode": "<string>",
"key": "<string>",
"businessCode": "<string>",
"message": "<string>",
"details": "<array>"
}
}{
"error": {
"code": 123,
"declinedCode": "<string>",
"key": "<string>",
"businessCode": "<string>",
"message": "<string>",
"details": "<array>"
}
}Query Parameters
Número da página ativa
Quantidade de registros por página 1-100
Tipo de ordenação decrescente ou crescente
Available options:
ASC, DESC Id do merchant processado na cobrança
Id da cobrança
Id da sessão vinculada à cobrança
Valor em centavos da cobrança
Status da cobrança
Available options:
pending, pre_authorized, authorized, voided, refund_pending, canceled, charged_back, capture_pending Tipo de pagamento
Available options:
credit, pix, boleto Id da cobrança gerado pelo cliente
Registros criados em uma data específica
Registros com data maior que
Registros com data menor que
Was this page helpful?
⌘I