Recupera sessão com os dados das configurações da empresa
curl --request GET \
--url https://api.malga.io/v1/sessions/{id}/link \
--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/sessions/{id}/link', 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/sessions/{id}/link"
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": "1b0c6960-702a-4074-95c2-eed2790c16a1",
"name": "Nome da sessão",
"status": "created",
"isActive": true,
"clientId": "1b0c6960-702a-4074-95c2-eed2790c16a1",
"orderId": null,
"amount": 100,
"currency": "BRL",
"capture": true,
"merchantId": "69aea152-ba70-49a3-a31c-044ac1651146",
"dueDate": "2022-10-25T09:28:45.000Z",
"description": "Promoção Black Friday",
"statementDescriptor": "LOJA JOAO",
"paymentMethods": [
{
"paymentType": "credit",
"installments": 1
}
],
"items": [
{
"id": "78601913-a176-4d71-b7e8-abb6fc49a340",
"name": "Item 1",
"description": "Descrição do item",
"unitPrice": 10000,
"quantity": 1,
"tangible": false
}
],
"createdAt": "2022-10-25T09:28:45.000Z",
"updatedAt": "2022-10-25T09:28:45.000Z",
"publicKey": "1b0c6960-702a-4074-95c2-eed2790c16a1",
"multiplePayments": {
"allow": true,
"maxPayments": 5,
"paymentCount": 1,
"pendingCount": 0,
"status": "active"
},
"settings": {
"id": "78601913-a176-4d71-b7e8-abb6fc49a340",
"email": "company@email.com",
"phone": "5551996225566",
"statementDescription": "LOJA JOAO",
"logo": "https://logo.com/images/logo.png",
"mainColor": "#fff000",
"secondaryColor": "#fff000",
"attentionColor": "#333333",
"errorColor": "#ff0000",
"successColor": "#00FF00",
"backgroundColor": "#fff000",
"companyName": "Company Name",
"clientId": "1b0c6960-702a-4074-95c2-eed2790c16a1",
"documentNumber": "011001001001000010",
"language": "pt_BR"
}
}Sessions
Recupera sessão com os dados das configurações da empresa
Retorna a sessão completa junto das configurações da empresa usadas no Link de Pagamento. Também inclui multiplePayments para indicar a disponibilidade agregada do link em sessões 1:1 e 1:N.
GET
/
v1
/
sessions
/
{id}
/
link
Recupera sessão com os dados das configurações da empresa
curl --request GET \
--url https://api.malga.io/v1/sessions/{id}/link \
--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/sessions/{id}/link', 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/sessions/{id}/link"
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": "1b0c6960-702a-4074-95c2-eed2790c16a1",
"name": "Nome da sessão",
"status": "created",
"isActive": true,
"clientId": "1b0c6960-702a-4074-95c2-eed2790c16a1",
"orderId": null,
"amount": 100,
"currency": "BRL",
"capture": true,
"merchantId": "69aea152-ba70-49a3-a31c-044ac1651146",
"dueDate": "2022-10-25T09:28:45.000Z",
"description": "Promoção Black Friday",
"statementDescriptor": "LOJA JOAO",
"paymentMethods": [
{
"paymentType": "credit",
"installments": 1
}
],
"items": [
{
"id": "78601913-a176-4d71-b7e8-abb6fc49a340",
"name": "Item 1",
"description": "Descrição do item",
"unitPrice": 10000,
"quantity": 1,
"tangible": false
}
],
"createdAt": "2022-10-25T09:28:45.000Z",
"updatedAt": "2022-10-25T09:28:45.000Z",
"publicKey": "1b0c6960-702a-4074-95c2-eed2790c16a1",
"multiplePayments": {
"allow": true,
"maxPayments": 5,
"paymentCount": 1,
"pendingCount": 0,
"status": "active"
},
"settings": {
"id": "78601913-a176-4d71-b7e8-abb6fc49a340",
"email": "company@email.com",
"phone": "5551996225566",
"statementDescription": "LOJA JOAO",
"logo": "https://logo.com/images/logo.png",
"mainColor": "#fff000",
"secondaryColor": "#fff000",
"attentionColor": "#333333",
"errorColor": "#ff0000",
"successColor": "#00FF00",
"backgroundColor": "#fff000",
"companyName": "Company Name",
"clientId": "1b0c6960-702a-4074-95c2-eed2790c16a1",
"documentNumber": "011001001001000010",
"language": "pt_BR"
}
}Response
201 - application/json
Created
Was this page helpful?