Pular para o conteúdo principal

Recebedor (seller)

Para disponibilizar a funcionalidade de split, evoluímos a tecnologia e infra da Malga com o novo serviço de seller. Através desse novo serviço é possível cadastrar previamente o recebedor ou recebedores da divisão do split. Toda transação com split precisa ter recebedores cadastrados para ter sucesso.

Possíveis status de recebedor

A criação de um seller dentro dos provedores não é feita de forma imediata, uma vez que critérios precisam ser analisados, assim como uma transação financeira.

Os status possíveis para um seller são:

StatusDescrição
pendingInformações recebidas porém pendente de validação no provedor
activeRecebedor pode transacionar e sacar valores
inactiveRecebedor não pode transacionar nem sacar valores

Exemplos de criaçao de recebedor aprovado

Caso se trate de um parceiro pessoa física, utilize a propriedade owner:

curl --location --request POST 'https://api.malga.io/v1/sellers' \
--header 'X-Client-Id: <YOUR_SECRET_KEY>' \
--header 'X-Api-Key: <YOUR_SECRET_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"merchantId": "b1612460-0fef-447d-9590-97825cf60cf6",
"owner": {
"name": "Seller",
"phoneNumber": "85988350264",
"email": "seller@email.com",
"birthdate": "1995-01-27",
"document": {
"number": "36243319067",
"type": "cpf"
},
"address": {
"street": "Rua Nova Lua",
"streetNumber": "30",
"zipCode": "61000-320",
"country": "BR",
"state": "CE",
"district": "AB",
"city": "Maracanaú"
}
},
"mcc": 1,
"transferPolicy": {
"transferDay": 5,
"transferEnabled": true,
"transferInterval": "weekly"
},
"bankAccount": {
"holderName": "Seller name",
"holderDocument": "36243319067",
"bank": "077",
"branchNumber": "492",
"branchCheckDigit": "1",
"accountNumber": "4929",
"accountCheckDigit": "22",
"type": "conta_corrente"
}
}'

< HTTP/2 201
{
"id": "19d05a45-0e92-478e-8366-955231bcf3d6",
"providers": {
"providerType": "PlugSandbox",
"externalId": "1966811",
"externalStatus": "active",
"externalStatusReason": "ok",
"status": "pending",
"createdAt": "2022-12-21T23:10:13.498Z",
"updatedAt": "2022-12-21T20:10:13.951Z"
},
"merchantId": "b1612460-0fef-447d-9590-97825cf60cf6",
"clientId": "<YOUR_SECRET_KEY>",
"metadata": null,
"business": null,
"owner": {
"name": "Seller",
"phoneNumber": "85988350264",
"email": "seller@email.com",
"birthdate": "1995-01-27",
"document": {
"number": "36243319067",
"type": "cpf",
"updatedAt": "2022-12-21T23:10:13.334Z",
"createdAt": "2022-12-21T23:10:13.334Z",
"id": "afcb459f-168c-4b74-a2cc-85b1756cb97f",
},
"address": {
"street": "Rua Nova Lua",
"streetNumber": "30",
"zipCode": "61000-320",
"country": "BR",
"state": "CE",
"district": "AB",
"city": "Maracanaú",
"updatedAt": "2022-12-21T23:10:13.334Z",
"createdAt": "2022-12-21T23:10:13.334Z",
"id": "d5edcf8a-a2d7-4fb8-bf85-1caad2e0d7d0",
}
},
"transferPolicy": {
"transferDay": 5,
"transferEnabled": true,
"transferInterval": "weekly"
},
"bankAccount": {
"holderName": "Seller name",
"holderDocument": "36243319067",
"bank": "077",
"branchNumber": "492",
"branchCheckDigit": "1",
"accountNumber": "4929",
"accountCheckDigit": "22",
"type": "conta_corrente",
"id": "924ab8c7-df93-465b-97e3-c211c75a3e6e",
},
"mcc": 1,
}

Caso se trate de um parceiro pessoa jurídica, utilize as propriedades owner e business:

