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
andcurrency
in the request body to check if the price the user has seen is still correct. If the values don't match, the status409 Conflict
is returned.carFuelType
may be provided but has no effect.- The token will still be available for use in case the payment fails. It may need to be deleted by the caller
Unattended Payment
As an additional feature, the caller can - in case of Post Pay - opt for unattended payment. In summary, this means that when given a token with a certain authorized amount, the service will watch over the status of the fueling process and finish the transaction in the background, with no further user interaction required. This will only work if the amount fueled does not exceed the amount authorized in the token. Otherwise, an error response will be sent to the callback URL
unattendedPayment
in the request body designates whether this should be done or not. Note that this is only possible if a valid token has been providedcallbackURL
is an optional URL that will be called with what would usually be the response to the finalProcessPayment
call after the process has finished- The token will still be available for use in case the payment fails. It may need to be deleted by the caller
- This process is only available if the pump is in status
free
. Otherwise,422
is returned. - The backend will wait for a grace period of 20 seconds after this call was sent before starting the process
Path parameters
-
Gas station ID
Responses
-
201 application/vnd.api+json
Post Pay: Payment successful, or unattended payment enqueued
-
Pre Auth: Pump unlocked
-
400 application/vnd.api+json
Bad request
-
401 application/vnd.api+json
OAuth token missing or invalid or a linked identity is missing.
Linked identity missing is a special case where you need to make sure that the user has additionally logged in / authorized with a third-party.
This is not relevant for most use-cases.
The specific error code that identifies a missing linked identity is
missing-linked-identity
Example:
{ "errors": [ { "id": "cbgmhslmp1o9or9kh1p0", "title": "Missing linked identity for authorized access", "detail": "Linked identity is needed to access this resource, please check why the user does not have a linked identity", "status": "401", "code": "missing-linked-identity" } ] }
-
403 application/vnd.api+json
Forbidden
-
404 application/vnd.api+json
Resource not found
-
406 application/vnd.api+json
The specified accept header is invalid
-
409 application/vnd.api+json
The provided priceIncludingVAT does not match the actual price
-
412 application/vnd.api+json
Precondition failed
{ "errors": [ { "id": "buck3h44qtf5j268141g", "title": "Pump already unlocked/in-use on site by someone else", "detail": "", "status": "412", "code": "FUELING_PUMP_BUSY_ON_SITE" } ] }
-
415 application/vnd.api+json
The specified content type header is invalid
-
422 application/vnd.api+json
The request was well-formed but was unable to be followed due to semantic errors.
-
500 application/vnd.api+json
Internal server error
-
502 application/vnd.api+json
Error occurred while communicating with PACE services
curl \
-X POST https://api.pace.cloud/fueling/2024-2/gas-stations/a6ec9bd7-cf0b-416c-b24f-9ce65ab3dfe1/transactions \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/vnd.api+json"
{
"data": {
"type": "transaction",
"id": "c3f037ea-492e-4033-9b4b-4efc7beca16c",
"attributes": {
"paymentToken": "12c52345c1x34",
"unattendedPayment": false,
"callbackURL": "https://my.fueling/pace/transaction-callback",
"pumpId": "460ffaad-a3c1-4199-b69e-63949ccda82f",
"vin": "1B3EL46R36N102271",
"driverVehicleID": "1B2598746",
"mileage": 66435000,
"numberPlate": "KA AM92",
"additionalData": "987654321098",
"priceIncludingVAT": 69.34,
"currency": "EUR",
"carFuelType": "ron95e10",
"metadata": [
{
"key": "string",
"value": "string"
}
]
}
}
}
{
"data": {
"type": "transaction",
"id": "c3f037ea-492e-4033-9b4b-4efc7beca16c",
"attributes": {
"paymentToken": "12c52345c1x34",
"gasStationId": "a6ec9bd7-cf0b-416c-b24f-9ce65ab3dfe1",
"pumpId": "460ffaad-a3c1-4199-b69e-63949ccda82f",
"vin": "1B3EL46R36N102271",
"driverVehicleID": "1B2598746",
"mileage": 66435000,
"VAT": {
"amount": 11.07,
"rate": 0.19
},
"priceWithoutVAT": 58.27,
"priceIncludingVAT": 69.34,
"discountAmount": 1.27,
"currency": "EUR"
}
}
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}