Recipients-Post-v6

From Barion Documentation
Jump to navigation Jump to search

Barion API: POST v6/recipients

POST /v6/recipients

This is an API endpoint to create a new recipient with at most one payout method.

Prerequisites before use:

Authentication

Barion Wallet Authentication

Input properties

Property name Property type Limitations and constraints Description
Idempotency-Key GUID
  • Optional
Idempotency key used to safely retry requests without duplicating operations. Passed in the request header.

See Idempotency-Key.

<root> Object
  • Required
recipientType String
  • Required
  • Accepted values: individual or business
Type of the recipient.
companyName String
  • Required if recipientType is business
  • Maximum length: 100 characters
Name of the company.
firstName String
  • Required if recipientType is individual
  • Maximum length: 45 characters
First name of the recipient.
lastName String
  • Required if recipientType is individual
  • Maximum length: 45 characters
Last name of the recipient.
payoutMethod Object
  • Optional
Payout method to associate with the recipient at creation time. See the object.

Output properties

HTTP status code: 201 Created

Property name Property type Description
<root> Object
recipientId String Unique identifier of the newly created recipient. Format: rcp_<ordered-base64-ulid>.
payoutMethodId String Unique identifier of the newly created payout method. Format: pout_<ordered-base64-ulid>. null if no payout method was provided in the request.

To find out which errors this endpoint can produce, visit the Calling the API – Handling the response page. Note that this endpoint uses camelCase field names in error responses.

Possible error messages

Condition ErrorCode HTTP status code
Invalid input data ModelValidationError 400
Authentication fails 401