Webhooks are designed to notify your systems when certain events happen in near real-time. They allow you to collect information about those events. Rebilly can send these notifications via "GET", "POST", "PUT", "PATCH", "DELETE" to a URL of your choice.

Here is the list of available webhooks context:

  • Invoices
  • Subscriptions
  • Transactions
  • PaymentCard
  • Disputes

You can restrict webhook triggering to specific events by filling the eventsFilter field. By default eventsFilter = [](All events)
You can set an array of System event types, like ["gateway-account-requested", "subscription-canceled"] using event types from the list below:

  • "gateway-account-requested" - When a gateway account is requested.
  • "subscription-trial-ended" - When a subscription trial period is ended.
  • "subscription-activated" - When a subscription is activated.
  • "subscription-canceled" - When a subscription is canceled.
  • "subscription-renewed" - When a subscription is renewed.
  • "transaction-processed" - When a transaction is processed.
  • "payment-card-expired" - When a payment card is expired.
  • "payment-declined" - When a payment is declined.
  • "invoice-modified" - When an invoice is modified.
  • "invoice-created" - When an invoice is created.
  • "dispute-created" - When a dispute is created.
  • "offsite-payment-completed" - When an offsite payment is completed.

See the full list available here.

Near real-time

Webhooks may be delayed or delivered multiple times and therefore should not be used to make some actionable decisions.

Webhooks Configuration & Specification

Each website you add to Rebilly can have its own webhook configuration. This includes the URI where you want us to send the webhook to, along with optional HTTP basic access authentication details. Notifications are sent as either HTTP or HTTPS "GET", "POST", "PUT", "PATCH", "DELETE" requests.

Security

First of all you should create Webhook Credential Hashes using our API for your webhook host.
HTTP basic access authentication through HTTPS is highly recommended. It adds an extra layer of security around your webhook endpoint that can prevent undesired data injection by third-parties.

Note: Our webhooks are sent from the following IP range 54.208.113.57/32. This may change. Note: If you have enabled HTTP basic access authentication; Rebilly will also send a Authorization header along with the "GET", "POST", "PUT", "PATCH", "DELETE" request.

An example of a header with HTTP basic access authentication enable and using username = rebilly, password = superman:

POST /odt4xsod HTTP/1.1
User-Agent: Rebilly - Push
Host: hookb.in
Content-Type: application/json; charset=utf-8
Content-Length: 478
Connection: close
Authorization: Basic cmViaWxseTpzdXBlcm1hbgo=
Accept-Encoding: gzip, deflate

If you base64 decode(cmViaWxseTpzdXBlcm1hbgo=) you will get rebilly:superman.

Your response

Rebilly expects an HTTP 200 OK response after a successful webhook transmission to your systems.
If there is no response within 20 seconds or the HTTP response code is not 200, it will be considered not sent, and be marked for retry.
We will try to resend it automatically after 30 minutes, and then at an exponential backoff (at 1, 2, 4, 8, 16 hours) for a total of 6 retry attempts until successful. If still unsuccessful, it will not be attempted again.

Data Validity

When a notification is triggered Rebilly will send your endpoint all the information in our records at the time of the event.

Note: The data contained in the webhook will always reflect the state of our records at that time of the event. In the event of a delay your records might be more up to date than the data sent by the webhook.

For example:

  1. A customer makes a transaction that triggers your webhook. They do not fill the address2 field.
  2. The notification transmission is delayed for a few minutes.
  3. Your system modifies the address2 field with new data before a notification is received.
  4. The notification for the transaction is received by your systems but the address2 field is empty unlike your records.

Testing

To test Webhooks, you can use the https://hookbin.com/ tool which is an excellent utility that helps you see data come across as various events are triggered in Rebilly.
First of all you should create Webhook Credential Hashes using our API for your webhook host.
Then you can see Webhooks API Documentation for details. So you can Trigger a test webhook by sending this JSON object to our API (via POST)


Note: Depending on how many set of types you specify in the array eventsFilter as many webhooks with the necessary content will be triggered. If you leave it empty then all available webhooks will be called.

Here's an example:

{
    "eventsFilter": ["invoice-created"],
    "status": "active",
    "method": "GET",
    "url": "http://your_webhook_url.com",
    "headers":[{"name":"name", "value":"value", "active":true}]
    "credentialHash": "hash string for your host"
}

