Skip to main content
POST
Create a deal
The deal belongs to your organization alone — there is no contract to create first. Send each party by its id and entityType: a CUSTOMER is one of your organization’s customers, an ORGANIZATION is a Portão 3 organization (send its wallet to use another than its default one). The document, name, e-mail, phone and address are filled in from the customer or the organization, and each organization’s wallet is resolved for you; a payer whose phone is missing, or is not a valid phone number, is created without one. The invoices, the payment-method rules and the response are those of the Billing API’s Create a deal, which this route calls once the parties are completed; its errors (such as WALLET_NOT_ACTIVE, PARTY_REALM_ORG_NOT_FOUND or BILLING_P2P_NOT_ENABLED) reach you unchanged, with origin: BILLING. Any member of the organization, or an admin of the realm, can create one. Answers the deal it created.

Path Parameters

realmId
string
required
organizationId
string
required

Response

Successful response

id
string
required
realm
string
required
organization
string
required
chargeType
enum<string>
required
Available options:
SINGLE,
RECURRENT,
SUBSCRIPTION
status
enum<string>
required
Available options:
OPEN,
CANCELED,
TERMINATED,
EXPIRED,
REVOKED
startAt
string<date-time>
required
products
object[]
required
paymentMethods
enum<string>[]
required
Available options:
BANK_SLIP,
PIX_INITIATION,
PIX_AUTOMATIC,
PIX,
P2P
creditParties
object[]
required
debitParties
object[]
required
closingAt
string
required
firstChargeDate
string<date-time>
required
numberOfInstallments
number
required
dueAt
string
required
createdBy
string
required
updatedBy
string
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
description
string
contract
string
endAt
string<date-time> | null
secondaryPaymentMethods
enum<string>[]
Available options:
BANK_SLIP,
PIX_INITIATION,
PIX_AUTOMATIC,
PIX,
P2P
fine
object
interest
object
discount
object
paymentUrl
string
settings
object
externalCard
object