Authorize a payment using the payment method
When successful, returns a paymentToken value.
POST /payment-methods/{paymentMethodId}/authorize
curl \
-X POST https://api.pace.cloud/pay/2024-1/payment-methods/93db55b6-a9ab-4597-a253-49a1718cea0a/authorize \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/vnd.api+json"
Request examples
{
"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"
}
}
}
}
Response examples (201)
{
"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"
}
}
}
}
}
Response examples (400)
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
Response examples (401)
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
Response examples (403)
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
Response examples (404)
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
Response examples (405)
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
Response examples (406)
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
Response examples (409)
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
Response examples (410)
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
Response examples (415)
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
Response examples (422)
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
Response examples (500)
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
Response examples (502)
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}