Mandates

Update Subscription

Freeze or unfreeze a mandate, or update the instalment amount for future collections

Freeze or unfreeze a mandate, and/or update the instalment amount for all future collections.

Endpoint

POST /api/mandates/{mandate_id}/subscription

Authentication: Required (API Key)

Description

Use this endpoint to pause collections on a mandate by freezing it, to resume collections by unfreezing it, or to change the amount collected on future instalments. At least one of pause_collection or amount must be provided.

Parameters

Path Parameters

ParameterTypeRequiredDescription
mandate_idintegerYesThe NjiaPay internal mandate ID

Body Parameters

ParameterTypeRequiredDescription
pause_collectionbooleanNotrue to freeze the mandate (stops all future collections), false to unfreeze. Omit to leave unchanged.
amountintegerNoNew instalment amount in minor units applied to all future collections. Omit to leave unchanged.
At least one of pause_collection or amount must be set in the request body.

Example Requests

curl -X POST "https://api.njiapay.com/api/mandates/42/subscription" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pause_collection": true}'

Response

Success (200 OK)

{
  "frozen": true,
  "instalment_amount": null
}
FieldTypeDescription
frozenboolean | nulltrue = mandate frozen; false = mandate unfrozen; null = freeze state unchanged. When frozen, no instalments are collected.
instalment_amountnumber | nullUpdated instalment amount in minor units. May differ from instalment_amount on the mandate object as it reflects the provider's confirmed value. null if not changed.

Error Responses

403 Forbidden

{
  "detail": "Mandate does not belong to this merchant"
}

404 Not Found

{
  "detail": "No active mandate found for this reference_id"
}

422 Validation Error

{
  "detail": "Either pause_collection or amount must be set"
}

Causes:

  • Neither pause_collection nor amount was provided in the request body

502 Bad Gateway

{
  "detail": "Mandate subscription update failed at payment provider"
}

Causes:

  • The payment provider returned an error or is unreachable