Payment receipts

Follow these steps to view and download your payment receipts after making a purchase with Deuna. Query and download your payment receipts.

1. Make a payment with reference

In order for you to see your receipts, the payment must have been made using DeunaSDK.initPaymentWidget(...) with a "method_type":"reference" previously configured.

await DeunaSDK.initPaymentWidget({
  orderToken: "order_ABC123",
  ...
});

2. Verify receipt availability

Receipts become available if the payment includes information from reference processors in reference_processors.

These processors allow downloading or following instructions from the receipts.

3. View the receipts

If the payment allows showing receipts, then a window opens with the following information:

  • Details of one or several available receipts.
  • Option to select a specific receipt if there are multiple options.
  • Instructions from the reference processor associated with each receipt.
  • Button to download the receipts and save or print them.

If the above conditions are not met, then the receipts will not be shown.

In that case, the widget indicates how to continue.

4. Integrate the function into your application

Use the following code to integrate the function into your application:

await DeunaSDK.initVoucher({
    orderToken: "<DEUNA order token>", // Required: Order token to initialize the widget
    callbacks: {
      onClosed: (action) => {
        console.log("onClose", action);
      },
      onError: (payload) => {
        console.log("onError", payload);
      },
      onSuccess: (payload) => {
        console.log("onSuccess", payload);
      },
      onEventDispatch: (type, data) => {
        console.log(type, data);
      },
      ...
    },
  });

Other considerations

Keep in mind the following points when issuing payment receipts with the Payment widget web:

  • If you don't see the receipts, then check that the payment meets the above conditions.
  • Depending on the reference processor, the information for each receipt might vary.
  • If there is more than one receipt available, then you can choose which one to view or download.
  • If receipts are not available, then the application might offer you another alternative to continue.