Payment Attempts API
Resolve a payment attempt
Changed onResolve a payment attempt that succeeded or failed outside of Primer. No payment is created, and the tokenised payment instrument associated with the attempt is invalidated so it cannot be reused. Call this endpoint when you have processed the payment yourself (e.g. via a different PSP) and want to record the outcome against the attempt. Set `vaultPaymentMethod` to vault the card used for the attempt instead of invalidating it. This requires `outcome` to be `SUCCEEDED`.
post/payment-attempts/{id}/resolve
Request
- Base URLhttps://api.sandbox.primer.io
- URLhttps://api.sandbox.primer.io/payment-attempts/{id}/resolve
- AuthAPI key in header X-API-KEY
Path parameters
idstring uuid required
ID of the payment attempt to resolve.
Headers
X-API-VERSIONstring required
Example:2.4
Specifies the version of the API to use. This must be set to 2.4.
Request body
Response
Successful Response
Example response
{
"vaultedPaymentMethod": {
"createdAt": "2021-03-01T12:00:00.123456",
"token": "_xlXlmBcTnuFxc2N3HAI73wxNjE1NTU5ODY5",
"tokenType": "MULTI_USE",
"analyticsId": "vuXhpZouWxaZpRZ-x_brZmtT",
"paymentMethodType": "PAYMENT_CARD",
"paymentMethodData": {
"last4Digits": "1111",
"expirationMonth": "12",
"expirationYear": "2030",
"cardholderName": "John Biggins",
"network": "Visa",
"networkTransactionId": "020210628190752",
"accountFundingType": "DEBIT"
},
"customerId": "customer-123",
"description": "My first card",
"deleted": false,
"default": true
}
}Changes
- info
added the new optional request property
- info
added the optional property
to the response with the status
- info
- info
endpoint added
- info