to /v2.1/previews/webhooks, and you can get a test RAW BODY, like:

{
    "eventType": "invoice-created",
    "invoiceId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
    "_embedded": [
        "invoice": {
            "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
            "customerId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
            "websiteId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
            "organizationId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
            "currency": "string",
            "amount": 0,
            "billingContactId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
            "deliveryContactId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
            "notes": "string",
            "items": [
                "string"
            ],
            "abandonedTime": "2017-03-17T11:22:24Z",
            "voidedTime": "2017-03-17T11:22:24Z",
            "closedTime": "2017-03-17T11:22:24Z",
            "dueTime": "2017-03-17T11:22:24Z",
            "issuedTime": "2017-03-17T11:22:24Z",
            "createdTime": "2017-03-17T11:22:24Z",
            "_links": [
                {
                    "rel": "self",
                    "href": "https://api-sandbox.rebilly.com/v2.1/invoices/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
                },
                {
                    "rel": "customer",
                    "href": "https://api-sandbox.rebilly.com/v2.1/customers/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
                },
                {
                    "rel": "website",
                    "href": "https://api-sandbox.rebilly.com/v2.1/websites/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
                },
                {
                    "rel": "billingContact",
                    "href": "https://api-sandbox.rebilly.com/v2.1/contacts/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
                },
                {
                    "rel": "deliveryContact",
                    "href": "https://api-sandbox.rebilly.com/v2.1/contacts/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
                },
                {
                    "rel": "organization",
                    "href": "https://api-sandbox.rebilly.com/v2.1/organizations/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
                },
                {
                    "rel": "leadSource",
                    "href": "https://api-sandbox.rebilly.com/v2.1/invoices/4f6cf35x-2c4y-483z-a0a9-158621f77a21/lead-source"
                }
            ]
        }
    ],
    "_links": [
        {
            "rel": "invoice",
            "href": "https://api-sandbox.rebilly.com/v2.1/invoices/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
        }
    ]
}

at your side.

Note: We may add additional nodes of data in the future or send them in a different order, so do not parse the webhooks based on a specific index number, but rather based on the names of the key/value pairs in the JSON object. We may also omit nodes if their value is null.

Webhooks Configuration in Rebilly UI

To configure Webhooks, go to "SETTINGS" => "Webhooks" at the menu.
You can see the list of your webhooks (it can be empty if there are no webhooks yet), create a new webhook by clicking Create Webhook or edit a webhook from the list.
Create Webhook or Update Webhook page has the similar set of elements to configure(or create new) your webhook.
You can specify Webhook ID, set the Status (on/off) of the webhook.
To specify the Events Filter please choice these in selectbox, or leave empty so that webhooks are triggered for all events.
Then set the Webhook URL and method "GET", "POST", "PUT", "PATCH", "DELETE" of request.
Below this you can also specify AUTHORIZATION or HEADERS information for webhook connection.
So you can Trigger a test webhook by clicking Test Webhook button.
If it works you can Save Webhook or Cancel it.

Example Event Notifications

All of events objects are serialized and sent in response field like ..., "_embedded": [ ... {} ... ]

Invoice

This webhook is sent whenever an invoice is created or updated (except for initially void invoices). ("eventsFilter" : ["invoice-created", "invoice-modified"])

Here's an example:

{
    "eventType": "invoice-created",
    "invoiceId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
    "_embedded": [
        "invoice": {
        "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "customerId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "websiteId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "organizationId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "currency": "string",
        "amount": 0,
        "billingContactId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "deliveryContactId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "notes": "string",
        "items": [
            "string"
        ],
        "abandonedTime": "2017-03-17T11:22:24Z",
        "voidedTime": "2017-03-17T11:22:24Z",
        "closedTime": "2017-03-17T11:22:24Z",
        "dueTime": "2017-03-17T11:22:24Z",
        "issuedTime": "2017-03-17T11:22:24Z",
        "createdTime": "2017-03-17T11:22:24Z",
        "_links": [
            {
                "rel": "self",
                "href": "https://api-sandbox.rebilly.com/v2.1/invoices/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "customer",
                "href": "https://api-sandbox.rebilly.com/v2.1/customers/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "website",
                "href": "https://api-sandbox.rebilly.com/v2.1/websites/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "billingContact",
                "href": "https://api-sandbox.rebilly.com/v2.1/contacts/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "deliveryContact",
                "href": "https://api-sandbox.rebilly.com/v2.1/contacts/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "organization",
                "href": "https://api-sandbox.rebilly.com/v2.1/organizations/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "leadSource",
                "href": "https://api-sandbox.rebilly.com/v2.1/invoices/4f6cf35x-2c4y-483z-a0a9-158621f77a21/lead-source"
            }
        ]
    },
    ],
        "_links": [
        {
            "rel": "invoice",
            "href": "https://api-sandbox.rebilly.com/v2.1/invoices/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
        }
    ]
}

