Payment Documentation

Integration guides for endpoints to manage and retrieve documents associated with Lync payments.

These documents are often required for international transactions and may include proofs of completion, receipts, and other supporting files.


1. List Payment Documents

Overview

This endpoint retrieves all documents related to a specific payment. The documents may be text-based or files (e.g., PDFs).

Path Parameter

ParameterTypeRequiredDescription
paymentIdstring✅ YesThe unique identifier of the payment whose documents you want to retrieve.

Example Request

GET http://api.sandbox.waza.co/lync/banking/v2/payments/018fc990-1496-7c68-b268-46b1267cc015/docs

Example Response

{
  "data": [
    {
      "id": "01927112-381d-76b5-9de8-e58cea1b4613",
      "state": "ACTIVE",
      "created_date": "2024-10-09T11:37:52.413Z",
      "updated_date": "2024-10-09T11:37:52.413Z",
      "version": 0,
      "value": "93962476-39ea-4bb9-9e28-ad748d1d8aae",
      "description": "swift uetr",
      "type": "PROOF_OF_COMPLETION",
      "file_info": {
        "type": "application/pdf",
        "name": null,
        "size": 18810,
        "url": "/payments/docs/01927112-381d-76b5-9de8-e58cea1b4613/download"
      },
      "payment_id": "019270f5-d692-7a97-bf52-93fb4f0b962f"
    }
  ]
}

Response Fields

FieldTypeDescription
idstringThe unique identifier of the document.
statestringThe status of the document (ACTIVE, INACTIVE).
created_datestringThe date when the document was created.
updated_datestringThe date when the document was last updated.
versionintegerThe version number of the document.
valuestringThe internal reference value of the document.
descriptionstringA short description of the document (e.g., "swift uetr").
typestringThe type of document (e.g., PROOF_OF_COMPLETION).
file_info.typestringThe MIME type of the document (e.g., application/pdf).
file_info.namestringThe name of the document file (if available).
file_info.sizeintegerThe file size in bytes.
file_info.urlstringThe URL to download the document.
payment_idstringThe payment ID associated with the document.

2. Download a Payment Document

Overview

This endpoint downloads a specific document associated with a payment. The response is a buffer file, meaning it will be handled as a file download rather than JSON.

Path Parameter

ParameterTypeRequiredDescription
docIdstring✅ YesThe unique identifier of the document to be downloaded.

Example Request

GET http://api.sandbox.waza.co/lync/banking/v2/payments/docs/018fdd86-fa7c-73a6-a11d-7f392e450d29/download

Response

  • The response will contain the document file as a binary buffer.
  • The Content-Type in the response headers will indicate the file format (e.g., application/pdf).
  • Ensure your system correctly handles file downloads based on the response format.

Example Error Response (Invalid Payment ID):

If the request fails, the API will return an error response with relevant details.

{
  "error": {
    "message": "Payment not found",
    "code": "404",
    "description": "No documents found for the given payment ID"
  }
}