Cross-Currency Transfers

Get a payment document

Changed on

Retrieve a payment document by ID. Use it to check whether the document can still be used on a quote, or which quote it is attached to.

get/payment-documents/{paymentDocumentId}

Request

  • Base URL
    https://api.lightspark.com/grid/2025-10-13
  • URL
    https://api.lightspark.com/grid/2025-10-13/payment-documents/{paymentDocumentId}
  • Auth
    HTTP basic

Path parameters

paymentDocumentIdstring required
Example:PaymentDocument:019542f5-b3e7-1d02-0000-000000000001

Payment document ID

Response

Successful operation

idstring required

Unique identifier for this payment document

customerIdstring

ID of the sending customer whose payment this document supports. The document can only be used on this customer's quotes. Absent when the platform itself is the sender.

documentType'PURCHASE_ORDER' | 'LOGISTICS_BILL' | 'CUSTOMS_DECLARATION' | 'INVOICE' | 'CONTRACT' | 'DELIVERY_SLIP' | 'BILL_OF_LADING' | 'FLIGHT_TICKET' | 'TRAVEL_DOCUMENT' | 'HOTEL_BOOKING_CONFIRMATION' required

What a supporting document is. These are kinds of evidence, not file formats: INVOICE means the file is an invoice.

Supporting Documents lists the types each requirement accepts. When you upload a file with POST /payment-documents, documentType declares which type the file is.

fileNamestring required

File name of the uploaded file

sizeBytesinteger required

Size of the uploaded file in bytes. It never exceeds the largest file POST /payment-documents accepts, which is 8,000,000 bytes today.

contentTypestring required

File format as a MIME type, as Grid detected it from the file contents. Today one of application/pdf, image/jpeg, or image/png. Treat it as an open value, because Grid may accept more formats later.

status'UPLOADED' | 'ATTACHED' | 'EXPIRED' required

Where the payment document is in its lifecycle.

StatusTerminalMeaning
UPLOADEDNoReady to use. Pass the id in documentIds on POST /quotes before expiresAt.
ATTACHEDYesAttached to the payment behind the quote in quoteId. Grid has deleted the file.
EXPIREDYesNot attached to a quote before expiresAt. The document can no longer be used.
expiresAtstring date-time required

When the document stops being usable if it has not been attached to a quote. This is 24 hours after createdAt.

quoteIdstring

ID of the quote whose payment this document is attached to. Present only when status is ATTACHED.

createdAtstring date-time required

When this document was uploaded

Example response

{
  "id": "PaymentDocument:019542f5-b3e7-1d02-0000-000000000001",
  "customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001",
  "documentType": "INVOICE",
  "fileName": "invoice-2025-0142.pdf",
  "sizeBytes": 482133,
  "contentType": "application/pdf",
  "status": "UPLOADED",
  "expiresAt": "2025-10-04T12:00:00Z",
  "quoteId": "Quote:019542f5-b3e7-1d02-0000-000000000006",
  "createdAt": "2025-10-03T12:00:00Z"
}

Changes