---
updatedAt: 2026-06-08T11:05:39.000Z
agentTools:
  projectIndex: https://developer.pay.nl/llms.txt
---

# Payout:Clearing

Create a new clearing based on the revenue group linked to the provided service.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "PAY. Global Management System API's",
    "description": "A restful journey to your payments.",
    "termsOfService": "https://www.pay.nl/en/terms-conditions",
    "contact": {
      "email": "support@pay.nl"
    },
    "version": "v2.0"
  },
  "servers": [
    {
      "url": "https://rest.pay.nl/v2",
      "description": "PAY. API server"
    }
  ],
  "paths": {
    "/payout/clearing": {
      "post": {
        "tags": [
          "Payout"
        ],
        "summary": "Payout:Clearing",
        "description": "Create a new clearing based on the revenue group linked to the provided service.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "transaction",
                  "payment"
                ],
                "properties": {
                  "transaction": {
                    "required": [
                      "type",
                      "serviceId",
                      "amount"
                    ],
                    "properties": {
                      "serviceId": {
                        "$ref": "#/components/schemas/Service/properties/id"
                      },
                      "description": {
                        "$ref": "#/components/schemas/Transaction/properties/description"
                      },
                      "reference": {
                        "$ref": "#/components/schemas/Transaction/properties/reference"
                      },
                      "exchangeUrl": {
                        "$ref": "#/components/schemas/Transaction/properties/exchangeUrl"
                      },
                      "amount": {
                        "$ref": "#/components/schemas/Amount"
                      }
                    },
                    "type": "object"
                  },
                  "stats": {
                    "$ref": "#/components/schemas/Stats"
                  }
                },
                "type": "object"
              },
              "examples": {
                "minimal": {
                  "$ref": "#/components/examples/PayoutClearingBasisRequest"
                },
                "maximum": {
                  "$ref": "#/components/examples/PayoutClearingExtendedRequest"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Clearing created",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "transaction": {
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/Transaction/properties/id"
                        },
                        "orderId": {
                          "$ref": "#/components/schemas/Transaction/properties/orderId"
                        },
                        "serviceId": {
                          "$ref": "#/components/schemas/Service/properties/id"
                        },
                        "description": {
                          "$ref": "#/components/schemas/Transaction/properties/description"
                        },
                        "reference": {
                          "$ref": "#/components/schemas/Transaction/properties/reference"
                        },
                        "amount": {
                          "$ref": "#/components/schemas/Amount"
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/Transaction/properties/created"
                        },
                        "modifiedAt": {
                          "$ref": "#/components/schemas/Transaction/properties/modified"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                },
                "examples": {
                  "success": {
                    "$ref": "#/components/examples/PayoutResponse201Successful"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request, see response body for more information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "badRequest": {
                    "$ref": "#/components/examples/PayoutResponse400BadRequest"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "406": {
            "$ref": "#/components/responses/NotAcceptable"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMedia"
          },
          "422": {
            "description": "Unprocessable entity, see response body for more information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "invalidRevenueGroup": {
                    "$ref": "#/components/examples/PayoutClearingRevenueGroupNotLinkedToBankAccountResponse"
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimiting"
          },
          "500": {
            "description": "An internal error occurred"
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Amount": {
        "required": [
          "value"
        ],
        "properties": {
          "value": {
            "description": "The amount in cents.",
            "type": "integer",
            "minimum": 1,
            "example": 10
          },
          "currency": {
            "description": "The currency in ISO-4217 format.",
            "type": "string",
            "example": "EUR"
          }
        },
        "type": "object"
      },
      "Service": {
        "properties": {
          "id": {
            "description": "The ID of your service. You can find the service ID in the portal.",
            "type": "string",
            "example": "SL-####-####"
          },
          "name": {
            "description": "The name of your service.",
            "type": "string",
            "example": "My first service!"
          },
          "description": {
            "description": "The description of the service.",
            "type": "string"
          },
          "testMode": {
            "description": "Indicates if the service is in testmode or not, possible values: false or true",
            "type": "integer"
          },
          "secret": {
            "description": "The unique reference for this service.",
            "type": "string",
            "example": "bade123abf124124abefa311b"
          },
          "createdAt": {
            "$ref": "#/components/schemas/Universal/properties/createdAt"
          }
        },
        "type": "object"
      },
      "Stats": {
        "properties": {
          "info": {
            "description": "The used info code which can be tracked in the stats.",
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "example": "Campagne 99"
          },
          "tool": {
            "description": "The used tool code which can be tracked in the stats.",
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "example": "Google"
          },
          "object": {
            "description": "The object which can be tracked in stats.",
            "type": "string",
            "maxLength": 64,
            "minLength": 1
          },
          "extra1": {
            "description": "The first free value which can be tracked in the stats.",
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "example": "Customer 6985615"
          },
          "extra2": {
            "description": "The second free value which can be tracked in the stats.",
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "example": "Invoice 21.3695"
          },
          "extra3": {
            "description": "The third free value which can be tracked in the stats.",
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "example": "Shop Amsterdam"
          },
          "domainId": {
            "description": "The ID of the duplicate content URL",
            "type": "string",
            "example": "WU-####-####"
          }
        },
        "type": "object"
      },
      "Error": {
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "violations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Violation"
            }
          }
        },
        "type": "object"
      },
      "Transaction": {
        "required": [
          "serviceId",
          "amount",
          "returnUrl"
        ],
        "properties": {
          "id": {
            "description": "The Id of the transaction.",
            "type": "string",
            "example": "EX-1234-1234-1234"
          },
          "serviceId": {
            "$ref": "#/components/schemas/Service/properties/id"
          },
          "description": {
            "description": "Is shown on the statement of the payer.",
            "type": "string",
            "maxLength": 32,
            "minLength": 1,
            "example": "Example description."
          },
          "reference": {
            "description": "The merchant identification of this transaction. This field only allows alphanumeric characters",
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^[a-zA-Z0-9]{1,64}$",
            "example": "12345XXY0123"
          },
          "manualTransferCode": {
            "description": "Payment reference used to identify manual bank transfers",
            "type": "string",
            "example": "0000 0000 0000 0000"
          },
          "orderId": {
            "description": "The orderId of the transaction.",
            "type": "string",
            "example": "0000000000X00000"
          },
          "ipAddress": {
            "description": "An ip address",
            "type": "string",
            "example": "213.126.82.230"
          },
          "exchangeUrl": {
            "description": "The URL where we exchange the status of a transaction.",
            "type": "string",
            "format": "uri",
            "example": "https://demo.pay.nl/exchange.php"
          },
          "returnUrl": {
            "description": "The URL where the payer has to be send to after the payment.",
            "type": "string",
            "format": "uri",
            "example": "https://demo.pay.nl/complete/"
          },
          "paymentUrl": {
            "description": "The payment URL for this transaction",
            "type": "string",
            "format": "uri"
          },
          "amount": {
            "$ref": "#/components/schemas/Amount"
          },
          "expire": {
            "description": "Expire date in the correct ISO-8601 (a.k.a. ATOM) notation.",
            "type": "string",
            "format": "date-time",
            "example": "2016-06-04T08:15:00+01:00"
          },
          "created": {
            "description": "The date at which this entity was created presented in the correct ISO-8601 (a.k.a. ATOM) notation.",
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "example": "2016-06-04T08:15:00+01:00"
          },
          "modified": {
            "description": "The date at which this entity was modified presented in the correct ISO-8601 (a.k.a. ATOM) notation.",
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "example": "2016-06-04T08:15:00+01:00"
          },
          "amountConverted": {
            "$ref": "#/components/schemas/Amount"
          },
          "amountPaid": {
            "$ref": "#/components/schemas/Amount"
          },
          "amountRefunded": {
            "$ref": "#/components/schemas/Amount"
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/PaymentMethod"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "integration": {
            "$ref": "#/components/schemas/Integration"
          },
          "customer": {
            "$ref": "#/components/schemas/Customer"
          },
          "order": {
            "$ref": "#/components/schemas/Order"
          },
          "stats": {
            "$ref": "#/components/schemas/Stats"
          },
          "type": {
            "description": "Defines the type of the transaction. Possible values are: CIT = Customer initiated simple e-com transaction, MIT = Merchant initiated transaction, MOTO = Customer initiated payment where card number entered manually, POS = Point of sale, ECOM",
            "type": "string",
            "enum": [
              "POS",
              "ECOM",
              "CIT",
              "MIT",
              "MOTO"
            ]
          },
          "transferData": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransferData"
            },
            "xml": {
              "name": "transferData",
              "wrapped": true
            }
          }
        },
        "type": "object",
        "xml": {
          "name": "transaction"
        }
      },
      "Violation": {
        "properties": {
          "propertyPath": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Unauthorized. Supplied credentials are invalid"
      },
      "Forbidden": {
        "description": "Forbidden. Supplied credentials have no rights"
      },
      "NotFound": {
        "description": "Not found"
      },
      "MethodNotAllowed": {
        "description": "Used HTTP method is not allowed"
      },
      "NotAcceptable": {
        "description": "Not acceptable. The supplied content type in the accept parameter in the header is not supported"
      },
      "UnsupportedMedia": {
        "description": "Unsupported media. The supplied content type in the content-type parameter in the header is not supported"
      },
      "RateLimiting": {
        "description": "Rate limit reached."
      }
    },
    "examples": {
      "PayoutClearingBasisRequest": {
        "summary": "Basic Payout clearing example",
        "value": {
          "transaction": {
            "serviceId": "SL-####-####",
            "amount": {
              "value": 10
            }
          }
        }
      },
      "PayoutClearingExtendedRequest": {
        "summary": "Extended Payout clearing example",
        "value": {
          "transaction": {
            "serviceId": "SL-####-####",
            "description": "Example description",
            "reference": "12345XXY0123",
            "exchangeUrl": "https://demo.pay.nl/exchange.php",
            "amount": {
              "value": 10,
              "currency": "EUR"
            }
          },
          "stats": {
            "info": "Campagne 99",
            "tool": "Google",
            "extra1": "Customer 6985615",
            "extra2": "Invoice 21.3695",
            "extra3": "Shop Amsterdam"
          }
        }
      },
      "PayoutResponse201Successful": {
        "summary": "Payout created",
        "value": {
          "transaction": {
            "id": "EX-####-####-####",
            "orderId": "#########X#####",
            "serviceId": "SL-####-####",
            "description": "Example description",
            "reference": "12345XXY0123",
            "amount": {
              "value": 10,
              "currency": "EUR"
            },
            "created": "2016-06-04T08:15:00+01:00",
            "modified": "2016-06-04T08:15:00+01:00"
          },
          "_links": [
            {
              "href": "/payout",
              "rel": "self",
              "type": "POST"
            },
            {
              "href": "/transactions/EX-####-####-####",
              "rel": "details",
              "type": "GET"
            }
          ]
        }
      },
      "PayoutResponse400BadRequest": {
        "summary": "Bad request",
        "value": {
          "type": "https://developer.pay.nl/docs/error-codes",
          "title": "An error occurred",
          "detail": "transaction.serviceId: Unable to find service location\ntransaction.amount.value: You have entered an invalid amount",
          "violations": [
            {
              "propertyPath": "transaction.serviceId",
              "message": "Unable to find service location",
              "code": "PAY-2852"
            },
            {
              "propertyPath": "transaction.amount.value",
              "message": "You have entered an invalid amount",
              "code": "PAY-2803"
            }
          ]
        }
      },
      "PayoutClearingRevenueGroupNotLinkedToBankAccountResponse": {
        "summary": "Unprocessable entity",
        "value": {
          "type": "https:\\/\\/developer.pay.nl\\/docs\\/error-codes",
          "title": "An error occurred",
          "detail": "Revenue group is not linked to a bank account.",
          "violations": [
            {
              "propertyPath": null,
              "message": "Revenue group is not linked to a bank account.",
              "code": "PAY-3000"
            }
          ]
        }
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "tags": [
    {
      "name": "Payout",
      "description": ""
    }
  ],
  "externalDocs": {
    "description": "Official PAY. documentation",
    "url": "https://docs.pay.nl"
  }
}
```