Skip to main content

Transaction API

Regular transactions are started via the Rubean Pay UI but an additional Transaction API is also available.

Format

Our app expects a JSON with the following outer format:

{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"con": {
"type": "string",
"$comment": "Content of the inner payload. Mandatory field."
},
"com": {
"enum": ["zlib", "none"],
"default": "zlib",
"$comment": "Compression method for content. Can be left blank."
},
"enc": {
"enum": ["base64", "none"],
"default": "base64",
"$comment": "Encoding method for encoding. Can be left blank."
},
"typ": {
"enum": ["tran", "pers"],
"default": "tran",
"$comment": "Defines the type of the request. Either a transaction (default) or personalisation request."
}
},
"required": [
"con"
]
}

in the con (content) field the content with the following inner format is expected:

{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"type": {
"enum": ["payment", "refund"],
"default": "payment",
"$comment": "Type of transaction. Can be left blank."
},
"amount": {
"type": "string",
"$comment": "Amount of transaction. Mandatory field."
},
"currency": {
"type": "string",
"default": "EUR",
"$comment": "Currency of transaction. Can be left blank."
},
"reference": {
"type": "string",
"$comment": "Reference of transaction. Can be left blank."
},
"amountChangeable": {
"type": "boolean",
"default": false,
"$comment": "Defines if transaction amount can be changed in the Rubean Pay app by merchant. Can be left blank."
}
},
"required": [
"amount"
]
}
Optional fields

Please note the majority of the fields in the payload are optional.

A minimal JSON request for a 50€ payment request is done with these values:

{
"con": "..."
}
{
"amount": "50.00"
}

QR Code Transactions

We support the starting of transactions via QR codes. You can create and scan a QR code to quickly start a payment in Rubean Pay. A QR code generator for development has been created here: QR-Code-Generator