Pedido com divisão do pagamento

A divisão de um pagamento é realizada através do recurso Pedido (orders), contendo, além de informações do pedido (como dados do comprador, itens do carrinho e endereço de entrega), informações da cobrança e da divisão do pagamento (como o tipo da divisão, os recebedores e os valores que devem ser destinados a cada um).

Funcionalidades

EndpointFinalidade
POST /ordersPermite criar um pedido com divisão do pagamento
GET /orders/{order_id}Permite consultar informações referentes ao pedido
GET /splits/{split_id}Permite consultar informações referentes à divisão do pagamento
POST /charges/{charge_id}/cancelPermite cancelar uma cobrança cujo valor foi dividido
POST /charges/{char_id}/capturePermite capturar uma cobrança pré-autorizada podendo informar uma nova regra de divisão de pagamento

Erros

Ao realizar uma requisição, se ocorrer algum erro de validação dos dados ou de alguma regra referente à divisão do pagamento, são retornados na resposta:

  • o tipo do erro (campo “error”);
  • o nome do parâmetro que gerou o erro, quando aplicável (campo “parameter_name”);
  • uma descrição mais detalhada sobre o erro, como por exemplo a regra de preenchimento do parâmetro que gerou o erro ou a regra de negócio que não foi respeitada na requisição (campo “description”);
  • o status code HTTP referente ao erro.
Parameter_nameErrorDescriptionHTTP Status
splits.receiversparameter_required_missingPayment split receivers must be informed400
splits.receiversparameter_required_emptyPayment split receivers must be informed400
splits.receivers.account.idparameter_required_missingReceiver account id must be informed400
splits.receivers.account.idparameter_required_emptyReceiver account id must be informed400
receivers.account.idinvalid_idThe receiver {id da conta PagSeguro} was not found404
splits.receivers.amount.valueparameter_required_missingReceiver amount must be informed400
splits.receivers.amount.valueinvalid_amountReceiver amount must be positive and non-zero400
--invalid_min_receiversAt least two receivers must be informed in a split payment400
--invalid_max_receiversTransaction must have 2 receivers. If your transaction has more than 2 receivers, please send different transactions for each receiver400
--invalid_receivers_listPrimary seller must be informed in the receivers list and must be the owner of the token400
--invalid_receivers_listEach split receiver must be informed only once400
--seller_account_requiredOne or more split receivers cannot receive payments400
--account_inactiveOne or more receivers cannot receive payments400
--forbiddenOne or more receivers are not allowed to split a payment. If you are interested in our split payment product, please contact us at https://dev.pagseguro.uol.com.br/reference/request-approval.403
splits.methodparameter_required_missingPayment split method must be informed400
splits.methodparameter_required_emptyPayment split method must be FIXED or PERCENTAGE400
splits.methodinvalid_parameterPayment split method must be FIXED or PERCENTAGE400
splits.receivers.reasoninvalid_parameterThe reason for a receiver to participate in a split payment must be a maximum of 255 characters400
--amount_too_largeThe sum of the amounts of each receiver must equal the total amount of the transaction400
--amount_too_smalThe sum of the amounts of each receiver must equal the total amount of the transaction400
--amount_too_largeThe sum of the percentages of each receiver must equal 100%400
--amount_too_smallThe sum of the percentages of each receiver must equal 100%400
--forbiddenThis user is not authorized to perform this query403
--invalid_idSorry, the split data for this payment could not be found404
splits.sourceparameter_required_missingSource must be informed400
splits.sourceparameter_required_emptyAt this time, it is only possible to split a payment via API Charge or API Order400
splits.sourceinvalid_parameterAt this time, it is only possible to split a payment via API Charge or API Order400