Recuperar detalhes de cartão
curl --request GET \
--url https://api.malga.io/v1/cards/{id} \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>'const options = {method: 'GET', headers: {'X-Client-Id': '<api-key>', 'X-Api-Key': '<api-key>'}};
fetch('https://api.malga.io/v1/cards/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.malga.io/v1/cards/{id}"
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))
}{
"id": "a1d455eb-dafe-4a5c-b882-a5775422f850",
"status": "active",
"statusReason": null,
"createdAt": "2012-08-11T19:02:56.713Z",
"clientId": "d353deef-dacb-40a0-8cab-931ff773f274",
"brand": "Visa",
"cardHolderName": "JOAO DA SILVA",
"cvvChecked": true,
"fingerprint": "8db51cf0-c3c6-4081-b96a-a0e549a7ef6d",
"first6digits": "401959",
"last4digits": "9339",
"customerId": "5a1b4f91-2d70-402a-b45b-815928046433",
"expirationMonth": "12",
"expirationYear": "2026",
"transactionRequests": [
{
"id": "5325ecea-3009-41c3-9f3e-51b787ccdec8",
"createdAt": "2023-09-25T18:09:59.001Z",
"providerId": "ad520776-88c7-42fb-9159-fbff9bd3f187",
"providerType": "SANDBOX",
"requestStatus": "success",
"requestType": "zero_dollar",
"responseTs": "32ms"
}
]
}{
"error": {
"type": "api_error",
"code": 123,
"declinedCode": "<string>",
"declined_code": "<string>",
"key": "<string>",
"businessCode": "<string>",
"message": "<string>",
"details": "<array>"
}
}{
"error": {
"type": "failed_dependency",
"declinedCode": "<string>",
"message": "<string>",
"details": "<array>"
}
}{
"error": {
"type": "api_error",
"code": 123,
"declinedCode": "<string>",
"declined_code": "<string>",
"key": "<string>",
"businessCode": "<string>",
"message": "<string>",
"details": "<array>"
}
}Cards
Recuperar detalhes de cartão
GET
/
v1
/
cards
/
{id}
Recuperar detalhes de cartão
curl --request GET \
--url https://api.malga.io/v1/cards/{id} \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>'const options = {method: 'GET', headers: {'X-Client-Id': '<api-key>', 'X-Api-Key': '<api-key>'}};
fetch('https://api.malga.io/v1/cards/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.malga.io/v1/cards/{id}"
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))
}{
"id": "a1d455eb-dafe-4a5c-b882-a5775422f850",
"status": "active",
"statusReason": null,
"createdAt": "2012-08-11T19:02:56.713Z",
"clientId": "d353deef-dacb-40a0-8cab-931ff773f274",
"brand": "Visa",
"cardHolderName": "JOAO DA SILVA",
"cvvChecked": true,
"fingerprint": "8db51cf0-c3c6-4081-b96a-a0e549a7ef6d",
"first6digits": "401959",
"last4digits": "9339",
"customerId": "5a1b4f91-2d70-402a-b45b-815928046433",
"expirationMonth": "12",
"expirationYear": "2026",
"transactionRequests": [
{
"id": "5325ecea-3009-41c3-9f3e-51b787ccdec8",
"createdAt": "2023-09-25T18:09:59.001Z",
"providerId": "ad520776-88c7-42fb-9159-fbff9bd3f187",
"providerType": "SANDBOX",
"requestStatus": "success",
"requestType": "zero_dollar",
"responseTs": "32ms"
}
]
}{
"error": {
"type": "api_error",
"code": 123,
"declinedCode": "<string>",
"declined_code": "<string>",
"key": "<string>",
"businessCode": "<string>",
"message": "<string>",
"details": "<array>"
}
}{
"error": {
"type": "failed_dependency",
"declinedCode": "<string>",
"message": "<string>",
"details": "<array>"
}
}{
"error": {
"type": "api_error",
"code": 123,
"declinedCode": "<string>",
"declined_code": "<string>",
"key": "<string>",
"businessCode": "<string>",
"message": "<string>",
"details": "<array>"
}
}Response
Success
Was this page helpful?