Context
A payment has 2 states:
- A functional state (Status), which can be seen as a simplified or external state
- A technical state (StatePayment), which reflects the functional state and adds information about the payment lifecycle.
Functional states
This state is the one you will most likely care about. It indicates the state of the payment from an external point of view and is most likely the information an external software will require.
Important : a payment is related to a single money exchange between your organization and the customer. If a payment is refunded or charged back, there will be 2 payments in ProAbono, the first one for the completed payment, the second one for the reversal payment.
Functional state (Status) |
Description |
Draft | This state is not used for now, it’s added for future evolutions. |
Pending | The payment is pending. Generally used by direct debit. |
Completed | The payment is complete, the funds are either on your payment provider account or directly on your bank account. |
Cancelled | The payment has been cancelled |
Failed | The payment attempt ended with a failure |
Reversed | This is a reversal of a previous payment, because of a refund or a chargeback |
Technical states
This state is useful only if you want more accurate information about a payment. It gives more accurate information about the reason the payment ended is the given state.
Functional state | Technical state (StatePayment) |
Description |
---|---|---|
Draft | Draft | This state is not used for now, it’s added for future evolutions |
Pending | Pending | The payment is in progress and will change status once the process has been completed. |
Completed | Completed | The payment is completed |
CompletedRefunded | The payment is completed but has been a refunded. There is another related ‘Reversal’ payment. | |
CompletedChargedback | The payment is completed but has been a charged back. There is another related ‘Reversal’ payment. | |
Cancelled | CancelledAgent | The payment has been cancelled by a someone from your organization |
Failed | Failed | The payment attempt ended with a failure |
Reversed | ReversedRefund | The funds have been reversed due to a refund by someone from your organization |
ReversedChargeback | The funds have been reversed due to a chargeback by the customer or the customer’s bank |
Example of a JSON-format payment
{ "Id": 42", ... "ReferenceCustomer": "123456", "Status": "Completed", // Functional state "StatePayment": "CompletedRefunded", // Technical state ... }