Authorize a payment using the payment method Beta
When successful, returns a paymentToken value.
Path parameters
-
ID of the paymentMethod
Body Required
-
data object
Hide data attributes Show data attributes object
-
Value is
paymentToken
. -
id string(uuid)
Unique ID of the new paymentToken.
-
Hide attributes attributes Show attributes attributes object
-
Currency as specified in ISO-4217.
Format should match the following pattern:
^[A-Z]{3}$
. -
allowPartialAmount boolean
Set this flag to
true
if you accept the authorized amount to be lower than the requested amount. -
PACE resource name(s) of one or multiple resources, for which the payment should be authorized.
-
discountTokens array[string]
Discount token that should be applied when authorizing this token. (Obtained by querying fueling service gasStation->pump->discount)
-
twoFactor object
The code and method for two factor authentication, if required by the payment method
-
-
Responses
-
201 application/vnd.api+json
Created
Hide response attribute Show response attribute object
-
data object
Hide data attributes Show data attributes object
-
type string
Value is
paymentToken
. -
id string
Payment Token ID
-
attributes object
Hide attributes attributes Show attributes attributes object
-
amount number(decimal)
The amount that this token represents.
-
currency string
Currency as specified in ISO-4217.
Format should match the following pattern:
^[A-Z]{3}$
. -
value string
paymentToken value. Format might change (externally provided - by payment provider)
-
validUntil string(date-time)
The datetime (iso8601) after which the token is no longer valid. May not be provided.
-
accountPRN string
PACE resource name of the accountPRN that this is being charged to.
-
purposePRNs array[string]
PACE resource name(s) of one or multiple resources, for which the payment was authorized.
-
-
relationships object
Hide relationships attribute Show relationships attribute object
-
paymentMethod object
-
-
-
-
400 application/vnd.api+json
Bad request
Hide response attribute Show response attribute object
Error objects provide additional information about problems encountered while performing an operation. Errors also contain codes besides title and message which can be used for checks even if the detailed messages might change.
*
1000
: generic error *1001
: payment processing temporarily unavailable *1002
: requested amount exceeds the authorized amount of the provided token *1003
: implicit payment methods cannot be modified *1004
: payment method rejected by provider *provider:payment-method-rejected
: payment method rejected by provider (identical to1004
) *rule:product-denied
: Product restrictions forbid transaction, e.g., forbidden fuel type - token authorized only for Diesel but attempted to fuel Super.-
errors array[object]
Hide errors attributes Show errors attributes object
-
id string
A unique identifier for this particular occurrence of the problem.
-
links object
Hide links attribute Show links attribute object
-
about string
A link that leads to further details about this particular occurrence of the problem.
-
-
status string
the HTTP status code applicable to this problem, expressed as a string value.
-
code string
an application-specific error code, expressed as a string value.
-
title string
A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
-
detail string
a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
-
source object
An object containing references to the source of the error.
Hide source attributes Show source attributes object
-
meta object
a meta object containing non-standard meta-information about the error.
Hide meta attribute Show meta attribute object
-
-
-
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" } ] }
Hide response attribute Show response attribute object
Error objects provide additional information about problems encountered while performing an operation. Errors also contain codes besides title and message which can be used for checks even if the detailed messages might change.
*
1000
: generic error *1001
: payment processing temporarily unavailable *1002
: requested amount exceeds the authorized amount of the provided token *1003
: implicit payment methods cannot be modified *1004
: payment method rejected by provider *provider:payment-method-rejected
: payment method rejected by provider (identical to1004
) *rule:product-denied
: Product restrictions forbid transaction, e.g., forbidden fuel type - token authorized only for Diesel but attempted to fuel Super.-
errors array[object]
Hide errors attributes Show errors attributes object
-
id string
A unique identifier for this particular occurrence of the problem.
-
links object
Hide links attribute Show links attribute object
-
about string
A link that leads to further details about this particular occurrence of the problem.
-
-
status string
the HTTP status code applicable to this problem, expressed as a string value.
-
code string
an application-specific error code, expressed as a string value.
-
title string
A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
-
detail string
a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
-
source object
An object containing references to the source of the error.
Hide source attributes Show source attributes object
-
meta object
a meta object containing non-standard meta-information about the error.
Hide meta attribute Show meta attribute object
-
-
-
403 application/vnd.api+json
Amount cannot be authorized. The following codes may be seen:
provider:payment-method-rejected
: The method was rejected by the payment providerprovider:authorization-denied
: The authorization was rejected by the payment providerfuelcard:ondemand:activation-required
: On-Demand fuelcards require activation before usage. This error is returned if an attempt is being made without prior activation of the fuelcard.rule:product-denied
: Product restrictions forbid transaction, e.g., forbidden fuel type - token authorized only for Diesel but attempted to fuel Super.otp:invalid
: The provided two factor token is missing or has been rejected.
Hide response attribute Show response attribute object
Error objects provide additional information about problems encountered while performing an operation. Errors also contain codes besides title and message which can be used for checks even if the detailed messages might change.
*
1000
: generic error *1001
: payment processing temporarily unavailable *1002
: requested amount exceeds the authorized amount of the provided token *1003
: implicit payment methods cannot be modified *1004
: payment method rejected by provider *provider:payment-method-rejected
: payment method rejected by provider (identical to1004
) *rule:product-denied
: Product restrictions forbid transaction, e.g., forbidden fuel type - token authorized only for Diesel but attempted to fuel Super.-
errors array[object]
Hide errors attributes Show errors attributes object
-
id string
A unique identifier for this particular occurrence of the problem.
-
links object
Hide links attribute Show links attribute object
-
about string
A link that leads to further details about this particular occurrence of the problem.
-
-
status string
the HTTP status code applicable to this problem, expressed as a string value.
-
code string
an application-specific error code, expressed as a string value.
-
title string
A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
-
detail string
a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
-
source object
An object containing references to the source of the error.
Hide source attributes Show source attributes object
-
meta object
a meta object containing non-standard meta-information about the error.
Hide meta attribute Show meta attribute object
-
-
404 application/vnd.api+json
Payment method is unknown
Hide response attribute Show response attribute object
Error objects provide additional information about problems encountered while performing an operation. Errors also contain codes besides title and message which can be used for checks even if the detailed messages might change.
*
1000
: generic error *1001
: payment processing temporarily unavailable *1002
: requested amount exceeds the authorized amount of the provided token *1003
: implicit payment methods cannot be modified *1004
: payment method rejected by provider *provider:payment-method-rejected
: payment method rejected by provider (identical to1004
) *rule:product-denied
: Product restrictions forbid transaction, e.g., forbidden fuel type - token authorized only for Diesel but attempted to fuel Super.-
errors array[object]
Hide errors attributes Show errors attributes object
-
id string
A unique identifier for this particular occurrence of the problem.
-
links object
Hide links attribute Show links attribute object
-
about string
A link that leads to further details about this particular occurrence of the problem.
-
-
status string
the HTTP status code applicable to this problem, expressed as a string value.
-
code string
an application-specific error code, expressed as a string value.
-
title string
A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
-
detail string
a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
-
source object
An object containing references to the source of the error.
Hide source attributes Show source attributes object
-
meta object
a meta object containing non-standard meta-information about the error.
Hide meta attribute Show meta attribute object
-
-
-
405 application/vnd.api+json
Cannot authorize with this method. This usually means that you are trying to use an implicit method for authorization. Implicit payment methods do not use the regular authorization endpoint, e.g., Apple Pay.
If this is the case the returned error code (in the response body) is:
method:implicit-method-not-supported
Hide response attribute Show response attribute object
Error objects provide additional information about problems encountered while performing an operation. Errors also contain codes besides title and message which can be used for checks even if the detailed messages might change.
*
1000
: generic error *1001
: payment processing temporarily unavailable *1002
: requested amount exceeds the authorized amount of the provided token *1003
: implicit payment methods cannot be modified *1004
: payment method rejected by provider *provider:payment-method-rejected
: payment method rejected by provider (identical to1004
) *rule:product-denied
: Product restrictions forbid transaction, e.g., forbidden fuel type - token authorized only for Diesel but attempted to fuel Super.-
errors array[object]
Hide errors attributes Show errors attributes object
-
id string
A unique identifier for this particular occurrence of the problem.
-
links object
Hide links attribute Show links attribute object
-
about string
A link that leads to further details about this particular occurrence of the problem.
-
-
status string
the HTTP status code applicable to this problem, expressed as a string value.
-
code string
an application-specific error code, expressed as a string value.
-
title string
A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
-
detail string
a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
-
source object
An object containing references to the source of the error.
Hide source attributes Show source attributes object
-
meta object
a meta object containing non-standard meta-information about the error.
Hide meta attribute Show meta attribute object
-
-
-
406 application/vnd.api+json
The specified accept header is invalid
Hide response attribute Show response attribute object
Error objects provide additional information about problems encountered while performing an operation. Errors also contain codes besides title and message which can be used for checks even if the detailed messages might change.
*
1000
: generic error *1001
: payment processing temporarily unavailable *1002
: requested amount exceeds the authorized amount of the provided token *1003
: implicit payment methods cannot be modified *1004
: payment method rejected by provider *provider:payment-method-rejected
: payment method rejected by provider (identical to1004
) *rule:product-denied
: Product restrictions forbid transaction, e.g., forbidden fuel type - token authorized only for Diesel but attempted to fuel Super.-
errors array[object]
Hide errors attributes Show errors attributes object
-
id string
A unique identifier for this particular occurrence of the problem.
-
links object
Hide links attribute Show links attribute object
-
about string
A link that leads to further details about this particular occurrence of the problem.
-
-
status string
the HTTP status code applicable to this problem, expressed as a string value.
-
code string
an application-specific error code, expressed as a string value.
-
title string
A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
-
detail string
a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
-
source object
An object containing references to the source of the error.
Hide source attributes Show source attributes object
-
meta object
a meta object containing non-standard meta-information about the error.
Hide meta attribute Show meta attribute object
-
-
-
409 application/vnd.api+json
Resource conflicts
Hide response attribute Show response attribute object
Error objects provide additional information about problems encountered while performing an operation. Errors also contain codes besides title and message which can be used for checks even if the detailed messages might change.
*
1000
: generic error *1001
: payment processing temporarily unavailable *1002
: requested amount exceeds the authorized amount of the provided token *1003
: implicit payment methods cannot be modified *1004
: payment method rejected by provider *provider:payment-method-rejected
: payment method rejected by provider (identical to1004
) *rule:product-denied
: Product restrictions forbid transaction, e.g., forbidden fuel type - token authorized only for Diesel but attempted to fuel Super.-
errors array[object]
Hide errors attributes Show errors attributes object
-
id string
A unique identifier for this particular occurrence of the problem.
-
links object
Hide links attribute Show links attribute object
-
about string
A link that leads to further details about this particular occurrence of the problem.
-
-
status string
the HTTP status code applicable to this problem, expressed as a string value.
-
code string
an application-specific error code, expressed as a string value.
-
title string
A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
-
detail string
a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
-
source object
An object containing references to the source of the error.
Hide source attributes Show source attributes object
-
meta object
a meta object containing non-standard meta-information about the error.
Hide meta attribute Show meta attribute object
-
-
-
410 application/vnd.api+json
Resource is gone
Hide response attribute Show response attribute object
Error objects provide additional information about problems encountered while performing an operation. Errors also contain codes besides title and message which can be used for checks even if the detailed messages might change.
*
1000
: generic error *1001
: payment processing temporarily unavailable *1002
: requested amount exceeds the authorized amount of the provided token *1003
: implicit payment methods cannot be modified *1004
: payment method rejected by provider *provider:payment-method-rejected
: payment method rejected by provider (identical to1004
) *rule:product-denied
: Product restrictions forbid transaction, e.g., forbidden fuel type - token authorized only for Diesel but attempted to fuel Super.-
errors array[object]
Hide errors attributes Show errors attributes object
-
id string
A unique identifier for this particular occurrence of the problem.
-
links object
Hide links attribute Show links attribute object
-
about string
A link that leads to further details about this particular occurrence of the problem.
-
-
status string
the HTTP status code applicable to this problem, expressed as a string value.
-
code string
an application-specific error code, expressed as a string value.
-
title string
A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
-
detail string
a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
-
source object
An object containing references to the source of the error.
Hide source attributes Show source attributes object
-
meta object
a meta object containing non-standard meta-information about the error.
Hide meta attribute Show meta attribute object
-
-
-
415 application/vnd.api+json
The specified content type header is invalid
Hide response attribute Show response attribute object
Error objects provide additional information about problems encountered while performing an operation. Errors also contain codes besides title and message which can be used for checks even if the detailed messages might change.
*
1000
: generic error *1001
: payment processing temporarily unavailable *1002
: requested amount exceeds the authorized amount of the provided token *1003
: implicit payment methods cannot be modified *1004
: payment method rejected by provider *provider:payment-method-rejected
: payment method rejected by provider (identical to1004
) *rule:product-denied
: Product restrictions forbid transaction, e.g., forbidden fuel type - token authorized only for Diesel but attempted to fuel Super.-
errors array[object]
Hide errors attributes Show errors attributes object
-
id string
A unique identifier for this particular occurrence of the problem.
-
links object
Hide links attribute Show links attribute object
-
about string
A link that leads to further details about this particular occurrence of the problem.
-
-
status string
the HTTP status code applicable to this problem, expressed as a string value.
-
code string
an application-specific error code, expressed as a string value.
-
title string
A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
-
detail string
a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
-
source object
An object containing references to the source of the error.
Hide source attributes Show source attributes object
-
meta object
a meta object containing non-standard meta-information about the error.
Hide meta attribute Show meta attribute object
-
-
-
422 application/vnd.api+json
Available amount exceeded
Hide response attribute Show response attribute object
Error objects provide additional information about problems encountered while performing an operation. Errors also contain codes besides title and message which can be used for checks even if the detailed messages might change.
*
1000
: generic error *1001
: payment processing temporarily unavailable *1002
: requested amount exceeds the authorized amount of the provided token *1003
: implicit payment methods cannot be modified *1004
: payment method rejected by provider *provider:payment-method-rejected
: payment method rejected by provider (identical to1004
) *rule:product-denied
: Product restrictions forbid transaction, e.g., forbidden fuel type - token authorized only for Diesel but attempted to fuel Super.-
errors array[object]
Hide errors attributes Show errors attributes object
-
id string
A unique identifier for this particular occurrence of the problem.
-
links object
Hide links attribute Show links attribute object
-
about string
A link that leads to further details about this particular occurrence of the problem.
-
-
status string
the HTTP status code applicable to this problem, expressed as a string value.
-
code string
an application-specific error code, expressed as a string value.
-
title string
A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
-
detail string
a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
-
source object
An object containing references to the source of the error.
Hide source attributes Show source attributes object
-
meta object
a meta object containing non-standard meta-information about the error.
Hide meta attribute Show meta attribute object
-
-
-
500 application/vnd.api+json
Internal server error
Hide response attribute Show response attribute object
Error objects provide additional information about problems encountered while performing an operation. Errors also contain codes besides title and message which can be used for checks even if the detailed messages might change.
*
1000
: generic error *1001
: payment processing temporarily unavailable *1002
: requested amount exceeds the authorized amount of the provided token *1003
: implicit payment methods cannot be modified *1004
: payment method rejected by provider *provider:payment-method-rejected
: payment method rejected by provider (identical to1004
) *rule:product-denied
: Product restrictions forbid transaction, e.g., forbidden fuel type - token authorized only for Diesel but attempted to fuel Super.-
errors array[object]
Hide errors attributes Show errors attributes object
-
id string
A unique identifier for this particular occurrence of the problem.
-
links object
Hide links attribute Show links attribute object
-
about string
A link that leads to further details about this particular occurrence of the problem.
-
-
status string
the HTTP status code applicable to this problem, expressed as a string value.
-
code string
an application-specific error code, expressed as a string value.
-
title string
A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
-
detail string
a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
-
source object
An object containing references to the source of the error.
Hide source attributes Show source attributes object
-
meta object
a meta object containing non-standard meta-information about the error.
Hide meta attribute Show meta attribute object
-
-
-
502 application/vnd.api+json
Error occurred while communicating with upstream services
Hide response attribute Show response attribute object
Error objects provide additional information about problems encountered while performing an operation. Errors also contain codes besides title and message which can be used for checks even if the detailed messages might change.
*
1000
: generic error *1001
: payment processing temporarily unavailable *1002
: requested amount exceeds the authorized amount of the provided token *1003
: implicit payment methods cannot be modified *1004
: payment method rejected by provider *provider:payment-method-rejected
: payment method rejected by provider (identical to1004
) *rule:product-denied
: Product restrictions forbid transaction, e.g., forbidden fuel type - token authorized only for Diesel but attempted to fuel Super.-
errors array[object]
Hide errors attributes Show errors attributes object
-
id string
A unique identifier for this particular occurrence of the problem.
-
links object
Hide links attribute Show links attribute object
-
about string
A link that leads to further details about this particular occurrence of the problem.
-
-
status string
the HTTP status code applicable to this problem, expressed as a string value.
-
code string
an application-specific error code, expressed as a string value.
-
title string
A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
-
detail string
a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
-
source object
An object containing references to the source of the error.
Hide source attributes Show source attributes object
-
meta object
a meta object containing non-standard meta-information about the error.
Hide meta attribute Show meta attribute object
-
-
curl \
-X POST https://api.pace.cloud/pay/2024-3/payment-methods/93db55b6-a9ab-4597-a253-49a1718cea0a/authorize \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/vnd.api+json"
{
"data": {
"type": "paymentToken",
"id": "f4267aea-2567-4a3c-934d-b8355a76abe9",
"attributes": {
"currency": "EUR",
"amount": 65.49,
"allowPartialAmount": false,
"purposePRNs": [
"prn:poi:gas-stations:124e522d-65ef-4386-b7e0-00d2eceeadc6",
"prn:cms:fuels:ron95"
],
"discountTokens": [
"prn:discount:tokens:f7aa2664-bcfa-4e23-967d-ecd6596b73a9"
],
"twoFactor": {
"otp": "366382",
"method": "string"
}
}
}
}
{
"data": {
"type": "paymentToken",
"id": "33331f72-a672-453c-9d36-d5809ef0ded6",
"attributes": {
"amount": 23,
"currency": "EUR",
"value": "12c52345c1x34",
"validUntil": "2024-05-04T09:42:00+00:00",
"accountPRN": [
"prn:pay:accounts:pace"
],
"purposePRNs": [
"prn:poi:gas-stations:124e522d-65ef-4386-b7e0-00d2eceeadc6",
"prn:cms:fuels:ron95"
]
},
"relationships": {
"paymentMethod": {
"data": {
"type": "paymentMethod",
"id": "33331f72-a672-453c-9d36-d5809ef0ded6"
}
}
}
}
}
{
"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": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}