Payment Methods (Betaalmethoden) ================================ Current version: 1.1.0 Create ------ .. http:post:: /api2/betaalmethoden Create a new payment method **Example request**: .. sourcecode:: http POST /api2/betaalmethoden HTTP/1.1 Host: demo.recras.nl Accept: application/json { "naam": "Cadeaubon", } **Example response**: .. sourcecode:: http 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 string naam: **Required** Name of the payment method (`naam` means name) :json boolean weergeven_in_kassa: Whether the payment method is visible in the Recras POS (`kassa`) or not (`weergeven_in_kassa` means display_in_pos) :json boolean bevestiging_mailen: Whether a confirmation is emailed to the customer if a payment is made with this payment method (`bevestiging_mailen` means email_confirmation) :json string type: "manual" for most payment methods, "accounting" for payments made through accounting software :json boolean is_deletable: Can this payment method be deleted? This is the case if no payments have been made with it yet. :json string ledger_number: Ledger number (`grootboeknummer`) to use with this payment method. May contain letters and numbers. :resheader Location: The location of the new payment method :statuscode 201: Payment method created :statuscode 406: Error in the input :statuscode 403: User does not have the ``editBetaalmethode`` (editPaymentMethod) permission Read ---- .. http:get:: /api2/betaalmethoden The payment methods in Recras **Example request**: .. sourcecode:: http GET /api2/betaalmethoden HTTP/1.1 Host: demo.recras.nl Accept: application/json **Example response**: .. sourcecode:: http 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, } ] :reqheader Authorization: mandatory Basic authentication :statuscode 200: no error .. http:get:: /betaalmethoden/(int:id) A specific payment method **Example request**: .. sourcecode:: http GET /api2/betaalmethoden/1 HTTP/1.1 Host: demo.recras.nl Accept: application/json **Example response**: .. sourcecode:: http 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, } :reqheader Authorization: mandatory Basic authentication :statuscode 200: OK :statuscode 404: No payment method with this ``id`` Update ------ .. http:put:: /api2/betaalmethoden/(int:id) **Example request**: .. sourcecode:: http 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**: .. sourcecode:: http 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 int id: ID number, may not be changed :json string naam: Name of the payment method (`naam` means name) :json boolean weergeven_in_kassa: Whether the payment method is visible in the Recras POS (`kassa`) or not (`weergeven_in_kassa` means display_in_pos) :json boolean bevestiging_mailen: Whether a confirmation is emailed to the customer if a payment is made with this payment method (`bevestiging_mailen` means email_confirmation) :json string type: "manual" for most payment methods, "accounting" for payments made through accounting software :json boolean is_deletable: Can this payment method be deleted? This is the case if no payments have been made with it yet. :json string ledger_number: Ledger number (`grootboeknummer`) to use with this payment method. May contain letters and numbers. :statuscode 200: Payment method updated :statuscode 406: Error in the input :statuscode 403: User does not have the ``editBetaalmethode`` (editPaymentMethod) permission Delete ------ .. http:delete:: /api2/betaalmethoden/(int:id) **Example request**: .. sourcecode:: http DELETE /api2/betaalmethoden/5 HTTP/1.1 Host: demo.recras.nl **Example response**: .. sourcecode:: http HTTP/1.1 200 OK :statuscode 200: Payment method deleted :statuscode 403: User does not have the ``editBetaalmethode`` (editPaymentMethod) permission