📑 The transaction results in a PDF report.

You can get a PDF report of the transaction results by making an API call using Fetch a Transaction by specifying pdf as the path parameter. Simply change the format path parameter to pdf. For example:

curl --request GET \
     --url https://penateam.api.au.idkit.com/v1/transactions/transaction_id/pdf \
     --header 'accept: application/json'

🚧

Note:

PDF response will be available only for completed transactions. Not for terminated, canceled, and in-progress ones.

Fetch a Transaction - PDF Success

You will get the following successful response when a PDF report has been generated:

{
    "transaction_id": "01FX6X3YH457RNDE0G2WMBGLOE",
    "status": "COMPLETE",
    "created_at": "2022-06-09T01:34:01.434Z",
    "flow_type": "NORMAL2",
    "pdf_binary_base64": "binary_base64_url"
}

Every field in the response has been explained in the following table.

FieldsData TypeMandatory/OptionalDescription
transaction_idStringMandatoryThe transaction ID, generated from the Create a Transaction endpoint.
statusStringMandatoryThe current transaction status. The value can be either PENDING, INPROGRESS, SUBMITTED, COMPLETE, EXPIRED, or CANCELLED.
created_atTimestampMandatoryThe UTC timestamp that declares the time the transaction was created at.
flow_typeStringMandatoryThe type of transaction data flow for mobile set by the user.
pdf_binary_base64StringMandatoryThe generated binary base64 PDF. Users can decode it to obtain the PDF binary file.

Last but not least, convert the binary Base64 URL into PDF using any online converter tool.

The converted PDF report you will get is shown below:

Fetch a Transaction - PDF Error

The following response is generated if the server cannot understand the request due to invalid syntax:

{
  "error_message": "Bad Request."
}

If an invalid or expired access token is used, the following error response will appear:

{
  "error_message": "Unauthenticated."
}

If an incorrect transaction ID is used to fetch the results, the following error response will appear:

{
  "error_message": "The token was not found."
}

The server generates the following error response when faced with a situation it is unsure how to handle:

{
  "error_message": "Internal Server Error."
}

The error responses contain the following field:

FieldData TypeOptional/MandatoryDescription
error_messagestringOptionalThe error message, depicting what the error actually is, for example, "Bad Request."

💬 We Are Here to Help!

If you encounter an issue, a bug, or require assistance, please contact our support page here to find the solution. Don't forget to provide any important information on the issue.