Skip to main content
A partner can call Pix JD with its own credential. You confine that credential to the direct participants (ISPBs) or to the indirect participants it acts for. You need this when one Pix JD deployment serves several participants, and each customer’s system must see and move only its own Pix. Every Pix JD partner needs a scope. A partner with Pix JD permissions and no Pix JD restriction is refused.

Step by step


1

Choose who the partner acts for

Pix JD has two restrictions:Use them in one of these two ways:
To confine a partner to one indirect participant, give it only indirectId. Do not add the ISPB of the direct participant that settles for it. With both, the partner also reads the direct participant’s own data: its keys, claims, limits, fraud markers, and Pix Automático records.
A partner restricted by ISPB alone is the partner of the whole direct participant. It reaches every indirect participant of that direct participant.Do not put the ISPB of an indirect participant in participantId. Access Manager accepts it, but the partner is then refused on almost every route, and it is not confined to that indirect participant. Use indirectId.
2

Give the partner its permissions and scope

Create the partner, or change it, in the Console or with the Identity API. The product slug is plugin-br-pix-jd. Both restrictions accept several values.
  • Add at least one restriction for Pix JD. Without one, Access Manager refuses the partner with 400 and IDE-1060.
  • Check the resources and actions. The most you can give is what the plugin-br-pix-jd-editor-role role holds in your tenant. Above that, Access Manager refuses with IDE-1043.
Access Manager checks each write you give against the scope, and refuses with 400 and IDE-1056 a write wider than the partner’s scope. The Console marks the line Outside the scope:
  • A partner with an indirect participant in its scope can receive only these writes: create payments, create refunds, and create or change dynamic QR codes. Every other write acts on the whole direct participant: registering keys, claims, limits, static QR codes, Pix Automático, fraud markers, the actions on MED records, and registering or changing indirect participants.
  • Writes that act on the whole tenant, such as the operator actions and the callbacks of the rail, are never given to a partner.
3

Create its Pix JD application

Create the partner’s application with the product plugin-br-pix-jd. See Create the partner’s applications in the API guide, or in the Console. Send the client ID and the client secret to the partner through a secure channel.
4

Name the participant on every request

Every request names who the partner acts for, in a field that Pix JD already has. The value must be inside the partner’s scope. A request that names nobody is refused.A partner of a direct participant names its ISPB:To pay through one of its indirect participants, it sends its own ISPB in payerIspb and the indirect participant in indirectId.A partner of an indirect participant names its indirectId:A body field that takes one participant takes one value. Do not send a list in it.
5

Confirm that it works

Use the partner’s credential. Read one of the partner’s own payments, naming its own ISPB. The answer is 200:
For a partner of an indirect participant, send indirectId in place of ispb, with its own value.Send the same request with an ISPB outside the partner’s scope. The answer is 403 with PIX-0005. Send it with the ID of a payment of another participant. The answer is 404 with PIX-0147.

Routes that no partner reaches


A partner with a Pix JD scope is refused with 403 on these routes:
  • The directories that name no participant: GET /v1/banks, GET /v1/banks/participants, and GET /v1/refunds/reasons.
  • The composite QR code updates: PUT /v1/pix-automatico/composite/cobv/{id}, PUT /v1/pix-automatico/composite/dynamic/{id}, and PUT /v1/pix-automatico/composite/recurrence/{id}.
Use an application of your own institution for these routes.

If something fails


PIX-0005 does not say whether the permissions or the scope refused the request. This is on purpose: a partner cannot use a refusal to learn which participants exist outside its scope. For every other code, see the Pix JD error list. For the refusals when you create or change a partner, see Error codes in the API guide.