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": "148d5db0-f1c3-439f-902d-f1f268086e1d",
"status": "active",
"statusReason": null,
"createdAt": "2012-08-11T19:02:56.713Z",
"clientId": "cc0b1e41-2936-45c5-947f-93995ffcdc00",
"brand": "Visa",
"cardHolderName": "JOAO DA SILVA",
"cvvChecked": true,
"fingerprint": "cbd4a441-c63c-4dee-ac6b-bfa7fa1df818",
"first6digits": "401959",
"last4digits": "9339",
"customerId": "82aba896-9e37-45b6-aa90-d510c9050596",
"expirationMonth": "12",
"expirationYear": "2026",
"transactionRequests": [
{
"id": "edd0d86a-76d0-4c2c-b924-1528510a5a32",
"createdAt": "2023-09-25T18:09:59.001Z",
"providerId": "5ce68ed3-2213-423b-8eaf-9d8c4b40df2b",
"providerType": "SANDBOX",
"requestStatus": "success",
"requestType": "zero_dollar",
"responseTs": "32ms"
}
]
}{
"error": {
"type": "api_error",
"code": 123,
"declinedCode": "<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>",
"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": "148d5db0-f1c3-439f-902d-f1f268086e1d",
"status": "active",
"statusReason": null,
"createdAt": "2012-08-11T19:02:56.713Z",
"clientId": "cc0b1e41-2936-45c5-947f-93995ffcdc00",
"brand": "Visa",
"cardHolderName": "JOAO DA SILVA",
"cvvChecked": true,
"fingerprint": "cbd4a441-c63c-4dee-ac6b-bfa7fa1df818",
"first6digits": "401959",
"last4digits": "9339",
"customerId": "82aba896-9e37-45b6-aa90-d510c9050596",
"expirationMonth": "12",
"expirationYear": "2026",
"transactionRequests": [
{
"id": "edd0d86a-76d0-4c2c-b924-1528510a5a32",
"createdAt": "2023-09-25T18:09:59.001Z",
"providerId": "5ce68ed3-2213-423b-8eaf-9d8c4b40df2b",
"providerType": "SANDBOX",
"requestStatus": "success",
"requestType": "zero_dollar",
"responseTs": "32ms"
}
]
}{
"error": {
"type": "api_error",
"code": 123,
"declinedCode": "<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>",
"key": "<string>",
"businessCode": "<string>",
"message": "<string>",
"details": "<array>"
}
}Response
Success
Was this page helpful?