Skip to main content
POST
/
payment-setting
curl --request POST \
--url https://server26-dot-royalti-project.uc.r.appspot.com/payment-setting \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Primary Bank Account",
"type": "BankWireTransfer",
"settings": {
"bankName": "Bank of Example",
"accountNumber": "123456789",
"bankCode": "987654",
"country": "USA",
"countryCode": "US",
"currency": "USD"
},
"isDefault": true,
"memo": "Main operational account"
}'
{
  "status": "success",
  "message": "Payment setting created successfully",
  "paymentSetting": {
    "id": "24d2c371-4a7a-4acd-b4aa-d3eb3bebd8fa",
    "name": "Primary Bank Account",
    "type": "BankWireTransfer",
    "settings": {
      "bankName": "Bank of Example",
      "accountNumber": "123456789",
      "bankCode": "987654",
      "country": "USA",
      "countryCode": "US",
      "currency": "USD"
    },
    "isDefault": true,
    "memo": "Main operational account",
    "createdAt": "2023-11-22T20:48:36.034Z",
    "updatedAt": "2023-11-22T20:48:36.034Z"
  }
}
/payment-setting/ This endpoint is responsible for creating a new payment setting. Method:
POST
Request Payload:
FieldTypeRequiredDescription
namestringYesThe name of the payment setting
typestringYesThe type of the payment setting
settingsobjectYesThe settings/configuration of the payment setting. Some of the sample properties are “accountName”, “accountNumber”, “bankName”, “routingNumber”, “swiftCode”, “IBAN”, indicating details related to the payment method configuration
isDefaultbooleanNoIndicates whether the payment setting is the default one
memostringNoAny additional notes or comments about the payment setting

Request Body Examples

Bank Wire Transfer:
{
  "name": "Primary Bank Account",
  "type": "BankWireTransfer",
  "settings": {
    "bankName": "Bank of Example",
    "accountNumber": "123456789",
    "bankCode": "987654",
    "country": "USA",
    "countryCode": "US",
    "currency": "USD"
  },
  "isDefault": true,
  "memo": "Main operational account"
}
PayPal:
{
  "name": "Primary PayPal Account",
  "type": "PayPal",
  "settings": {
    "paypalEmail": "example@paypal.com",
    "country": "USA",
    "countryCode": "US",
    "currency": "USD"
  },
  "isDefault": true,
  "memo": "Main PayPal account"
}

Authentication

This endpoint requires authentication. Include your bearer token in the Authorization header.

Request Body

Request Schema

FieldTypeRequiredDescription
namestringThe name of the payment setting
typestringThe type of the payment setting
settingsobjectThe settings/configuration of the payment setting
isDefaultbooleanIndicates whether the payment setting is the default one
memostringAny additional notes or comments about the payment setting

Responses

✅ 201 - Payment setting created successfully

⚠️ 400 - Bad Request - Invalid data

⚠️ 401 - Unauthorized

❌ 500 - Internal Server Error

Tags

Payment Settings

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

memo
string

Any additional notes or comments about the payment setting

Response

Payment setting created successfully

status
string
message
string
paymentSetting
object
I