Pike13 For Developers
Get Started
Authentication
Core API
Reporting API
Webhooks API
Announcements

Webhooks API Documentation

Transaction

By subscribing to a transaction topic, you will be notified of two transaction types: payments and refunds. Check the data.transactions[0].type to differentiate.

Resource Attributes

data.transactions[0]
idintegerThe transaction's ID.
invoice_idintegerID of the associated invoice.
currency_codestringThe currency ISO code.
amount_centsintegerThe amount in cents of the transaction.
amountstringThe amount in localized currency of the transaction.
error_messagestringThe error message for the transaction if it failed.
descriptionstringThe description of the transaction.
voided_attimestampThe date the transaction was voided.
payment_type_idintegerThe type id of the available payment method.
typestringType is one of ['Payment', 'Refund'].
settledbooleanWhether transaction has settled according to the payment gateway. Settled transactions cannot be voided.
statestringOne of ['failed', 'processing', 'completed', 'checkout']
uuiduuidUUID of the transaction.
autobillbooleanWhether or not this transaction is on autobill.
payment_idintegerID of the payment. Only included if the transaction is a Refund.
external_transaction_idintegerID of the transaction according to the external transaction processor.
payment_typestringType of payment. One of ['cash', 'check', 'creditcard', 'ach', 'comp', 'free', 'external_creditcard', 'square', 'paypal', 'external', 'credit'].
created_attimestampTimestamp for when transaction was created.
updated_attimestampTimestamp for when transaction was last updated.
invoiceobject

Details of the associated invoice.

idintegerID of the invoice.
total_centsstringThe amount total in cents for this invoice.
totalstringThe amount total in localized currency for this invoice.
state_eventsstringAn array of strings containing the valid state events when calling to update the invoice.
send_receiptstringWas a receipt email sent?
receipt_emailstringThe email address the invoice was sent to, if any.
currencystringThe type of currency the invoice is charged in, i.e 'USD'.
statestringThe current state of the invoice. Either 'open', 'closed', 'canceled', 'cart', 'cart_hidden', or 'on_hold.'

transaction.created

Triggers when a new transaction is created.

Payload Example

Transaction Created Webhook Payload

{
  "topic": "transaction.created",
  "webhook_id": 11,
  "business_id": 1,
  "data": {
    "transactions": [
      {
        "id": 1,
        "invoice_id": 1,
        "currency_code": "USD",
        "amount_cents": 10000,
        "amount": "100.00",
        "error_message": null,
        "description": "Stored Visa 1111",
        "voided_at": null,
        "payment_type_id": 3,
        "type": "Payment",
        "settled": false,
        "state": "checkout",
        "uuid": "c8421956-fcef-412c-bc1f-92b7b2dd7156",
        "autobill": false,
        "external_transaction_id": "abc123",
        "payment_type": "creditcard",
        "created_at": "2012-09-03T09:05:02Z",
        "updated_at": "2012-09-03T09:05:02Z",
        "invoice": {
          "id": 1,
          "total_cents": 10000,
          "state_events": [
            "reopen"
          ],
          "send_receipt": false,
          "receipt_email": "john@example.com",
          "currency": "USD",
          "state": "closed"
        }
      }
    ]
  }
}

transaction.updated

Triggers when a certain properties of a transaction are updated.

The specific list of fields that trigger an update are:

Changes to these fields trigger a notification
invoice_id
currency_code
amount_cents
error_message
description
voided_at
payment_type_id
type
settled
state
uuid
autobill
payment_id
external_transaction_id
payment_type
data
transactionsarrayArray of one updated transaction.
previousobject

Previous values of the resource. The following are supported:

invoice_idintegerID of the associated invoice.
currency_codestringThe currency ISO code.
amount_centsintegerThe amount in cents of the transaction.
error_messagestringThe error message for the transaction if it failed.
descriptionstringThe description of the transaction.
voided_attimestampThe date the transaction was voided.
payment_type_idintegerThe type id of the available payment method.
typestringType is one of ['Payment', 'Refund'].
settledbooleanWhether transaction has settled according to the payment gateway. Settled transactions cannot be voided.
statestringOne of ['failed', 'processing', 'completed', 'checkout']
uuiduuidUUID of the transaction.
autobillbooleanWhether or not this transaction is on autobill.
payment_idintegerID of the payment. Only included if the transaction is a Refund.
external_transaction_idintegerID of the transaction according to the external transaction processor.
payment_typestringType of payment. One of ['cash', 'check', 'creditcard', 'ach', 'comp', 'free', 'external_creditcard', 'square', 'paypal', 'external', 'credit'].
updated_attimestampTimestamp for when transaction was last updated.

Payload Example

Transaction Updated Webhook Payload

{
  "topic": "transaction.updated",
  "webhook_id": 12,
  "business_id": 2,
  "data": {
    "transactions": [
      {
        "id": 60,
        "invoice_id": 57,
        "currency_code": "USD",
        "amount_cents": 900,
        "amount": "9.00",
        "error_message": null,
        "description": "Cash",
        "payment_type_id": 1,
        "type": "Refund",
        "settled": true,
        "state": "completed",
        "uuid": "0e7c369c-c4c9-439d-a8eb-2a95bdb53789",
        "autobill": false,
        "payment_id": 59,
        "external_transaction_id": null,
        "payment_type": "cash",
        "voided_at": "2019-03-22T19:43:23Z",
        "created_at": "2019-03-22T19:32:23Z",
        "updated_at": "2019-03-22T19:43:23Z",
        "invoice": {
          "id": 57,
          "total_cents": 900,
          "state_events": [
            "reopen"
          ],
          "send_receipt": false,
          "receipt_email": "john@example.com",
          "currency": "USD",
          "state": "closed"
        }
      }
    ],
    "previous": {
      "voided_at": null,
      "updated_at": "2019-03-22T19:32:23Z"
    }
  }
}