Fueling

public enum Fueling

Undocumented

  • Gather information when approaching at the forecourt
    
    This request will:
    
    • Return a list of paymentMethods of the user which can be used at the gas station.
    • Return up-to-date price information (price structure) at the gas station.
    • Return a list of pumps available at the gas station together with the current status (free, inUse, readyToPay, outOfOrder). No pumps might be returned if the list of payment methods is empty.
    • Create payment tokens for the paymentMethods of the user that are also supported at the gas station and pre-authorize the calculated maximum amount of money (background task). The approaching is a necessary first api call for connected fueling. Without a valid approaching the get pump and wait for status change calls may be answered with a 403 Forbidden status code. An approaching is valid for one fueling only and can’t be reused. If a long (not further disclosed time) has passed, the approaching is also invalidated. So if the client is receiving a 403 Forbidden on the above mentioned calls, a new approaching has to be issued, this can be done transparent to the user.
    See more

    Declaration

    Swift

    public enum ApproachingAtTheForecourt
  • Cancel a Pre Auth transaction

    Cancel a Pre Auth transaction. This action is only permitted in case the user didn’t already start the fueling process. Returns 403 Forbidden in case the fueling already started.

    See more

    Declaration

    Swift

    public enum CancelPreAuth
  • Return current pump information
    
    Returns the current pump status (free, inUse, readyToPay, outOfOrder) and identifier. If the status is readyToPay, the result also contains fuelType, productName, fuelAmount, VAT (amount & rate), priceWithoutVAT, priceIncludingVAT, currency.
    



    Only use after approaching, otherwise returns 403 Forbidden.

    See more

    Declaration

    Swift

    public enum GetPump
  • Return pump information on all pumps of the gas station
    
    Returns the current pump status (free, inUse, readyToPay, outOfOrder, locked) and identifier. If the status is readyToPay, the result also contains fuelType, productName, fuelAmount, VAT (amount & rate), priceWithoutVAT, priceIncludingVAT, currency.
    



    Only use after approaching, otherwise returns 403 Forbidden.

    See more

    Declaration

    Swift

    public enum GetPumps
  • Pre Auth or Post Pay
    
    This call supports two different flows. The *Pre Auth* flow and the *Post Pay* flow. This call will notify the user via email with a payment receipt if transaction is finished successfully. Only use after approaching, otherwise returns `403 Forbidden`.
    

    Pre Auth

    This flow is used if a pump is having the status locked. A locked pump requires a Pre Auth to unlock. Only after this Pre Auth the pump and can be used by the user

    • carFuelType may be passed to only unlock a certain nozzle of the pump. Not all pumps support this feature, and some require it. It is advised to always pass the desired fuel type. ### Post Pay You can optionally provide:
    • priceIncludingVAT and currency in the request body to check if the price the user has seen is still correct. If the values don’t match, the status 409 Conflict is returned.
    • carFuelType may be provided but has no effect.
    See more

    Declaration

    Swift

    public enum ProcessPayment
  • Wait for a status change on a given pump
    
    Uses **long polling** to wait for a status change on a given pump. Returns as soon as the status has changed or after the number of seconds provided by the optional `timeout` query parameter (default timeout is 30 seconds). In case of timeout (408 status code) you're safe to start the request again. Instantaneously returns if `lastStatus` was given and already changed between request. If successful, it returns the same structure as the normal status call
    



    Only use after approaching, otherwise returns 403 Forbidden.

    See more

    Declaration

    Swift

    public enum WaitOnPumpStatusChange