Fiscalisation for Online Sales (Beta)
Sign and fiscalize receipts for Merchants and ISV/Resellers.
Available for Merchants and ISV Partners
Merchant
Signs (fiscalizes) a receipt for the authenticated merchant. Requires the AllowFiscalization role.
post
/fiscalization/v1/receipts:sign
Authorization
Authenticate using OAuth2 with a Bearer token. Pass the token in the request header:
Authorization: Bearer {access_token}
The
AllowFiscalization role must be enabled on the account. Contact Viva to request access.
Environments
| Environment | URL |
|---|---|
| Production | https://api.vivapayments.com/fiscalization/v1/receipts:sign |
| Demo | https://demo-api.vivapayments.com/fiscalization/v1/receipts:sign |
Request body
| Field | Type | Description |
|---|---|---|
| cbArea | string | |
| cbUser | object or null | |
| sessionId | string <uuid> | |
| cbCustomer | object or null | |
| ftReceiptCase | integer <int64> | |
| ftPosSystemId | string or null <uuid> | Uniquely identifies the software version of the ECR. |
| currencyCode | string | |
| cbReceiptAmount | integer <int64> | |
| ftReceiptCaseData | object or null | |
| cbReceiptReference | string | |
| cbReceiptMoment | string <date-time> | |
| cbPreviousReceiptReference | object or null | |
| cbPayItems | Array of objects (FiscalizationPayItem) | |
| cbChargeItems | Array of objects (FiscalizationChargeItem) |
cbPayItems — each object in the array
| Field | Type | Description |
|---|---|---|
| amount | integer <int64> | |
| position | integer <int32> | |
| ftPayItemCase | integer <int64> | |
| description | string | |
| currencyCode | string | |
| transactionId | string or null <uuid> | |
| moment | string <date-time> |
cbChargeItems — each object in the array
| Field | Type | Description |
|---|---|---|
| amount | integer <int64> | The total amount of the line (price * quantity). |
| unit | string | Unit of measurement. |
| position | integer <int32> | |
| vatRate | integer <int64> | |
| quantity | integer <int64> | |
| unitPrice | integer or null <int64> | The price of a single unit. |
| vatAmount | integer <int64> | |
| unitQuantity | integer or null <int64> | |
| description | string | |
| currencyCode | string | |
| ftChargeItemCase | integer <int64> | |
| productNumber | string | |
| productBarcode | string | |
| moment | string <date-time> |
Request sample
{
"cbArea": "string",
"cbUser": {},
"sessionId": "f6567dd8-e069-418e-8893-7d22fcf12459",
"cbCustomer": {},
"ftReceiptCase": 0,
"ftPosSystemId": "4e346151-cb51-4234-96cb-7c347bfe05d1",
"currencyCode": "string",
"cbReceiptAmount": 0,
"ftReceiptCaseData": {},
"cbReceiptReference": "string",
"cbReceiptMoment": "2019-08-24T14:15:22Z",
"cbPreviousReceiptReference": {},
"cbPayItems": [
{
"amount": 0,
"position": 0,
"ftPayItemCase": 0,
"description": "string",
"currencyCode": "string",
"transactionId": "75906707-8c31-479c-b354-aa805c4cefbc",
"moment": "2019-08-24T14:15:22Z"
}
],
"cbChargeItems": [
{
"amount": 0,
"unit": "string",
"position": 0,
"vatRate": 0,
"quantity": 0,
"unitPrice": 0,
"vatAmount": 0,
"unitQuantity": 0,
"description": "string",
"currencyCode": "string",
"ftChargeItemCase": 0,
"productNumber": "string",
"productBarcode": "string",
"moment": "2019-08-24T14:15:22Z"
}
]
}Response sample
{
"ftState": 0,
"ftStateData": {},
"ftReceiptIdentification": "string",
"ftCashBoxIdentification": "string",
"ftSignatures": [{}],
"transmissionIndicator": 0
}ISV / Reseller
Signs (fiscalizes) a receipt on behalf of a merchant, for ISV/reseller callers.
post
/fiscalization/v1/isv/receipts:sign?merchantId={merchantId}
Authorization
Authenticate using OAuth2 with a Bearer token. Pass the token in the request header:
Authorization: Bearer {access_token}
The
AllowFiscalization role must be enabled on the account. Contact Viva to request access.
Environments
| Environment | URL |
|---|---|
| Production | https://api.vivapayments.com/fiscalization/v1/isv/receipts:sign |
| Demo | https://demo-api.vivapayments.com/fiscalization/v1/isv/receipts:sign |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| merchantId | string <uuid> | required | The merchant on whose behalf the receipt is signed. |
Request body
| Field | Type | Description |
|---|---|---|
| cbArea | string | |
| cbUser | object or null | |
| sessionId | string <uuid> | |
| cbCustomer | object or null | |
| ftReceiptCase | integer <int64> | |
| ftPosSystemId | string or null <uuid> | Uniquely identifies the software version of the ECR. |
| currencyCode | string | |
| cbReceiptAmount | integer <int64> | |
| ftReceiptCaseData | object or null | |
| cbReceiptReference | string | |
| cbReceiptMoment | string <date-time> | |
| cbPreviousReceiptReference | object or null | |
| cbPayItems | Array of objects (FiscalizationPayItem) | |
| cbChargeItems | Array of objects (FiscalizationChargeItem) |
cbPayItems — each object in the array
| Field | Type | Description |
|---|---|---|
| amount | integer <int64> | |
| position | integer <int32> | |
| ftPayItemCase | integer <int64> | |
| description | string | |
| currencyCode | string | |
| transactionId | string or null <uuid> | |
| moment | string <date-time> |
cbChargeItems — each object in the array
| Field | Type | Description |
|---|---|---|
| amount | integer <int64> | The total amount of the line (price * quantity). |
| unit | string | Unit of measurement. |
| position | integer <int32> | |
| vatRate | integer <int64> | |
| quantity | integer <int64> | |
| unitPrice | integer or null <int64> | The price of a single unit. |
| vatAmount | integer <int64> | |
| unitQuantity | integer or null <int64> | |
| description | string | |
| currencyCode | string | |
| ftChargeItemCase | integer <int64> | |
| productNumber | string | |
| productBarcode | string | |
| moment | string <date-time> |
Request sample
{
"cbArea": "string",
"cbUser": {},
"sessionId": "f6567dd8-e069-418e-8893-7d22fcf12459",
"cbCustomer": {},
"ftReceiptCase": 0,
"ftPosSystemId": "4e346151-cb51-4234-96cb-7c347bfe05d1",
"currencyCode": "string",
"cbReceiptAmount": 0,
"ftReceiptCaseData": {},
"cbReceiptReference": "string",
"cbReceiptMoment": "2019-08-24T14:15:22Z",
"cbPreviousReceiptReference": {},
"cbPayItems": [
{
"amount": 0,
"position": 0,
"ftPayItemCase": 0,
"description": "string",
"currencyCode": "string",
"transactionId": "75906707-8c31-479c-b354-aa805c4cefbc",
"moment": "2019-08-24T14:15:22Z"
}
],
"cbChargeItems": [
{
"amount": 0,
"unit": "string",
"position": 0,
"vatRate": 0,
"quantity": 0,
"unitPrice": 0,
"vatAmount": 0,
"unitQuantity": 0,
"description": "string",
"currencyCode": "string",
"ftChargeItemCase": 0,
"productNumber": "string",
"productBarcode": "string",
"moment": "2019-08-24T14:15:22Z"
}
]
}Response sample
{
"ftState": 0,
"ftStateData": {},
"ftReceiptIdentification": "string",
"ftCashBoxIdentification": "string",
"ftSignatures": [{}],
"transmissionIndicator": 0
}