splits. A platform approved by YuvexPay skips the
dashboard invitation: the first payment it creates for a seller connects the two
companies, and the payment goes through on the same call.
This guide is written for the platform. If you are a seller, read
What the seller sees.
Before you start
Approval is granted by YuvexPay, company by company, with a fee cap agreed at approval. Contact support to ask for it. Until your company is approved, the header described below connects nobody and the regular invite flow applies. You need:- Your company ID, shown under Configurações > Empresa. The seller’s
payments name it as
recipientCompanyId. - An API key of your own company with the
payments:writescope. - An API key of the seller, in the same environment as yours. See Seller API key.
The first payment
Send the seller’s key inAuthorization, your company in splits[] and your
own key in X-Split-Platform-Key:
ypk_live_... in production, ypk_test_...
in sandbox), without Bearer. The body is the same as for any payment, and the
3 is an example value.
On that call YuvexPay:
- Verifies your key: active, in the environment of the seller’s key, with
payments:write, used from an address inside its IP allowlist when it has one, and from a company other than the seller’s. - Confirms that your company is the recipient in
splits[]and is an approved platform: active, in production, with verification approved. - Checks the split against the fee cap.
- Records the relationship as
ACCEPTED, with the cap, and, in production, notifies the seller. - Creates the payment and answers
201, as for any other payment.
PROVIDER_TEMPORARILY_UNAVAILABLE, the seller stays
connected and, in production, is still notified.
When the header is read
X-Split-Platform-Key is read only when exactly one recipient in splits[]
has no accepted relationship with the seller. Any other recipient in the array
is already accepted.
In every other case the header is ignored and not validated. A connected seller
does not depend on your key: its payments keep passing if you stop sending the
header, or if you rotate or revoke the key. You can send the header on every
call.
When the header is read and the seller is not connected, the answer is one of
these:
SPLIT_PLATFORM_KEY_INVALID, SPLIT_FEE_CAP_EXCEEDED and
SPLIT_PARTNER_LIMIT_EXCEEDED record nothing: no connection and no request.
The second row follows the regular flow described below.
A pair that was revoked or declined before is never connected by a payment: see
What the seller sees.
Calls that do not connect
A call that does not connect the seller follows the regular flow, the same in production and in sandbox. That is the case when the call:- Carries no
X-Split-Platform-Key. - Carries a valid key whose company is not the recipient in
splits[], or is not an approved platform. - Names two or more recipients that have no accepted relationship.
400 SPLIT_RELATIONSHIP_PENDING and opens a pending
request to each recipient that has no relationship with the seller yet and can
receive splits in that environment: an active company, in the same environment
as the request and, in production, with verification approved. For any other
company ID the answer is the same and no request is opened.
You accept the request in your dashboard, as any other recipient does. A later
call with the header accepts it too, under the rules above. Until then, every
payment that names your company fails with SPLIT_RELATIONSHIP_PENDING.
The seller can hold a limited number of pending requests. A call that would
open one past that limit fails with 400 SPLIT_RELATIONSHIP_REQUEST_LIMIT. See
Split partners.
The fee cap
Every split to an approved platform is capped. The cap is a percentage of the paymentamount, the gross. It limits your split alone: other recipients in
the same payment are not affected.
The cap applied to a payment is the lowest of three values:
- The cap recorded on the relationship when the seller connected.
- Your platform’s current cap.
- The maximum YuvexPay allows for any platform.
With an example cap of
4.00 and an amount of 49.90, the bound for a fixed
split is 1.996: 1.99 passes and 2.00 is refused. A request above the cap
fails with 400 SPLIT_FEE_CAP_EXCEEDED:
details.feeCap is the cap that was applied, a string with two decimal places.
The 4.00 here is an example: your cap is the one agreed at approval.
The cap is checked before anything is recorded. A first payment above the cap
connects nobody and the seller is not notified.
GET /v1/splits/partners returns the cap
recorded on each relationship as feeCap, whether the seller connected through
the header or you accepted its request by hand. Call it with
direction=INCOMING&status=ACCEPTED to list the sellers connected to you.
Without status, the list also carries pending, declined, revoked and
cancelled pairs. Every partner comes back in one response unless you send
limit: then pass nextCursor back as cursor until it is null. You are
not notified seller by seller.
Error codes
The full list is in Payment errors.
What the seller sees
When a platform connects in production, the seller gets a dashboard notification and an e-mail. Both name the platform and the cap, and point to Configurações > Parceiros de divisão. A connection in sandbox sends neither. When you accept a request by hand, the seller gets the notice that any accepted invitation sends. It does not name the cap. The platform is listed there as an active partner, with a Revogar button. Either side can revoke. Revocation is forward-only: payments already created still settle, and the platform still receives those shares. After a revocation, a payment that names the platform fails withSPLIT_RELATIONSHIP_REVOKED, with or without the header, and a pair the
platform declined fails with SPLIT_RELATIONSHIP_DECLINED. The header never
reconnects such a pair, even after a later invitation was cancelled.
To connect again, the seller sends a new invitation from the dashboard and the
platform accepts it in its own dashboard. While that invitation is pending,
payments answer SPLIT_RELATIONSHIP_PENDING. If the seller cancels it, a
payment with the header answers SPLIT_RELATIONSHIP_REVOKED or
SPLIT_RELATIONSHIP_DECLINED again, and a payment without the header opens a
new pending request and answers SPLIT_RELATIONSHIP_PENDING.
If you are a seller and do not recognise the platform, revoke the connection
and replace your API key.
Seller API key
The platform acts with whatever the seller’s key allows. Ask the seller for a key created for your platform, not a full-access one:- Scopes limited to payments:
payments:write, pluspayments:readto read payments and list partners. Add another scope only when your integration needs it. - An IP allowlist with the addresses of your servers.
If the approval is withdrawn
YuvexPay can withdraw the approval of a platform. From that moment:- Every new payment with a split to the platform fails with
400 SPLIT_PLATFORM_SUSPENDED, for every seller connected with a fee cap. The relationship does not turn into an ordinary partnership without a cap. - The header connects no new seller. The call follows the
regular flow and answers
400 SPLIT_RELATIONSHIP_PENDING. - Payments already created are not changed: a split is fixed at creation.
Payment links
A payment link does not connect a platform. Links are created in the dashboard, where there is no platform key to send. A link with a split to a platform the seller is not connected to is refused withSPLIT_RELATIONSHIP_PENDING and
follows the regular flow.
Once the seller is connected, links with a split to the platform work and
follow the same cap. The cap is checked when the link is created, when its
amount is edited and on each payment made through it. A split above the cap
fails with SPLIT_FEE_CAP_EXCEEDED.
Sandbox
The connection works in sandbox under the same rules as in production. Send the seller’sypk_test_ key in Authorization and a ypk_test_ key of your
approved company in X-Split-Platform-Key. Approval is granted in production
only: the sandbox connection relies on it and applies the same fee cap.
The two environments are kept apart. A seller connected in production is not
connected in sandbox, and the reverse. A revocation or a decline in one
environment does not reach the other, and
GET /v1/splits/partners lists the
relationships of the environment of the key.
In sandbox the seller gets no notification and no e-mail, and the split never
touches a production balance, statement or report.
A sandbox payment can only split to a company in sandbox mode, and your
approved company is a production company. The sandbox connection is the
exception: once it is made, the seller’s sandbox payments can name your
company. Before it, a ypk_test_ payment that names your company without the
header returns SPLIT_RELATIONSHIP_PENDING, opens no request and leaves
nothing for you to accept.

