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 chargeback, 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). | |||||||||||||||||||||
description
string |
Optional - The description of the transaction. This will be shown on the customer’s bank or card statement when possible. | |||||||||||||||||||||
history
array |
Collection of objects with the full life cycle history of the transaction.
|
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 chargeback.
|
payment_failed
|
The transaction was rejected by the bank. In most cases a reason and reason_code will be provided to indicate the cause of the failure.
|
rescheduled
|
The transaction was rescheduled after a chargeback. 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 chargeback 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. |
refunded
|
The transaction was refunded. This can only occur when a refund is manually created. |
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",
"description": null,
"history": [
{
"attempt": 1,
"external_payment_id": null,
"reason": null,
"reason_code": null,
"recorded_on": "2017-11-01T11:35:00+01:00",
"status": "scheduled",
"new_due_date": null
},
{
"attempt": 1,
"external_payment_id": "tr_7UhSN1zuXS",
"reason": null,
"reason_code": null,
"recorded_on": "2017-11-02T07:00:02+01:00",
"status": "succeeded",
"new_due_date": null
},
{
"attempt": 1,
"external_payment_id": "tr_7UhSN1zuXS",
"reason": null,
"reason_code": null,
"recorded_on": "2017-11-06T04:14:37+01:00",
"status": "fulfilled",
"new_due_date": null
},
{
"attempt": 1,
"external_payment_id": "tr_7UhSN1zuXS",
"reason": "Insufficient funds",
"reason_code": "AM04",
"recorded_on": "2017-11-10T03:43:23+01:00",
"status": "charged_back",
"new_due_date": null
},
{
"attempt": 1,
"external_payment_id": null,
"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,
"external_payment_id": "tr_WDqYK6vllg",
"reason": null,
"reason_code": null,
"recorded_on": "2017-11-13T07:00:00+01:00",
"status": "succeeded",
"new_due_date": null
},
{
"attempt": 2,
"external_payment_id": "tr_WDqYK6vllg",
"reason": null,
"reason_code": null,
"recorded_on": "2017-11-14T03:54:52+01:00",
"status": "fulfilled",
"new_due_date": null
}
]
}
}
}