Pre Auth or Post Pay Deprecated
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.
Path parameters
-
Gas station ID
Responses
-
201 application/vnd.api+json
Post Pay: Payment successful
-
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
-
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/2021-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",
"pumpId": "460ffaad-a3c1-4199-b69e-63949ccda82f",
"vin": "1B3EL46R36N102271",
"mileage": 66435000,
"priceIncludingVAT": 69.34,
"currency": "EUR",
"carFuelType": "ron95e10"
}
}
}
{
"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",
"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": {}
}
]
}