No momento, esta página não está disponível em português
Omnichannel icon

Digital receipts

Send digital receipts for in-person transactions.

Some customers prefer to receive digital receipts (by email, for example) instead of a printed receipt. Digital receipts are easier to store, more convenient to find, and do not generate paper waste.

Here we'll show you how to use Adyen-supplied payment terminals to recognize a returning customer and know if you already have their email, ask them if they want to receive their receipt digitally, and send their receipt to the email address saved in their profile.

Requirements

To send digital receipts, make sure that:

  1. You can create customer profiles and recognize returning customers across your sales channels.
  2. You have software that can generate the receipt from the Terminal API payment response, and send the receipt to the customer's email.

Step 1: Recognize customer

Before asking your customer whether they prefer a digital receipt, you should attempt to recognize them. This will determine whether you already have their contact details that you can send the receipt to.

  1. Make a card acquisition request to recognize the customer. This will return any customer information that you previously stored with Adyen.

    O exemplo abaixo mostra como você tentaria reconhecer um cliente que está fazendo uma compra de EUR 10,99.

    Você recebe uma resposta que inclui um objeto AdditionalResponse, com uma cadeia codificada em base64 que precisa decodificar para obter um objeto JSON ou uma cadeia de pares de valores-chave codificados em formulário. Em nossos exemplos, usamos pares de valores-chave codificados em formulário.

    A resposta de exemplo abaixo inclui um obejto AdditionalResponse.

  1. Check if the AdditionalResponse object contains a shopperReference.

    • If it contains a shopperReference, they are a returning customer. If you have previously stored the shopperEmail with Adyen, this is also provided in this response.
    • If it does not contain a shopperReference, the customer's card is not recognized.
      This usually means that the customer is new, and has not purchased with you before. However, they could also be a returning customer using a new card.

    To confirm, you can collect their email address, then check whether this matches a shopperEmail stored in your customer database:

    • If the email matches a shopperEmail in your database, they are a returning customer. Ask them if they want to save their new card. If they do, tokenize their new card using their shopperReference from your database when you make a payment.
    • If the email is not your database, they are a new customer. Proceed to step 2 to ask them if they want their receipt sent by email.

Step 2: Request customer input

You can present messages and collect input from the customer using the touch-screen displays in Adyen-supplied payment terminals. Alternatively, your staff can ask your customer for their preferences, and then type the email address in your POS app.

Depending on whether your customer's email address is saved in their profile, you can either ask them:

Email address is known

If your customer's email address is already known, present a prompt on the terminal display to check whether they would like the receipt sent by email.

To ask if your customer wants to get a digital receipt:

  1. Make a GetConfirmation input request from your POS app, asking the customer whether they would like to receive their receipt by email.

    The example below would present the message Would you like us to send your receipt to the email address (followed by the customer's email address)? on the terminal display, followed by a prompt for the customer.

    Your message is shown on the terminal display. The customer indicates whether they would like their receipt emailed to them.

    When they are done selecting their option, you receive the input response that contains Input.ConfirmedFlag object. If this is true, the customer would like to receive their receipt by email. Continue to make the payment.

Email address is unknown

If your customer is new, or does not have an email linked to their profile yet, present a prompt on the terminal display to check whether they would like the receipt sent by email. If they do, you can collect the customer's email address directly from your terminal, using the on-screen keyboard.

To ask if your customer wants to get a digital receipt:

  1. Make a GetConfirmation input request, asking the customer whether they would like to receive their receipt by email.

    The example below would present the message Would you like us to send your receipt to your email address? on the terminal display, followed by a prompt for the customer.

    The customer uses the terminal display to indicate whether they would like their receipt sent by email.

    Your message is shown on the terminal display. The customer indicates whether they would like their receipt emailed to them.

    When they are done selecting their option, you receive the input response that contains an Input.ConfirmedFlag object. This indicates true if the customer would like to receive their receipt by email. Continue to the next step to get their email. Otherwise, they would rather have a paper receipt, so continue to make a payment request.

  2. If the customer indicated that they want to receive an electronic receipt, collect their email and create a customer profile.

Step 3: Continue with payment

Continue with the purchase by making a payment request:

  1. Make a POST request from your POS app to initiate the payment. If you are saving the email of a new customer, also include parameters described in the Create customer profiles documentation.

    Here is how you can make a EUR 10.99 payment for a known customer.

    You receive a response that includes:

    • AdditionalResponse object, with a base64-encoded string that you need to decode to get a JSON object, or a string of form-encoded key-value pairs. In our examples, we use form-encoded key-value pairs. You can get the shopperEmail from this string.
    • PaymentReceipt: Object containing data you can use to generate a receipt.
  2. Use your CRM or email tool to send the receipt to the shopperEmail. The receipt should include the data provided in the PaymentReceipt object. For more information on what you need to provide in generated receipt, see Generating compliant receipts.