curl --location --request POST 'https://api.malga.io/v1/sellers' \
--header 'X-Client-Id: <YOUR_SECRET_KEY>' \
--header 'X-Api-Key: <YOUR_SECRET_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"merchantId": "b1612460-0fef-447d-9590-97825cf60cf6",
"owner": {
"name": "Seller",
"phoneNumber": "85988350264",
"email": "seller@email.com",
"birthdate": "1995-01-27",
"document": {
"number": "36243319067",
"type": "cpf",
"updatedAt": "2022-12-21T23:10:13.334Z",
"createdAt": "2022-12-21T23:10:13.334Z",
"id": "afcb459f-168c-4b74-a2cc-85b1756cb97f",
},
"address": {
"street": "Rua Nova Lua",
"streetNumber": "30",
"zipCode": "61000-320",
"country": "BR",
"state": "CE",
"district": "AB",
"city": "Maracanaú",
"updatedAt": "2022-12-21T23:10:13.334Z",
"createdAt": "2022-12-21T23:10:13.334Z",
"id": "d5edcf8a-a2d7-4fb8-bf85-1caad2e0d7d0",
}
},
"business": {
"description": "Seller business",
"name": "Seller business",
"phoneNumber": "85988350264",
"email": "seller@email.com",
"openingDate": "1995-01-27",
"document": {
"number": "94938591000196",
"type": "cnpj"
},
"address": {
"street": "Rua Nova Lua",
"streetNumber": "30",
"zipCode": "61000-320",
"country": "BR",
"state": "CE",
"district": "AB",
"city": "Maracanaú"
}
},
"mcc": 4040,
"transferPolicy": {
"transferDay": 5,
"transferEnabled": true,
"transferInterval": "weekly"
},
"bankAccount": {
"holderName": "Seller name",
"holderDocument": "36243319067",
"bank": "077",
"branchNumber": "492",
"branchCheckDigit": "1",
"accountNumber": "4929",
"accountCheckDigit": "22",
"type": "conta_corrente"
}
}'

< HTTP/2 201
< content-type: application/json; charset=utf-8
{
"id": "19d05a45-0e92-478e-8366-955231bcf3d6",
"providers": {
"providerType": "PlugSandbox",
"externalId": "1966811",
"externalStatus": "active",
"externalStatusReason": "ok",
"status": "pending",
"createdAt": "2022-12-21T23:10:13.498Z",
"updatedAt": "2022-12-21T20:10:13.951Z"
}
"merchantId": "b1612460-0fef-447d-9590-97825cf60cf6",
"clientid": "<YOUR_SECRET_KEY>",
"metadata": null,
"owner": {
"name": "Seller",
"phoneNumber": "85988350264",
"email": "seller@email.com",
"birthdate": "1995-01-27",
"document": {
"number": "36243319067",
"type": "cpf",
"updatedAt": "2022-12-21T23:10:13.334Z",
"createdAt": "2022-12-21T23:10:13.334Z",
"id": "afcb459f-168c-4b74-a2cc-85b1756cb97f",
},
"address": {
"street": "Rua Nova Lua",
"streetNumber": "30",
"zipCode": "61000-320",
"country": "BR",
"state": "CE",
"district": "AB",
"city": "Maracanaú",
"updatedAt": "2022-12-21T23:10:13.334Z",
"createdAt": "2022-12-21T23:10:13.334Z",
"id": "d5edcf8a-a2d7-4fb8-bf85-1caad2e0d7d0",
}
},,
"business": {
"description": "Seller business",
"name": "Seller business",
"phoneNumber": "85988350264",
"email": "seller@email.com",
"openingDate": "1995-01-27",
"document": {
"number": "94938591000196",
"type": "cnpj",
"updatedAt": "2022-12-21T23:10:13.334Z",
"createdAt": "2022-12-21T23:10:13.334Z",
"id": "d5edcf8a-a2d7-4fb8-bf85-1caad2e0d7d0",
},
"address": {
"street": "Rua Nova Lua",
"streetNumber": "30",
"zipCode": "61000-320",
"country": "BR",
"state": "CE",
"district": "AB",
"city": "Maracanaú",
"updatedAt": "2022-12-21T23:10:13.334Z",
"createdAt": "2022-12-21T23:10:13.334Z",
"id": "d5edcf8a-a2d7-4fb8-bf85-1caad2e0d7d0",
}
},
"transferPolicy": {
"transferDay": 5,
"transferEnabled": true,
"transferInterval": "weekly"
},
"bankAccount": {
"holderName": "Seller name",
"holderDocument": "36243319067",
"bank": "077",
"branchNumber": "492",
"branchCheckDigit": "1",
"accountNumber": "4929",
"accountCheckDigit": "22",
"type": "conta_corrente",
"id": "924ab8c7-df93-465b-97e3-c211c75a3e6e",
},
"mcc": 1,
}

