Alterar o status de um recebedor no ambiente de sandbox
curl --request POST \
--url https://api.malga.io/v1/sellers/{id}/status \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>' \
--data '
{
"status": "inactive"
}
'import requests
url = "https://api.malga.io/v1/sellers/{id}/status"
payload = { "status": "inactive" }
headers = {
"X-Client-Id": "<api-key>",
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Client-Id': '<api-key>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({status: 'inactive'})
};
fetch('https://api.malga.io/v1/sellers/{id}/status', 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/sellers/{id}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'inactive'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.malga.io/v1/sellers/{id}/status"
payload := strings.NewReader("{\n \"status\": \"inactive\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Client-Id", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.malga.io/v1/sellers/{id}/status")
.header("X-Client-Id", "<api-key>")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"inactive\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.malga.io/v1/sellers/{id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Client-Id"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"inactive\"\n}"
response = http.request(request)
puts response.read_body{
"id": "19d05a45-0e92-478e-8366-955231bcf3d6",
"providers": {
"providerType": "SANDBOX",
"externalId": "1966811",
"externalStatus": "active",
"externalStatusReason": "ok",
"status": "pending",
"createdAt": "2022-12-21T23:10:13.498Z",
"updatedAt": "2022-12-21T20:10:13.951Z"
},
"merchantId": "5616b19e-4d99-4bd3-b415-4990e5cab4f4",
"clientid": "e234eeb3-483d-4df2-87eb-1e2be5cdaccd",
"metadata": null,
"owner": {
"id": "8231ba21-3758-4bd7-b664-5b5fdeda37a0",
"updatedAt": "2023-07-11T23:02:51.581Z",
"createdAt": "2023-07-11T23:02:51.581Z",
"name": "Seller",
"email": "seller@email.com",
"phoneNumber": "85988350264",
"birthdate": "1995-01-27T02:00:00.000Z",
"address": {
"country": "BR",
"id": "883631f0-fea0-4682-ae1a-f4ac6349e0d9",
"updatedAt": "2023-07-11T23:02:51.585Z",
"createdAt": "2023-07-11T23:02:51.585Z",
"street": "Rua Nova Lua",
"streetNumber": "30",
"complement": "casa 4",
"zipCode": "61000-320",
"state": "CE",
"city": "Maracanaú",
"district": "AB"
},
"document": {
"country": "BR",
"id": "32543bbe-42c1-4000-9b68-d01a2735708e",
"updatedAt": "2023-07-11T23:02:51.588Z",
"createdAt": "2023-07-11T23:02:51.588Z",
"type": "cpf",
"number": "36243319067"
}
},
"business": {
"id": "607bb56a-974a-4d1d-9f56-cda865dfafbd",
"updatedAt": "2023-07-11T23:02:51.571Z",
"createdAt": "2023-07-11T23:02:51.571Z",
"name": "Seller business",
"corporateReason": "Seller company social reason",
"phoneNumber": "85988350264",
"email": "seller@email.com",
"website": "www.sellerbusiness.com.br",
"description": "Seller business",
"facebook": "facebook Seller business",
"twitter": "twitter Seller business",
"openingDate": "1995-01-27",
"address": {
"country": "BR",
"id": "b681dd2e-ebdb-4fad-8c8b-e703a17825ce",
"updatedAt": "2023-07-11T23:02:51.574Z",
"createdAt": "2023-07-11T23:02:51.574Z",
"street": "Rua Nova Lua",
"streetNumber": "30",
"complement": "sala 100",
"zipCode": "61000-320",
"state": "CE",
"city": "Maracanaú",
"district": "AB"
},
"document": {
"country": "BR",
"id": "b9380f2c-a657-4f47-a7da-21f3bf08182c",
"updatedAt": "2023-07-11T23:02:51.578Z",
"createdAt": "2023-07-11T23:02:51.578Z",
"type": "cnpj",
"number": "94938591000196"
}
},
"bankAccount": {
"id": "f7ac3221-8f69-4276-b88b-34ddbe5ec24a",
"updatedAt": "2023-07-11T23:02:51.563Z",
"createdAt": "2023-07-11T23:02:51.563Z",
"holderName": "Seller name",
"holderDocument": "36243319067",
"bank": "077",
"ispb": "60746948",
"branchNumber": "492",
"branchCheckDigit": "1",
"accountNumber": "4929",
"accountCheckDigit": "22",
"type": "conta_corrente"
},
"transferPolicy": {
"id": "a04bca24-f7d1-4cb5-acce-41f12680e5bf",
"updatedAt": "2023-07-11T23:02:51.567Z",
"createdAt": "2023-07-11T23:02:51.567Z",
"transferDay": "5",
"transferEnabled": true,
"transferInterval": "weekly",
"automaticAnticipationEnabled": false,
"anticipatableVolumePercentage": "",
"automaticAnticipationType": "",
"automaticAnticipationDays": "",
"automaticAnticipation1025Delay": ""
},
"mcc": 4040,
"status": "active"
}Sellers
Alterar status de recebedor no Sandbox
Altere manualmente o status de um recebedor no ambiente de Sandbox da Malga e dispare o webhook seller.<status> correspondente à mudança.
POST
/
v1
/
sellers
/
{id}
/
status
Alterar o status de um recebedor no ambiente de sandbox
curl --request POST \
--url https://api.malga.io/v1/sellers/{id}/status \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>' \
--data '
{
"status": "inactive"
}
'import requests
url = "https://api.malga.io/v1/sellers/{id}/status"
payload = { "status": "inactive" }
headers = {
"X-Client-Id": "<api-key>",
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Client-Id': '<api-key>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({status: 'inactive'})
};
fetch('https://api.malga.io/v1/sellers/{id}/status', 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/sellers/{id}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'inactive'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.malga.io/v1/sellers/{id}/status"
payload := strings.NewReader("{\n \"status\": \"inactive\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Client-Id", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.malga.io/v1/sellers/{id}/status")
.header("X-Client-Id", "<api-key>")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"inactive\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.malga.io/v1/sellers/{id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Client-Id"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"inactive\"\n}"
response = http.request(request)
puts response.read_body{
"id": "19d05a45-0e92-478e-8366-955231bcf3d6",
"providers": {
"providerType": "SANDBOX",
"externalId": "1966811",
"externalStatus": "active",
"externalStatusReason": "ok",
"status": "pending",
"createdAt": "2022-12-21T23:10:13.498Z",
"updatedAt": "2022-12-21T20:10:13.951Z"
},
"merchantId": "5616b19e-4d99-4bd3-b415-4990e5cab4f4",
"clientid": "e234eeb3-483d-4df2-87eb-1e2be5cdaccd",
"metadata": null,
"owner": {
"id": "8231ba21-3758-4bd7-b664-5b5fdeda37a0",
"updatedAt": "2023-07-11T23:02:51.581Z",
"createdAt": "2023-07-11T23:02:51.581Z",
"name": "Seller",
"email": "seller@email.com",
"phoneNumber": "85988350264",
"birthdate": "1995-01-27T02:00:00.000Z",
"address": {
"country": "BR",
"id": "883631f0-fea0-4682-ae1a-f4ac6349e0d9",
"updatedAt": "2023-07-11T23:02:51.585Z",
"createdAt": "2023-07-11T23:02:51.585Z",
"street": "Rua Nova Lua",
"streetNumber": "30",
"complement": "casa 4",
"zipCode": "61000-320",
"state": "CE",
"city": "Maracanaú",
"district": "AB"
},
"document": {
"country": "BR",
"id": "32543bbe-42c1-4000-9b68-d01a2735708e",
"updatedAt": "2023-07-11T23:02:51.588Z",
"createdAt": "2023-07-11T23:02:51.588Z",
"type": "cpf",
"number": "36243319067"
}
},
"business": {
"id": "607bb56a-974a-4d1d-9f56-cda865dfafbd",
"updatedAt": "2023-07-11T23:02:51.571Z",
"createdAt": "2023-07-11T23:02:51.571Z",
"name": "Seller business",
"corporateReason": "Seller company social reason",
"phoneNumber": "85988350264",
"email": "seller@email.com",
"website": "www.sellerbusiness.com.br",
"description": "Seller business",
"facebook": "facebook Seller business",
"twitter": "twitter Seller business",
"openingDate": "1995-01-27",
"address": {
"country": "BR",
"id": "b681dd2e-ebdb-4fad-8c8b-e703a17825ce",
"updatedAt": "2023-07-11T23:02:51.574Z",
"createdAt": "2023-07-11T23:02:51.574Z",
"street": "Rua Nova Lua",
"streetNumber": "30",
"complement": "sala 100",
"zipCode": "61000-320",
"state": "CE",
"city": "Maracanaú",
"district": "AB"
},
"document": {
"country": "BR",
"id": "b9380f2c-a657-4f47-a7da-21f3bf08182c",
"updatedAt": "2023-07-11T23:02:51.578Z",
"createdAt": "2023-07-11T23:02:51.578Z",
"type": "cnpj",
"number": "94938591000196"
}
},
"bankAccount": {
"id": "f7ac3221-8f69-4276-b88b-34ddbe5ec24a",
"updatedAt": "2023-07-11T23:02:51.563Z",
"createdAt": "2023-07-11T23:02:51.563Z",
"holderName": "Seller name",
"holderDocument": "36243319067",
"bank": "077",
"ispb": "60746948",
"branchNumber": "492",
"branchCheckDigit": "1",
"accountNumber": "4929",
"accountCheckDigit": "22",
"type": "conta_corrente"
},
"transferPolicy": {
"id": "a04bca24-f7d1-4cb5-acce-41f12680e5bf",
"updatedAt": "2023-07-11T23:02:51.567Z",
"createdAt": "2023-07-11T23:02:51.567Z",
"transferDay": "5",
"transferEnabled": true,
"transferInterval": "weekly",
"automaticAnticipationEnabled": false,
"anticipatableVolumePercentage": "",
"automaticAnticipationType": "",
"automaticAnticipationDays": "",
"automaticAnticipation1025Delay": ""
},
"mcc": 4040,
"status": "active"
}Path Parameters
Identificador do seller que deseja alterar no sandbox
Body
application/json
Novo status do recebedor
Available options:
pending, active, inactive, failed Response
Status alterado com sucesso
Identificador do seller
Show child attributes
Show child attributes
Identificador do merchant
Identificador do cliente
Campos adicionais da transação enviados na criação da mesma
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Código de segmento do lojista no adquirente
Status do seller
Available options:
active, partial, inactive, pending, blocked Related topics
July 20, 2026 - Simulação de status de recebedor no SandboxGuia de testeAlterar o status do antifraude no ambiente de sandboxAlterar o status de uma cobrança no ambiente de sandboxWas this page helpful?
⌘I