Subscription

This webhook is sent whenever a subscription is activated or renewed (including cancelled, trial-ended). ("eventsFilter" : ["subscription-renewed", "subscription-canceled", "subscription-activated", "subscription-trial-ended"]) The payload includes subscription context. For example, if the canceledTime is null, then the customer did not cancel.

Here's an example:

{
    "eventType": "subscription-renewed",
    "invoiceId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
    "subscriptionId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
    "_embedded": [
        "subscription": {
        "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "customerId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "planId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "websiteId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "initialInvoiceId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "deliveryContactId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "billingContactId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "status": "string",
        "quantity": 0,
        "autopay": true,
        "inTrial": true,
        "rebillNumber": 0,
        "canceledBy": "merchant",
        "cancelCategory": "billing-failure",
        "cancelDescription": "string",
        "startTime": "2017-03-17T11:22:37Z",
        "activationTime": "2017-03-17T11:22:37Z",
        "endTime": "2017-03-17T11:22:37Z",
        "renewalTime": "2017-03-17T11:22:37Z",
        "canceledTime": "2017-03-17T11:22:37Z",
        "createdTime": "2017-03-17T11:22:37Z",
        "updatedTime": "2017-03-17T11:22:37Z",
        "customFields": {},
        "_links": [
            {
            "rel": "self",
            "href": "https://api-sandbox.rebilly.com/v2.1/subscriptions/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "customer",
                "href": "https://api-sandbox.rebilly.com/v2.1/customers/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "plan",
                "href": "https://api-sandbox.rebilly.com/v2.1/plans/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "website",
                "href": "https://api-sandbox.rebilly.com/v2.1/websites/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "billingContact",
                "href": "https://api-sandbox.rebilly.com/v2.1/contacts/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "deliveryContact",
                "href": "https://api-sandbox.rebilly.com/v2.1/contacts/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "leadSource",
                "href": "https://api-sandbox.rebilly.com/v2.1/subscriptions/4f6cf35x-2c4y-483z-a0a9-158621f77a21/lead-source"
            }
        ]
    },
    "invoice": {
        "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "customerId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "websiteId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "organizationId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "currency": "string",
        "amount": 0,
        "billingContactId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "deliveryContactId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "notes": "string",
        "items": [
            "string"
        ],
        "abandonedTime": "2017-03-17T11:22:24Z",
        "voidedTime": "2017-03-17T11:22:24Z",
        "closedTime": "2017-03-17T11:22:24Z",
        "dueTime": "2017-03-17T11:22:24Z",
        "issuedTime": "2017-03-17T11:22:24Z",
        "createdTime": "2017-03-17T11:22:24Z",
        "_links": [
            {
                "rel": "self",
                "href": "https://api-sandbox.rebilly.com/v2.1/invoices/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "customer",
                "href": "https://api-sandbox.rebilly.com/v2.1/customers/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "website",
                "href": "https://api-sandbox.rebilly.com/v2.1/websites/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "billingContact",
                "href": "https://api-sandbox.rebilly.com/v2.1/contacts/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "deliveryContact",
                "href": "https://api-sandbox.rebilly.com/v2.1/contacts/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "organization",
                "href": "https://api-sandbox.rebilly.com/v2.1/organizations/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "leadSource",
                "href": "https://api-sandbox.rebilly.com/v2.1/invoices/4f6cf35x-2c4y-483z-a0a9-158621f77a21/lead-source"
            }
        ]
    }
    ],
    "_links": [
        {
            "rel": "invoice",
            "href": "https://api-sandbox.rebilly.com/v2.1/invoices/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
        },
        {
            "rel": "subscription",
            "href": "https://api-sandbox.rebilly.com/v2.1/subscriptions/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
        }
    ]
}

