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)
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
| Name | Type | Notes |
|---|---|---|
name | string | Optional. Filter by integration name. |
Example request
Example response
Response fields
| Field | Type | Description |
|---|---|---|
id | string | Integration ID. Use this as integrationId when creating orders. |
userId | string | Your user ID. |
name | string | Integration name (e.g. your shop name). |
psp | string | Payment service provider (default: "nopayn"). |
pspProjectId | string | null | PSP project identifier (if applicable). |
returnUrl | string | URL to redirect customers after successful payment. |
failureUrl | string | null | URL to redirect after failed/cancelled payment. |
merchantWebhookUrl | string | null | Per-integration webhook URL for payment status updates. |
contactUrl | string | null | URL to your contact form. Shown on the block page when a customer is blocked by fraud protection. |
createdAt | string | ISO 8601 timestamp. |
updatedAt | string | null | ISO 8601 timestamp of last update. |
Create Integration
Endpoint
POST /api/fiat/integrations
Creates a new fiat integration.
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | A name for this integration. |
returnUrl | string | Yes | Must be a valid http or https URL. |
failureUrl | string | No | Must be a valid http or https URL. |
merchantWebhookUrl | string | No | Must be a valid http or https URL. |
contactUrl | string | No | Must be a valid http or https URL. Shown on the fraud block page. |
psp | string | No | Defaults to "nopayn". |
pspProjectId | string | No | PSP 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
| Name | Type | Notes |
|---|---|---|
id | string | The integration ID. |
Request body
All fields are optional. Only included fields are updated.| Field | Type | Notes |
|---|---|---|
name | string | Cannot be empty. |
returnUrl | string | Cannot be null. Must be a valid URL. |
failureUrl | string | null | Set to null to remove. |
merchantWebhookUrl | string | null | Set to null to remove. |
contactUrl | string | null | Set to null to remove the contact button from the block page. |
psp | string | Cannot be empty. |
pspProjectId | string | null | Set 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
| Name | Type | Notes |
|---|---|---|
id | string | The integration ID. |
Example request
Example response
Error Responses
Invalid URL (400)
Returned when a URL field is not a validhttp or https URL.