Authorize a payment using Apple Pay by providing a Apple Pay token.
When successful, returns a paymentToken value. Requires the caller to interact with Apple Pay
to create the applePay
section.
Clients need to call /payment-method-kinds/applepay/session
beforehand to obtain a Apple Pay
PaymentSession that can be used to obtain the applePay payload.
POST /payment-method-kinds/applepay/authorize
curl \
-X POST https://api.pace.cloud/pay/2024-3/payment-method-kinds/applepay/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,
"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"
},
"applePay": {
"paymentData": {
"version": "EC_v1",
"data": "xPE3fXmvym6529AxxQw2PN6czhxoXj2ylfHnJdiRdZktiMdDe2.........",
"signature": "MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCAB......",
"familyName": "Schoenbeck",
"header": {
"ephemeralPublicKey": "MFkwEw.......",
"publicKeyHash": "qfj/gQGrF0K6y2EhKDoYUhdi84JEg.....",
"transactionId": "58afcabaa130747ca92eeaff362......"
}
},
"paymentMethod": {
"displayName": "Visa 0492",
"network": "Visa",
"type": "debit"
},
"transactionIdentifier": "259E4924A74239E0A10DEFD065B2250412D28B9A5739925E43640B25668F61F5"
},
"billingEmail": "jon.smith@example.com"
}
}
}
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 (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 (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 (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": {}
}
]
}