Start/Stop a Subscription

This endpoint allows merchants to start or stop a subscription for an order.

POST/subscription/

This endpoint allows merchants to start or stop a subscription for an order.

Body application/json

requestobject
Show request properties
merchant_idintegerrequired

A unique identifier assigned to the merchant by Fondy upon account registration. This ID is required for authenticating requests and associating transactions with the merchant’s account.

order_idstringrequired

A unique identifier for the order. This can be any value defined by the merchant, allowing you to use any internal order identification system your business employs.

action"start" | "stop"required

Specifies the action to perform on the subscription. Use start to resume a subscription, enabling scheduled payments, or stop to cancel the subscription, preventing future payments.

signaturestringrequired

Signature for request verification, generated according to Fondy’s algorithm. Required to verify merchant request consistency and authenticity. Learn how to use Fondy’s algorithm at the Signature Generation for Request and Response page.

Response

Successful Response

responseobject
Show response properties
response_status"success" | "failure"

Indicates whether the request was processed successfully or failed validation. Returns success if the action was completed successfully, otherwise failure.

statusstring

Provides a descriptive message about the outcome of the action, such as confirming the subscription was stopped or started successfully.

error_messagestring

Detailed description of the error, explaining why the request failed. This field is only populated when response_status is failure.

error_codeinteger

Numeric code representing the specific error that occurred. This field is only populated when response_status is failure.

Request
curl -X POST "https://pay.fondy.eu/api/subscription/" \
  -H "Content-Type: application/json" \
  -d '{
  "request": {
    "merchant_id": 1,
    "order_id": "ORDER_12345678",
    "action": "stop",
    "signature": "1773cf135bd89656131134b98637894dad42f808"
  }
}'
Response
{
  "response": {
    "response_status": "success",
    "status": "Subscription stopped successfully",
    "error_message": "Invalid signature",
    "error_code": 2032
  }
}