Skip to main content
POST
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

/payment-setting/ This endpoint is responsible for creating a new payment setting. Authorization:
  • Required role: user or higher
Method:
POST
Request Payload: Paystack side effect on BankWireTransfer settings: if the workspace has Paystack enabled, creating a BankWireTransfer setting triggers a live Paystack transfer-recipient resolution before the row is saved. Royalti first looks for a cached PaystackRecipientCode on another setting in the same workspace with a matching accountNumber/bankCode; if none exists, it calls Paystack to create a new transfer recipient and stores the returned code on settings.PaystackRecipientCode. For NGN accounts (settings.currency: NGN or settings.countryCode: NG), a failure to resolve or create the recipient makes the whole request fail with 400 — this is a live external-API call on an otherwise generic CRUD endpoint, not a background/best-effort step.

Request Body Examples

Bank Wire Transfer:
PayPal:

Code Examples

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Body

application/json
name
string
required

The name of the payment setting

type
enum<string>
required

The type of the payment setting

Available options:
BankWireTransfer,
PayPal,
Card,
Crypto
settings
object
required

The settings/configuration of the payment setting

isDefault
boolean
default:false

Indicates whether the payment setting is the default one

user
string

UserId of the user who created the payment setting, used when setting up payments settings for other used

memo
string

Any additional notes or comments about the payment setting

Response

Payment setting created successfully

status
string
message
string
paymentSetting
object