Payment Webhooks

Payment Status Update

Changed on

Primer notifies you with a PAYMENT.STATUS webhook when a payment's status has been updated. This is especially useful for asyncronous processor Connections, which do not respond with an upfront authorization.

The webhook events will arrive in the order that the payment status changes, for example you should expect a status of PENDING, then AUTHORIZED, then SETTLED (depending on how your workflow is set up).

The webhook body contains the full payment object.

post/payment-status

Request

  • Base URL
    https://api.sandbox.primer.io
  • URL
    https://api.sandbox.primer.io/payment-status
  • Auth
    none declared. Required headers: X-Signature-Primary, X-Signature-Secondary

Headers

X-Signature-Primarystring required

An HMAC signature generated using the webhook payload and a shared signing secret. This is then converted to a base64 encoded string.

X-Signature-Secondarystring required

A secondary signature that is added when you have rotated your secret within the past 24 hours.

Request body

eventTypestring required

The type of the webhook raised. PAYMENT.STATUS in this case.

datestring date-time required

The date-time that the webhook was sent.

signedAtstring required

The Unix timestamp at which the webhook payload was signed.

versionstring

The payload version

Example request

{
  "signedAt": "1689221338",
  "version": "2.4",
  "payment": {
    "transactions": [
      {
        "reason": "Item returned."
      }
    ],
    "riskData": {
      "fraudChecks": {
        "source": "FRAUD_PROVIDER"
      },
      "cvvCheck": {
        "source": "PROCESSOR"
      },
      "avsCheck": {
        "source": "PROCESSOR"
      }
    }
  }
}

Response

Return a 200 status to indicate that the data was received successfully

Changes

    • info

      added the new XCG enum value to the request property ///////

    • info

      added the new XCG enum value to the request property ////

    • info

      added the new ZWG enum value to the request property ///////

    • info

      added the new ZWG enum value to the request property ////

    • info

      added the new optional request property //////