Payment Methods (Betaalmethoden)

Current version: 1.1.0

Create

POST /api2/betaalmethoden

Create a new payment method

Example request:

POST /api2/betaalmethoden HTTP/1.1
Host: demo.recras.nl
Accept: application/json

{
   "naam": "Cadeaubon",
}

Example response:

HTTP/1.1 201 Created
Content-Type: application/json
Location: /api2/betaalmethoden/5

{
   "id": 5,
   "naam": "Cadeaubon",
   "weergeven_in_kassa": false,
   "bevestiging_mailen": false,
   "type": "manual",
   "is_deletable": true,
   "ledger_number": null,
}
JSON Parameters:
  • naam (string) – Required Name of the payment method (naam means name)

  • weergeven_in_kassa (boolean) – Whether the payment method is visible in the Recras POS (kassa) or not (weergeven_in_kassa means display_in_pos)

  • bevestiging_mailen (boolean) – Whether a confirmation is emailed to the customer if a payment is made with this payment method (bevestiging_mailen means email_confirmation)

  • type (string) – “manual” for most payment methods, “accounting” for payments made through accounting software

  • is_deletable (boolean) – Can this payment method be deleted? This is the case if no payments have been made with it yet.

  • ledger_number (string) – Ledger number (grootboeknummer) to use with this payment method. May contain letters and numbers.

Response Headers:
  • Location – The location of the new payment method

Status Codes:

Read

GET /api2/betaalmethoden

The payment methods in Recras

Example request:

GET /api2/betaalmethoden HTTP/1.1
Host: demo.recras.nl
Accept: application/json

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

[
   {
      "id": 1,
      "naam": "iDeal",
      "weergeven_in_kassa": false,
      "bevestiging_mailen": true,
      "type": "manual",
      "is_deletable": false,
      "ledger_number": null,
   },
   {
      "id": 2,
      "naam": "Accounting software",
      "weergeven_in_kassa": true,
      "bevestiging_mailen": false,
      "type": "accounting",
      "is_deletable": false,
      "ledger_number": null,
   }
]
Request Headers:
Status Codes:
GET /betaalmethoden/(int: id)

A specific payment method

Example request:

GET /api2/betaalmethoden/1 HTTP/1.1
Host: demo.recras.nl
Accept: application/json

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
   "id": 1,
   "naam": "iDeal",
   "weergeven_in_kassa": false,
   "bevestiging_mailen": true,
   "type": "manual",
   "is_deletable": false,
   "ledger_number": null,
}
Request Headers:
Status Codes:

Update

PUT /api2/betaalmethoden/(int: id)

Example request:

PUT /api2/betaalmethoden/5 HTTP/1.1
Host: demo.recras.nl
Accept: application/json

{
   "id": 5
   "naam": "Creditcard",
   "weergeven_in_kassa": false,
   "bevestiging_mailen": true,
   "type": "manual",
   "is_deletable": false,
   "ledger_number": "1001",
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
   "id": 5,
   "naam": "Creditcard",
   "weergeven_in_kassa": false,
   "bevestiging_mailen": true,
   "type": "manual",
   "is_deletable": false,
   "ledger_number": "1001",
}
JSON Parameters:
  • id (int) – ID number, may not be changed

  • naam (string) – Name of the payment method (naam means name)

  • weergeven_in_kassa (boolean) – Whether the payment method is visible in the Recras POS (kassa) or not (weergeven_in_kassa means display_in_pos)

  • bevestiging_mailen (boolean) – Whether a confirmation is emailed to the customer if a payment is made with this payment method (bevestiging_mailen means email_confirmation)

  • type (string) – “manual” for most payment methods, “accounting” for payments made through accounting software

  • is_deletable (boolean) – Can this payment method be deleted? This is the case if no payments have been made with it yet.

  • ledger_number (string) – Ledger number (grootboeknummer) to use with this payment method. May contain letters and numbers.

Status Codes:

Delete

DELETE /api2/betaalmethoden/(int: id)

Example request:

DELETE /api2/betaalmethoden/5 HTTP/1.1
Host: demo.recras.nl

Example response:

HTTP/1.1 200 OK
Status Codes:
  • 200 OK – Payment method deleted

  • 403 Forbidden – User does not have the editBetaalmethode (editPaymentMethod) permission