Skip to main content

Manage customer

Proper customer management is not only a technical best practice but also essential for enhancing user experience, streamline operations, and driving business success.

This guide explains how and why to use registered customers with Voucherly.

Development Guide

1. Prepare your request

When creating a Payment, include the customer details.

Example Request

{
"mode": "Payment",
[...]
"customerEmail": "mario.rossi@voucherly.it",
"customerFirstName": "Mario",
"customerLastName": "Rossi",
[...]
}

2. Handle the response

Example response

{
"id": "my-payment-id-1",
"tenant": "live",
"mode": "Payment",
"customerId": "my-customer-id-1",
[...]
"checkoutUrl": "https://example.voucherly.it/checkout",
"status": "Requested",
[...]
}

If you haven't provided a customerId in your initial request, you should:

  • Extract the customerId from the response.
  • Save it to your database.
  • Include it in subsequent requests for the same customer.

Why? Benefits!

  • Streamline Checkout.
    • Prefill customer details like name and email, reducing manual input.
    • Save customer preferences and payment methods for quicker future checkouts.
    • Reduce friction. For example, Payment gateways like Edenred use Single Sign-On (SSO). Voucherly can maintain active sessions, improving the purchase flow.
  • Simplified Reconciliation. Associating every payment with a customer enables clear transaction tracking. This is particularly useful for managing refunds, sales analysis and accounting audits.