Purchase Process with Pagaleve
The customer places an order in a partner e-commerce and selects Pagaleve as the payment method. At this moment, the partner creates a checkout (order) in our system.
At this point, the checkout status is PENDING, and after the first installment payment is made, the order status changes to AUTHORIZED. At this stage, the merchant performs the payment capture, and this is when the transaction in the merchant’s account is created.
We charge a service fee in percentage form (merchant_service_fee, e.g., 10
meaning 10%) and a fixed transaction fee (merchant_transaction_fee, in cents, e.g., 80
) based on the total purchase amount.
Transactions
Transactions can be of two types, and the field transaction_type will be either TRANSACTION (a completed sale) or REFUND_TRANSACTION (a refund).
Each new transaction is recorded in the transactions field, whether it is a TRANSACTION or a REFUND_TRANSACTION.
Fields ending with fee_amount contain the accumulated charged fees.
Cancellations
A cancellation operation is equivalent to a refund operation. The refund may be partial or total. In this case, a transaction of type REFUND_TRANSACTION will be created with the total order amount.
In refunds, we reimburse the proportional service fee but do not reimburse the transaction fee.
Example:
For an order of R$100 with a 10% service fee and a R$0.80 transaction fee, the merchant will receive R$89.20.
If a full refund is requested, we will return the service fee but not the transaction fee. The account will then show -R$0.80. This amount is not charged immediately but will be deducted from the account in the next sales operation.
Settlements
We provide 2 APIs:
- Retrieve the daily summary
- List all transactions performed on that day
Retrieve the Daily Summary (Settlement)
Each settlement (daily summary) contains aggregated information from all transactions processed between 00:00:00:000 and 23:59:59:999 of the day field, which represents that settlement.
Accumulated Values
Since transfers are only made on business days, Friday’s values are not paid on Saturday but on Monday. Thus, values from Friday, Saturday, and Sunday are accumulated.
Within the Settlement object of our “Daily Summary” API, there is a field called accumulatedSummary, which contains the accumulated values for these days. On a regular business day where the transfer was generated for the previous day, this field will contain the same values as the day in question (i.e., only that day’s amounts).
Last Settlement Values
The settlement object returned will include a field last_day_summary. This contains a summary of the previous day’s accumulated values and whether they have already been transferred.
Transfers
Payments for operations occur on D+1 Business Day. Therefore, a transfer is created in the transfer field within the settlement of the previous business day.
Example:
Friday and Saturday settlements will not have the transfer field filled in, but Sunday’s settlement will, with the accumulated values of Friday, Saturday, and Sunday, since the transfer will occur on Monday.
The transfer object includes a timestamp field (creation date – Monday in this case), while the settlement_date field refers to the day the transfer corresponds to. This is a double-check mechanism, even though the transfer is nested within the settlement object.
Deposit and transfer operations are carried out by our finance department after reconciling all amounts. After transfers are completed, the finance team calls an internal API that sets the transferred_date field in the transfer object, specifying the exact moment when all transfers have been settled into the merchant’s account.