Consulte a tabela de códigos de banco para preenchimento de bank-bankAccount

Exemplos de busca de recebedor

curl --location --request GET 'https://api.malga.io/v1/sellers/19d05a45-0e92-478e-8366-955231bcf3d6' \
--header 'X-Client-Id: <YOUR_SECRET_KEY>' \
--header 'X-Api-Key: <YOUR_SECRET_KEY>' \
--header 'Content-Type: application/json'

< HTTP/2 201
{
"id": "19d05a45-0e92-478e-8366-955231bcf3d6",
"providers": {
"providerType": "PlugSandbox",
"externalId": "1966811",
"externalStatus": "active",
"externalStatusReason": "ok",
"status": "pending",
"createdAt": "2022-12-21T23:10:13.498Z",
"updatedAt": "2022-12-21T20:10:13.951Z"
}
"merchantId": "b1612460-0fef-447d-9590-97825cf60cf6",
"clientid": "<YOUR_SECRET_KEY>",
"metadata": null,
"owner": {
"name": "Seller",
"phoneNumber": "85988350264",
"email": "seller@email.com",
"birthdate": "1995-01-27",
"document": {
"number": "36243319067",
"type": "cpf",
"updatedAt": "2022-12-21T23:10:13.334Z",
"createdAt": "2022-12-21T23:10:13.334Z",
"id": "afcb459f-168c-4b74-a2cc-85b1756cb97f",
},
"address": {
"street": "Rua Nova Lua",
"streetNumber": "30",
"zipCode": "61000-320",
"country": "BR",
"state": "CE",
"district": "AB",
"city": "Maracanaú",
"updatedAt": "2022-12-21T23:10:13.334Z",
"createdAt": "2022-12-21T23:10:13.334Z",
"id": "d5edcf8a-a2d7-4fb8-bf85-1caad2e0d7d0",
}
},,
"business": {
"description": "Seller business",
"name": "Seller business",
"phoneNumber": "85988350264",
"email": "seller@email.com",
"openingDate": "1995-01-27",
"document": {
"number": "94938591000196",
"type": "cnpj",
"updatedAt": "2022-12-21T23:10:13.334Z",
"createdAt": "2022-12-21T23:10:13.334Z",
"id": "d5edcf8a-a2d7-4fb8-bf85-1caad2e0d7d0",
},
"address": {
"street": "Rua Nova Lua",
"streetNumber": "30",
"zipCode": "61000-320",
"country": "BR",
"state": "CE",
"district": "AB",
"city": "Maracanaú",
"updatedAt": "2022-12-21T23:10:13.334Z",
"createdAt": "2022-12-21T23:10:13.334Z",
"id": "d5edcf8a-a2d7-4fb8-bf85-1caad2e0d7d0",
}
},
"transferPolicy": {
"transferDay": 5,
"transferEnabled": true,
"transferInterval": "weekly"
},
"bankAccount": {
"holderName": "Seller name",
"holderDocument": "36243319067",
"bank": "077",
"branchNumber": "492",
"branchCheckDigit": "1",
"accountNumber": "4929",
"accountCheckDigit": "22",
"type": "conta_corrente",
"id": "924ab8c7-df93-465b-97e3-c211c75a3e6e",
},
"mcc": 1,
}