Redemption Intent object

This object has the same structure as the Redemption object

Create Redemption Intent

Create a Redemption Intent object.

This API is useful to create a preview of what the actual redemption would be, without actually redeeming the evoucher.

You should call this api first to test your integration and obtain a redemption preview for any evoucher.

When you are ready to redeem an evoucher please read the Redemption documentation

If the response will contains the variable beneficiary_only_restriction set as true, it means that the issuer specified the person indicated by first_name and last_name as the only person that should have used the evoucher, and the ticket redeemed with that. It is a good practice to remind this restriction to the user at this point.


POST https://api.gonvert.com/en/v1/voucher/redemption-intent-create

Parameters

Name Type Required Notes
redemption_code string Yes Redemption code of the evoucher
ticket_amount float Yes Amount of the ticket to buy in the standard numeric format string (example: 30.5).
travel_type string No One of 'Monthly' or 'Annual'.
If the evoucher has a travel type restriction, it will be checked using this parameter.
origin_place_coordinates string No Coordinates encoded in json format.
If the evoucher has an origin place restriction, it will be checked using this parameter.
destination_place_coordinates string No Coordinates encoded in json format.
If the evoucher has a destination place restriction, it will be checked using this parameter.
origin_place_code string No A simple string.
Gonvert will check the code of each fare pole configured in your account to use its coordinates if found.
This parameter will be ignored if the coordinates are passed.
destination_place_code string No A simple string.
Gonvert will check the code of each fare pole configured in your account to use its coordinates if found.
This parameter will be ignored if the coordinates are passed.

Example request

https://api.gonvert.com/en/v1/voucher/redemption-intent-create

redemption_code: G#1E8497-1234
ticket_amount: 30.5
travel_type: Monthly
origin_place_coordinates: [{"lat":"43.230375", "lng":"11.421241"}]
destination_place_coordinates: [{"lat":"43.230375", "lng":"11.421241"}]
origin_place_code: null
destination_place_code: null

Example successful response

{
    "success": true,
    "message": null,
    "redemption_amount": "30.5",
    "ticket_amount": "30.5",
    "amount_to_pay": "0",
    "beneficiary_only_restriction": false,
    "first_name": "John",
    "last_name": "Smith"
}

Example failed response

{
    "success": false,
    "message": "The record was not found. @50",
    "errorCode": 2001,
    "identifierValue": null
}