Webhooks

Create/Register a webhook endpoint

Changed on

Create/Register a webhook endpoint to start receiving events

post/webhooks

Request

  • Base URL
    https://sandbox-api.ryftpay.com/v1
  • URL
    https://sandbox-api.ryftpay.com/v1/webhooks
  • Auth
    API key in header Authorization

Request body

urlstring

The URL of your webhook endpoint to register

activeboolean

Whether the endpoint is active (receiving events) or not

eventTypesEventType[]

The event types you want the endpoint to receive

Example request

{
  "url": "https://example-endpoint.com/webhook",
  "active": true,
  "eventTypes": [
    "PaymentSession.captured",
    "PaymentSession.refunded"
  ]
}

Response

Webhook successfully registered

secretstring

The Webhook's signature secret (only returned on initial creation). Ensure this is stored securely

idstring

The unique Id for the webhook endpoint

activeboolean

Whether the endpoint is actively receiving events or not

urlstring

The URL of the webhook endpoint

eventTypesEventType[]

The event types the endpoint is receiving

createdTimestampinteger

The epoch timestamp (seconds) when the webhook endpoint was created

lastUpdatedTimestampinteger

The epoch timestamp (seconds) when the webhook endpoint was last updated

Example response

{
  "secret": "whs_0f6b1b5a-aef0-4011-978b-19fd4a4d46ea",
  "id": "wh_31fba123-0fef-41d6-92ad-fd7089f49f8a",
  "active": true,
  "url": "https://example-endpoint.com/webhook",
  "eventTypes": [
    "PaymentSession.captured",
    "PaymentSession.refunded"
  ],
  "createdTimestamp": 1470989538,
  "lastUpdatedTimestamp": 1470989538
}

Changes

    • info

      added the optional property to the response with the status

    • warning

      added the new Conversion.created enum value to the / response property for the response status

    • warning

      added the new Conversion.updated enum value to the / response property for the response status

    • info

      added the new Conversion.created enum value to the request property /////

    • info

      added the new Conversion.updated enum value to the request property /////