Process payment
Deprecated
Process payment and notify user (payment receipt) if transaction is finished successfully.
The priceIncludingVAT
and currency
attributes are required, unless when announcing a transaction in which case those values are copied from the token and any given values are ignored.
Only use after approaching (fueling api), otherwise returns 403 Forbidden
.
Query parameters
-
Announcing the transaction without actually capturing the payment. An announced transaction can later be processed only if providing the same
paymentToken
,purposePRN
, andproviderPRN
. By announcing the transaction the token is locked to be used only with this transaction. ThepriceIncludingVAT
andcurrency
will be taken from the token, and upon capturing the transaction, must be equal or lower than what was announced.
Responses
-
Created
-
Bad request
-
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" } ] }
-
The request was well-formed but was unable to be followed due to semantic errors. The following codes may be seen:
provider:payment-method-rejected
: The method was rejected by the payment providerprovider:authorization-denied
: The transaction was rejected by the payment providerrule:product-denied
: Product restrictions forbid transaction, e.g., forbidden fuel type - token authorized only for Diesel but attempted to fuel Super.
-
Resource not found
-
The specified accept header is invalid
-
Resource conflicts
-
Resource is gone
-
The specified content type header is invalid
-
The request was well-formed but was unable to be followed due to semantic errors.
-
Internal server error
-
Error occurred while communicating with upstream services
curl \
--request POST 'https://api.pace.cloud/pay/2021-2/transactions' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/vnd.api+json"
{
"data": {
"type": "transaction",
"id": "c3f037ea-492e-4033-9b4b-4efc7beca16c",
"attributes": {
"paymentToken": "12c52345c1x34",
"priceIncludingVAT": 69.34,
"priceExcludingVAT": 58.27,
"currency": "EUR",
"VAT": {
"amount": 11.07,
"rate": 0.19
},
"purposePRN": "prn:poi:gas-stations:124e522d-65ef-4386-b7e0-00d2eceeadc6:pumps:f86c1f11-687e-4a85-b16f-3f82a16f3243",
"issuerPRN": "prn:poi:apps:c30bce97-b732-4390-af38-1ac6b017aa4c",
"providerPRN": "prn:provider-name:sites:7652346752:pumps:6",
"merchantPRN": "prn:merchant:merchants:b8c60e3a-3771-4c48-8666-3cbbb42ffdc2",
"vin": "1B3EL46R36N102271",
"productFlow": "preAuth",
"fuelAmount": 55.12,
"fuelProductName": "ron98",
"fuel": {
"pumpNumber": 1,
"unit": "liter",
"pricePerUnit": 1.112,
"amount": 55.12,
"productName": "Super Plus",
"type": "ron98"
},
"mileage": 66435000,
"numberPlate": "KAAM1234"
}
}
}
{
"data": {
"type": "transaction",
"id": "c3f037ea-492e-4033-9b4b-4efc7beca16c",
"links": {
"receipt": {
"href": "https://api.pace.cloud/pay/receipts/b58b6898-ca63-4417-b671-abe86fb853f0.png",
"meta": {
"mimeType": "image/png"
}
},
"receiptPDF": {
"href": "https://api.pace.cloud/pay/receipts/b58b6898-ca63-4417-b671-abe86fb853f0.pdf",
"meta": {
"mimeType": "application/pdf"
}
}
},
"attributes": {
"createdAtLocaltime": "2017-07-21T17:32:28Z",
"createdAt": "2017-07-21T17:32:28Z",
"updatedAt": "2017-07-21T19:32:28Z",
"paymentMethodKind": "paydirekt",
"paymentMethodId": "d7101f72-a672-453c-9d36-d5809ef0ded6",
"paymentToken": "12c52345c1x34",
"purposePRN": "prn:poi:gas-stations:124e522d-65ef-4386-b7e0-00d2eceeadc6:pumps:f86c1f11-687e-4a85-b16f-3f82a16f3243",
"providerPRN": "prn:provider-name:sites:7652346752:pumps:6",
"issuerPRN": "prn:poi:apps:c30bce97-b732-4390-af38-1ac6b017aa4c",
"vin": "1B3EL46R36N102271",
"mileage": 66435000,
"numberPlate": "KA AM1234",
"productFlow": "preAuth",
"priceIncludingVAT": 69.34,
"priceWithoutVAT": 58.27,
"discountAmount": 1.27,
"fuel": {
"pumpNumber": 1,
"unit": "liter",
"pricePerUnit": 1.112,
"amount": 55.12,
"productName": "Super Plus",
"type": "ron98"
},
"currency": "EUR",
"VAT": {
"amount": 11.07,
"rate": 0.19
},
"references": [
"prn:acquirer:transactions:jgrwsntrjt:types:settlement",
"prn:acquirer:methods:creditcard"
],
"location": {
"latitude": 49.013,
"longitude": 8.425,
"brand": "Total",
"address": {
"street": "Haid-und-Neu-Str.",
"houseNo": "18",
"postalCode": "76131",
"city": "Karlsruhe",
"countryCode": "DE"
}
}
}
}
}
{
"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": {}
}
]
}