Get transaction

GET https://api.ecurring.com/transactions/{id}

Retrieve a single transaction by its identifier.

Parameters

Replace {id} in the URL with the unique identifier of the transaction.

fields[TYPE]
string
Optional - A comma seperated list of fields to return as data properties in the response. Known as Sparse Fieldsets. Replace TYPE with the name of the resource.

Response

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

Data attributes

status
string
The current status of the transaction. Possible values are scheduled, succeeded, fulfilled, charged_back, payment_failed, rescheduled, failed, payment_reminder_scheduled, payment_reminder_sent and payment_reminder_overdue.
scheduled_on
datetime
The date on which this transaction was scheduled. Generally this is the date on which the subscription was activated. In ISO 8601 format.
due_date
datetime
The date on which the transaction will be, or was, executed. Usually a transaction will be fulfilled within 3 days of this date. If a transaction was rescheduled after a charge back, this attribute will reflect the date of the next attempt. In ISO 8601 format.
amount
double
The amount of the transaction, in Euro.
cancelled_on
datetime
Optional - The date on which the transaction was cancelled. Only filled if the current status of the transaction is cancelled In ISO 8601 format.
webhook_url
string
Optional - The webhook URL we will call when the status of this transaction changes, inherited from the subscription.
payment_method
string
The payment method used for this payment. For fullfilled transactions this is the actual method used, for future transactions this will be payment method used for the first attempt. However, the method may change if the attempt fails and the transaction is fulfilled through other means (a payment reminder, for example).
history
array
Collection of objects with the full life cycle history of the transaction.
attempt integer The current collection attempt. Starts at 1 and will be increased after every re-schedule.
status string The status of the transaction at this point in time. Possible values are scheduled, succeeded, fulfilled, charged_back, payment_failed, rescheduled, failed, payment_reminder_scheduled, payment_reminder_sent and payment_reminder_overdue.
recorded_on datetime The date and time on which this event was record. In ISO 8601 format.
reason string Optional - The charge back or failure reason. Only provided when the status is charged_back or failed
reason_code string Optional - The SEPA charge back or failure reason code. Only provided when the status is charged_back or failed
new_due_date datetime Optional - This contains the new due date in this point in time when a transaction is rescheduled. Only available when the status is rescheduled

Statuses

Both the main transaction object and the history object can contain any of these statuses.

scheduled The transaction is currently scheduled and will be executed on it's due_date
succeeded The transaction has succesfully been sent to the payment provider and is awaiting fulfillment.
fulfilled The transaction has been fulfilled. It is still possible for the transaction to be charged back due to insufficient funds or manual client action.
charged_back The transaction was charged back. In most cases a reason and reason_code will be provided to indicate the cause of the charge back.
rescheduled The transaction was rescheduled after a charge back. A new due date is provided in the new_due_date attribute to indicate when the next collection attempt will take place. Generally this will take place 3 days after the charge back date.
failed The transaction was not accepted by the payment provider. In many cases this is because of a invalid IBAN. The transaction will usually continue to fail until the problem is resolved.
payment_reminder_scheduled A payment reminder is scheduled to be sent for this transaction. This means the transaction has failed and payment reminders are enabled on the subscription plan.
payment_reminder_sent A payment reminder was sent to the customer for this transaction.
payment_reminder_overdue All payment reminders have been sent and have remained unpaid. All reminders expire after a certain time. Once the last reminder has expired the transaction will be set to this status.

Example

Below is an example of a transaction that was fulfilled, charged back (because of insufficient funds) and retried.

{
    "links": {
        "self": "https://api.ecurring.com/transactions/ffa38848-6abc-4d22-b6b0-63fe1780969c"
    },
    "data": {
        "type": "transaction",
        "id": "ffa38848-6abc-4d22-b6b0-63fe1780969c",
        "links": {
            "self": "https://api.ecurring.com/transactions/ffa38848-6abc-4d22-b6b0-63fe1780969c"
        },
        "attributes": {
            "status": "fulfilled",
            "scheduled_on": "2017-11-01T11:35:00+01:00",
            "due_date": "2017-11-07T00:00:00+01:00",
            "amount": 50.6,
            "canceled_on": null,
            "webhook_url": null,
            "payment_method": "directdebit",
            "history": [
                {
                    "attempt": 1,
                    "reason": null,
                    "reason_code": null,
                    "recorded_on": "2017-11-01T11:35:00+01:00",
                    "status": "scheduled",
                    "new_due_date": null
                },
                {
                    "attempt": 1,
                    "reason": null,
                    "reason_code": null,
                    "recorded_on": "2017-11-02T07:00:02+01:00",
                    "status": "succeeded",
                    "new_due_date": null
                },
                {
                    "attempt": 1,
                    "reason": null,
                    "reason_code": null,
                    "recorded_on": "2017-11-06T04:14:37+01:00",
                    "status": "fulfilled",
                    "new_due_date": null
                },
                {
                    "attempt": 1,
                    "reason": "Insufficient funds",
                    "reason_code": "AM04",
                    "recorded_on": "2017-11-10T03:43:23+01:00",
                    "status": "charged_back",
                    "new_due_date": null
                },
                {
                    "attempt": 1,
                    "reason": null,
                    "reason_code": null,
                    "recorded_on": "2017-11-10T03:43:23+01:00",
                    "status": "rescheduled",
                    "new_due_date": "2017-11-13T00:00:00+01:00"
                },
                {
                    "attempt": 2,
                    "reason": null,
                    "reason_code": null,
                    "recorded_on": "2017-11-13T07:00:00+01:00",
                    "status": "succeeded",
                    "new_due_date": null
                },
                {
                    "attempt": 2,
                    "reason": null,
                    "reason_code": null,
                    "recorded_on": "2017-11-14T03:54:52+01:00",
                    "status": "fulfilled",
                    "new_due_date": null
                }
            ]
        }
    }
}