Crie recebedores para vincular em suas cobranças.

Método

import { Malga } from 'malga'

const malga = new Malga({
  apiKey: '17a64c8f-a387-4682-bdd8-d280493715e0',
  clientId: 'd1d2b51a-0446-432a-b055-034518c2660e',
})

await malga.sellers.create({
  merchantId: '8cfef0d1-73af-4bdb-b6c4-09ad3fbfc7f1',
  mcc: 4040,
  owner: {
    name: 'João da Silva',
    email: 'joao.silva@test.com',
    phoneNumber: '99999999999',
    birthdate: '2000-12-31',
    document: {
      number: '99999999999',
      type: 'cpf',
      country: 'BR'
    },
    address: {
      city: 'Rio de Janeiro',
      complement: 'Sala 214',
      country: 'BR',
      district: 'São Conrado',
      state: 'RJ',
      street: 'Estrada da Gávea',
      streetNumber: '696',
      zipCode: '22610002'
    }
  },
  bankAccount: {
    holderName: 'João da Silva'
    holderDocument: '99999999999',
    bank: '077'
    branchNumber: '492',
    accountNumber: '4929',
    type: 'conta_corrente'
  },
  transferPolicy: {
    transferDay: '5'
    transferEnabled: true
    transferInterval: 'monthly'
  }
})
{
  id: 'c1015d17-f123-499f-aaad-32e7f7812132',
  clientId: 'd1d2b51a-0446-432a-b055-034518c2660e',
  status: 'pending',
  merchantId: '8cfef0d1-73af-4bdb-b6c4-09ad3fbfc7f1',
  mcc: 4040,
  owner: {
    name: 'João da Silva',
    email: 'joao.silva@test.com',
    phoneNumber: '99999999999',
    birthdate: '2000-12-31'
    document: {
      number: '99999999999',
      type: 'cpf',
      country: 'BR'
    },
    address: {
      city: 'Rio de Janeiro',
      complement: 'Sala 214',
      country: 'BR',
      district: 'São Conrado',
      state: 'RJ',
      street: 'Estrada da Gávea',
      streetNumber: '696',
      zipCode: '22610002'
    }
  },
  bankAccount: {
    holderName: 'João da Silva'
    holderDocument: '99999999999',
    bank: '077'
    branchNumber: '492',
    accountNumber: '4929',
    type: 'conta_corrente'
  },
  transferPolicy: {
    transferDay: '5'
    transferEnabled: true
    transferInterval: 'monthly'
  },
  providers: [{
    providerType: 'SANDBOX',
    externalId: '1103976',
    externalStatus: 'active',
    externalStatusReason: 'ok',
    status: 'active',
    createdAt: '2023-12-31T16:08:39.536Z',
    updatedAt: '2023-12-31T16:08:39.536Z'
  }]
}

Parâmetros

Lista de todos os parâmetros suportados pelo método.

merchantId
uuid
required

ID do Merchant que será vinculado o recebedor

mcc
number
required

Código de segmento do lojista no adquirente

owner
object

Dados do recebedor

business
object

Dados do estabelecimento do recebedor

bankAccount
object
required

Dados da conta bancária

transferPolicy
object
required

Dados da política de transferência

metadata
object

Informações adicionais passadas com chave e valor