Skip to main content
After a Beneficiary Financial Institution (BFI) completes a fiat payout, it can issue a payment receipt (proof of payment), such as an MT103 for a wire payment. CPN makes the receipt available through the API as a PDF.

Prerequisites

Before you begin, ensure that you’ve:
  • Created an API key with access to your payments.
  • Created a webhook subscription that includes the cpn.document.available notification type, or the cpn.document.* wildcard.

Steps

1

Wait for the document available webhook

When the BFI sends a payment receipt, CPN sends a cpn.document.available webhook. The notification object contains the document id and the paymentId it belongs to.
A documentType of PROOF_OF_PAYMENT identifies the payment receipt.
2

List the documents for a payment (optional)

If you missed the webhook, or want to check whether a receipt is available, call the list documents endpoint with the payment ID. The list is empty until the BFI sends a document.
3

Download the receipt

Call the download a document endpoint with the document ID. The response is the PDF file, returned as an attachment named <paymentId>_proof_of_payment.pdf.
CPN fetches the file from the BFI each time you download it. A 400 status with error code 291100 means too many downloads are in progress, so avoid downloading many documents at once. Retry the request later after that error or a 502 status.
In the sandbox environment, set the ORIGINATOR_NAME field to PaymentWithDocument when you create a payment to receive a test receipt after the payment completes. See magic values for testing.