Transaction

Whenever an attempt at a transaction occurs (whether approved or declined) ("eventsFilter" : [ "transaction-processed"]) , we send a webhook to you with the following context.

Here's an example:

{
    "eventType": "transaction-processed",
    "transactionId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
    "_embedded": [
        "transaction": {
            "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
            "type": "authorize",
            "status": "completed",
            "result": "approved",
            "amount": 0,
            "currency": "string",
            "parentTransactionId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
            "childTransactions": [
                "4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            ],
            "invoiceIds": [
                "4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            ],
            "subscriptionIds": [
                "4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            ],
            "rebillNumber": 0,
            "gatewayAccountId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
            "gatewayTransactionId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
            "gateway": {
                "response": {
                    "code": "string",
                    "message": "string",
                    "type": "string",
                    "originalCode": "string",
                    "originalMessage": "string"
                },
                "avsResponse": {
                    "code": "string",
                    "message": "string"
                },
                "cvvResponse": {
                    "code": "string",
                    "message": "string"
                }
            },
            "gatewayName": "string",
            "acquirerName": "string",
            "websiteId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
            "customerId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
            "method": "ach",
            "velocity": 0,
            "bin": "string",
            "paymentInstrument": {
                "method": "ach"
            },
            "billingContactId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
            "has3ds": true,
            "3ds": {
                "enrolled": "yes",
                "authenticated": "yes",
                "liability": "protected"
            },
            "hasDcc": true,
            "riskScore": 0,
            "dcc": {
                "base": {
                    "amount": 0,
                    "currency": "string"
                },
            "quote": {
                "amount": 0,
                "currency": "string"
            },
            "usdMarkup": 0,
            "outcome": "rejected"
        },
        "createdTime": "2017-03-17T11:22:39Z",
        "updatedTime": "2017-03-17T11:22:39Z",
        "_links": [
            {
                "rel": "self",
                "href": "https://api-sandbox.rebilly.com/v2.1/transactions/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "gatewayAccount",
                "href": "https://api-sandbox.rebilly.com/v2.1/gateway-accounts/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "customer",
                "href": "https://api-sandbox.rebilly.com/v2.1/customers/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "website",
                "href": "https://api-sandbox.rebilly.com/v2.1/websites/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "paymentCard",
                "href": "https://api-sandbox.rebilly.com/v2.1/payment-cards/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "payment",
                "href": "https://api-sandbox.rebilly.com/v2.1/payments/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "parentTransaction",
                "href": "https://api-sandbox.rebilly.com/v2.1/transactions/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "billingContact",
                "href": "https://api-sandbox.rebilly.com/v2.1/contacts/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            }
        ]
    },
    ],
    "_links": [
        {
            "rel": "transaction",
            "href": "https://api-sandbox.rebilly.com/v2.1/transactions/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
        }
    ]
}

Dispute

Whenever a dispute created ("eventsFilter" : ["dispute-created"]), we send a webhook notification to you with the following context.

Here's an example:

{
    "eventType": "dispute-created",
    "disputeId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
    "_embedded": [
        "dispute": {
        "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "customerId": "string",
        "transactionId": "string",
        "currency": "string",
        "amount": 0,
        "acquirerReferenceNumber": "string",
        "reasonCode": "1000",
        "category": "fraud",
        "type": "information-request",
        "status": "response-needed",
        "postedTime": "2017-03-17T11:22:22Z",
        "deadlineTime": "2017-03-17T11:22:22Z",
        "rawResponse": "string",
        "resolvedTime": "2017-03-17T11:22:22Z",
        "createdTime": "2017-03-17T11:22:22Z",
        "updatedTime": "2017-03-17T11:22:22Z",
        "_links": [
            {
                "rel": "self",
                "href": "https://api-sandbox.rebilly.com/v2.1/disputes/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            }
        ]
        },
    ],
    "_links": [
        {
            "rel": "dispute",
            "href": "https://api-sandbox.rebilly.com/v2.1/disputes/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
        }
    ]
}

Payment

Whenever a payment declined or suspended payment completed ("eventsFilter" : ["payment-declined", "suspended-payment-completed"]), we send a webhook notification to you with the following context.

Here's an example:

{
    "eventType": "payment-declined",
    "transactionId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
    "_embedded": [
        "transaction": {
            "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
            "type": "authorize",
            "status": "completed",
            "result": "approved",
            "amount": 0,
            "currency": "string",
            "parentTransactionId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
            "childTransactions": [
                "4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            ],
            "invoiceIds": [
                "4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            ],
            "subscriptionIds": [
            "4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            ],
            "rebillNumber": 0,
            "gatewayAccountId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
            "gatewayTransactionId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
            "gateway": {
                "response": {
                    "code": "string",
                    "message": "string",
                    "type": "string",
                    "originalCode": "string",
                    "originalMessage": "string"
                },
                "avsResponse": {
                "code": "string",
                "message": "string"
            },
            "cvvResponse": {
                "code": "string",
                "message": "string"
            }
        },
        "gatewayName": "string",
        "acquirerName": "string",
        "websiteId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "customerId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "method": "ach",
        "velocity": 0,
        "bin": "string",
        "paymentInstrument": {
            "method": "ach"
        },
        "billingContactId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "has3ds": true,
        "3ds": {
            "enrolled": "yes",
            "authenticated": "yes",
            "liability": "protected"
        },
        "hasDcc": true,
        "riskScore": 0,
        "dcc": {
            "base": {
                "amount": 0,
                "currency": "string"
            },
            "quote": {
                "amount": 0,
                "currency": "string"
            },
            "usdMarkup": 0,
            "outcome": "rejected"
        },
        "createdTime": "2017-03-17T11:22:39Z",
        "updatedTime": "2017-03-17T11:22:39Z",
        "_links": [
                    {
                        "rel": "self",
                        "href": "https://api-sandbox.rebilly.com/v2.1/transactions/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
                    },
                    {
                        "rel": "gatewayAccount",
                        "href": "https://api-sandbox.rebilly.com/v2.1/gateway-accounts/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
                    },
                    {
                        "rel": "customer",
                        "href": "https://api-sandbox.rebilly.com/v2.1/customers/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
                    },
                    {
                        "rel": "website",
                        "href": "https://api-sandbox.rebilly.com/v2.1/websites/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
                    },
                    {
                            "rel": "paymentCard",
                            "href": "https://api-sandbox.rebilly.com/v2.1/payment-cards/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
                    },
                    {
                            "rel": "payment",
                            "href": "https://api-sandbox.rebilly.com/v2.1/payments/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
                    },
                    {
                        "rel": "parentTransaction",
                        "href": "https://api-sandbox.rebilly.com/v2.1/transactions/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
                    },
                    {
                        "rel": "billingContact",
                        "href": "https://api-sandbox.rebilly.com/v2.1/contacts/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
                    }
                ]
            },
        ],
        "_links": [
        {
            "rel": "transaction",
            "href": "https://api-sandbox.rebilly.com/v2.1/transactions/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
        }
    ]
}

Payment Card

Whenever a payment card is expired ("eventsFilter" : ["payment-card-expired"]), we send a webhook notification to you with the following context.

Here's an example:

{
    "eventType": "payment-card-expired",
    "paymentCardId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
    "_embedded": [
        "paymentCard": {
        "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "customerId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "pan": "string",
        "bin": "string",
        "last4": "string",
        "expYear": 0,
        "expMonth": 0,
        "cvv": "string",
        "billingContactId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
        "token": "string",
        "safeHash": "string",
        "status": "active",
        "brand": "Visa",
        "bankCountry": "string",
        "bankName": "string",
        "createdTime": "2017-03-17T11:22:32Z",
        "updatedTime": "2017-03-17T11:22:32Z",
        "customFields": {},
        "_links": [
            {
                "rel": "self",
                "href": "https://api-sandbox.rebilly.com/v2.1/payment-cards/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "customer",
                "href": "https://api-sandbox.rebilly.com/v2.1/customers/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            },
            {
                "rel": "billingContact",
                "href": "https://api-sandbox.rebilly.com/v2.1/contacts/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
            }
        ]
    },
    ],
    "_links": [
        {
            "rel": "paymentCard",
            "href": "https://api-sandbox.rebilly.com/v2.1/payment-cards/4f6cf35x-2c4y-483z-a0a9-158621f77a21"
        }
    ]
}
Did this answer your question?