Skip to main content

Recipient (seller)

To make the split functionality available, we have evolved Plug's technology and infrastructure with the new seller service. Through this new service, it is possible to previously register the recipient or recipients of the split division. Every split transaction needs to have registered recipients to be successful.

Possible recipient statuses

The creation of a seller within the providers is not done immediately, since criteria need to be analyzed, as well as a financial transaction.

The possible statuses for a seller are:

StatusDescrição
pendingInformation received but pending validation at the provider
activeRecipient can transact and withdraw amounts
inactiveRecipient cannot transact or withdraw amounts

Examples of creating an approved recipient

If it is a individual partner, use the owner property:

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 < 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,
"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,
}

If it is a legal entity partner, use the business and owner properties:

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

Get receiver examples

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 < 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,
}