How the Checkout Widget Works (for the Customer)
When a customer arrives at your Shopify store’s checkout page, they can use the Carta del Docente widget to apply a discount to their order using a ministerial voucher.
Where the widget appears
The widget is automatically displayed in the checkout section dedicated to payment methods, after the customer has entered their shipping address and selected a delivery method.
- The customer proceeds with the purchase and arrives at the checkout page
- In the “Payment” section, below the traditional payment methods, a field labeled “Carta del Docente” appears
- The field shows a text area to enter the voucher code and a “Verify and Apply” button
How to enter and validate the code
- The customer types or pastes the Carta del Docente voucher code into the designated field
- Clicks the “Verify and Apply” button
- The app sends the code to the ministerial APIs for real-time validation
- If the code is valid:
- A confirmation message is displayed: “Code verified”
- Voucher details (name, scope, amount) are displayed
- The corresponding discount is automatically applied to the order total
- If the code is invalid or has errors:
- A specific error message is displayed (e.g., “Code already used”, “Voucher expired”, “Invalid code”)
- The discount is not applied
- The customer can try a different code
How the discount is applied
Once the code has been successfully validated:
- The app automatically creates a cart discount corresponding to the voucher amount
- The discount is displayed in the “Order Summary” section of the checkout
- The order total is updated in real-time, subtracting the voucher amount
- The customer can complete the purchase with the discount already applied, using their usual payment method
Note: The discount is applied only to eligible products according to Ministry rules. If the cart contains products not purchasable with Carta del Docente, the discount may be partial or not applicable.
What happens if the service is unavailable
In case of technical problems or if the merchant does not have an active license for the app:
- The widget might be visible but not functional
- When the customer tries to validate a code, they receive the message: “The Carta del Docente service is currently unavailable. For more information, please contact the store.”
- Checkout is automatically blocked for orders attempting to use Carta del Docente
- The customer must remove the code and proceed with an alternative payment method
Complete customer experience flow
- Product Selection → The customer adds products to the cart
- Checkout → Proceeds to checkout and enters shipping details
- Carta del Docente Widget → In the payment section, finds the dedicated field
- Validation → Enters the code and clicks “Verify and Apply”
- Confirmation → Sees the discount applied in the order summary
- Payment → Completes the order with the preferred payment method
Important: The Carta del Docente app is not a payment method, but a tool to apply a discount. The customer will still need to select a payment method (credit card, PayPal, etc.) to cover any remaining balance after the voucher is applied.