iotoms Docs

Create a payment mode

POST
/api/v1/transaction/paymodes

Adds a payment mode with a unique name, a display name, display order and status.

How to use it

  1. Send a unique name (e.g. CASH), a displayName, a sequence for display order and a status (defaults to ACTIVE).
  2. The payment mode is created (HTTP 201) and returned directly, without the status/message envelope.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Request Body

application/json
  1. body
id?|

Numeric payment mode ID. Set by the server.

Formatint64
name*string

Payment mode code, e.g. CASH or CARD. Required, unique and not blank.

displayName?|

Name shown to staff and on receipts.

sequence?|

Display order; lower numbers are shown first.

Formatint32
status*string

ACTIVE, INACTIVE, ARCHIVED or DELETED. Defaults to ACTIVE.

Value in"ACTIVE""INACTIVE""ARCHIVED""DELETED"
modifiedTime*string

Timestamp stored when the payment mode was created (ISO 8601). Updates do not change it.

Formatdate-time

Response Body

OK

*/*
  1. response
id?|

Numeric payment mode ID. Set by the server.

Formatint64
name*string

Payment mode code, e.g. CASH or CARD. Required, unique and not blank.

displayName?|

Name shown to staff and on receipts.

sequence?|

Display order; lower numbers are shown first.

Formatint32
status*string

ACTIVE, INACTIVE, ARCHIVED or DELETED. Defaults to ACTIVE.

Value in"ACTIVE""INACTIVE""ARCHIVED""DELETED"
modifiedTime*string

Timestamp stored when the payment mode was created (ISO 8601). Updates do not change it.

Formatdate-time
Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/transaction/paymodes' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "status": "ACTIVE",  "modifiedTime": "2019-08-24T14:15:22Z"}'
Example Response
{  "id": 0,  "name": "string",  "displayName": "string",  "sequence": 0,  "status": "ACTIVE",  "modifiedTime": "2019-08-24T14:15:22Z"}