Back to All

Sending Requests using Compact JSON (Required)

(edited)

All requests in Sandbox and Production are sent using compact JSON.

You may find this notice one of the of the API Reference pages:

  • API examples are shown in a human-readable format for clarity. Actual API request bodies must use compact JSON.

When you sent a request to the TabaPay API without compact JSON, you should receive the error "EM":"JSON NOT PACKED".

API Requests with a request body like Create Transaction , Query Card , or Query Bank all require removing any whitespaces for a successful call.

Here is an example of Query Card with packed JSON.

Query Card - JSON Request

{"card":{"accountNumber":"4111111111111111","expirationDate":"202708","securityCode":"232"},"owner":{"name":{"first":"Test","last":"Name"},"address":{"line1":"123 Street","city":"San Francisco","state":"CA","zipcode":"94104","country":"840"}},"currency":"840","timeout":"39"}

Here is an example of Query Cad without packed JSON, and human-readable format for clarity.

{
    "card": {
        "accountNumber": "4111111111111111",
        "expirationDate": "202708",
        "securityCode": "232"
    },
    "owner": {
        "name": {
            "first": "Test",
            "last": "Name"
        },
        "address": {
            "line1": "123 Street",
            "city": "San Francisco",
            "state": "CA",
            "zipcode": "94104",
            "country": "840"
        }
    },
    "currency": "840",
    "timeout": "39"
}

Questions? Contact Sales or make a post