Skip to main content

Fiat Integrations

A fiat integration is the configuration that connects your application to Niftipay’s card payment system. Each integration defines:
  • Return URL — where to redirect the customer after payment
  • Failure URL — where to redirect after a failed or cancelled payment (optional)
  • Merchant Webhook URL — where Niftipay sends payment status updates (optional, can also use the global webhook system)
  • Contact URL — a link to your contact form, shown to customers on the fraud block page (optional)
You reference your integration’s id as integrationId when creating fiat orders.

Base URL

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

Authentication

All endpoints require API key (x-api-key header) or session authentication.

List Integrations

Endpoint

GET /api/fiat/integrations Returns all fiat integrations for the authenticated user.

Query parameters

NameTypeNotes
namestringOptional. Filter by integration name.

Example request

Example response

Response fields

FieldTypeDescription
idstringIntegration ID. Use this as integrationId when creating orders.
userIdstringYour user ID.
namestringIntegration name (e.g. your shop name).
pspstringPayment service provider (default: "nopayn").
pspProjectIdstring | nullPSP project identifier (if applicable).
returnUrlstringURL to redirect customers after successful payment.
failureUrlstring | nullURL to redirect after failed/cancelled payment.
merchantWebhookUrlstring | nullPer-integration webhook URL for payment status updates.
contactUrlstring | nullURL to your contact form. Shown on the block page when a customer is blocked by fraud protection.
createdAtstringISO 8601 timestamp.
updatedAtstring | nullISO 8601 timestamp of last update.

Create Integration

Endpoint

POST /api/fiat/integrations Creates a new fiat integration.

Request body

FieldTypeRequiredNotes
namestringYesA name for this integration.
returnUrlstringYesMust be a valid http or https URL.
failureUrlstringNoMust be a valid http or https URL.
merchantWebhookUrlstringNoMust be a valid http or https URL.
contactUrlstringNoMust be a valid http or https URL. Shown on the fraud block page.
pspstringNoDefaults to "nopayn".
pspProjectIdstringNoPSP project ID if applicable.

Example request

Example response


Update Integration

Endpoint

PATCH /api/fiat/integrations/:id Updates an existing fiat integration. Only include the fields you want to change. Set a field to null to clear it.

Path parameters

NameTypeNotes
idstringThe integration ID.

Request body

All fields are optional. Only included fields are updated.
FieldTypeNotes
namestringCannot be empty.
returnUrlstringCannot be null. Must be a valid URL.
failureUrlstring | nullSet to null to remove.
merchantWebhookUrlstring | nullSet to null to remove.
contactUrlstring | nullSet to null to remove the contact button from the block page.
pspstringCannot be empty.
pspProjectIdstring | nullSet to null to remove.

Example: add a contact URL

Example: remove a contact URL

Example response


Delete Integration

Endpoint

DELETE /api/fiat/integrations/:id Deletes an integration. Any fiat orders linked to this integration will have their integrationId set to null.

Path parameters

NameTypeNotes
idstringThe integration ID.

Example request

Example response


Error Responses

Invalid URL (400)

Returned when a URL field is not a valid http or https URL.

Missing required field (400)

Not found (404)

Returned when the integration ID does not exist or does not belong to your account.