Payments and Refunds API Webhooks

Payments and Refunds API Webhooks

The Payments and Refunds API supports a set of webhooks. You can subscribe to these webhooks events to get notified when there are changes. For a list of supported webhooks, see Subscribe to Webhook Events. Note the following about these webhooks:

The Payment.createdevent notification is sent when:

  • Square processes these endpoint requests: Payments API ( CreatePayment endpoint), V2 Transactions API ( Charge endpoint).

  • A card payment is taken by a seller through other means, such as the POS app, and Invoices.

The payment.updated event is generated when the state of a card payment changes. For example, in a Delayed capture scenario, payment is only authorized. Later when you call CompletePayment (or CancelPayment), the payment state changes. In addition, if an authorized payment is not completed (or cancelled) within the time limit, the payment automatically gets voided (Square cancels the payment) and you get the payment.updated event notification.

When you refund a payment (using the RefundPayment endpoint), you get the following event notifications:

  • Refund.created initially indicates the task is pending. Later you also get the refund.updated event after the refund either completed (or fails).

  • payment.updated event notification. The Payment object in the notification includes the refund ID.

The refund.updatedevent is sent any time a refund state changes.