Skip to main content

Fiat Payment Settings

These endpoints let you read and update your default service-fee payer for fiat (card) payments. This setting is used as the default for fiat checkout flows when serviceFeePayer is not explicitly provided per order. You can represent the same setting in two UI-friendly ways:
  • serviceFeePayerDefault: "customer" or "merchant"
  • customerPaysServiceFee: true or false

Endpoints

  • GET /api/fiat/settings
  • PATCH /api/fiat/settings
These endpoints are protected. You must be authenticated.

Base URL

All examples use:
  • https://www.niftipay.com

Authentication

These endpoints support two authentication methods: Send your API key in the x-api-key header.
If you are authenticated via the dashboard.

Get Fiat Settings

Endpoint

GET /api/fiat/settings Returns your current fiat settings.

Response fields

FieldTypeNotes
serviceFeePayerDefaultstring"customer" or "merchant".
customerPaysServiceFeebooleanConvenience boolean for UI toggle. true means customer pays.

Example request

Example response (customer pays by default)

Example response (merchant pays by default)


Update Fiat Settings

Endpoint

PATCH /api/fiat/settings Updates your default fiat service-fee payer.

You can send either payload format

Option A — explicit enum

or

Option B — boolean toggle (UI friendly)

or
true maps to "customer" and false maps to "merchant".

Example: set default to customer pays

Example response


Example: set default to merchant pays (using boolean)

Example response


Error responses

Invalid JSON (400)

If the request body is not valid JSON:

Invalid payload (400)

If you don’t provide a valid payer using one of the supported formats:
Examples that will fail:
  • { "serviceFeePayerDefault": "user" }
  • { "customerPaysServiceFee": "sometimes" }
  • {}

Missing migration/table (500)

This route requires the fiat settings table to exist for writes. If the userFiatSetting table is missing, PATCH returns:

Generic write failure (500)

If a database write fails, you’ll get:
(or a more specific database error message).