> For the complete documentation index, see [llms.txt](https://6dot50.gitbook.io/6dot50-apis/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://6dot50.gitbook.io/6dot50-apis/redemptions-api/payment-codes.md).

# Payment Codes

Payments will always have a certain Status denoted by a [Status Code](#status-codes) and, where applicable, will contain [Error Codes](#error-codes) to provide more info.&#x20;

Payment Status and Error Codes are of type int.&#x20;

The following tables summarise the expected responses, as well as user-friendly messages returned for Payments.

### Status Codes

<table><thead><tr><th width="96.33333333333331">Code</th><th width="296">Message</th><th>Comment</th></tr></thead><tbody><tr><td>0</td><td>Payment is in progress</td><td>Still pending payment from the user.</td></tr><tr><td>1</td><td>Payment completed successfully</td><td>Payment was successfully collected and transferred from the User to the Merchant’s Account.</td></tr><tr><td>2</td><td>Payment cancelled</td><td>Payment was cancelled by the system. See <a href="#error-codes">Error Codes</a> for reason.</td></tr><tr><td>3</td><td>Payment was cancelled by user</td><td>The User specifically requested a cancellation for the user when presented with the Payment</td></tr><tr><td>4</td><td>Payment has been refunded</td><td>A refund event occurred for the payment. This typically can only be initiated by 6DOT50 to reverse a transaction upon request by the Merchant.</td></tr><tr><td>10</td><td>Payment failed</td><td>Payment failed. See <a href="#error-codes">Error Codes</a> for reason.</td></tr></tbody></table>

### Error Codes

Some Status Codes result in a negative result (e.g. Cancelled, Payment Failed): reasons for the result are provided in the `ErrorCode` field:

<table><thead><tr><th width="107">Code</th><th>Message</th><th data-hidden></th></tr></thead><tbody><tr><td>0</td><td>No error</td><td></td></tr><tr><td>1</td><td>Insufficient funds in account</td><td></td></tr><tr><td>2</td><td>Payment has been declined due to authentication failure</td><td></td></tr><tr><td>3</td><td>Payment has been declined</td><td></td></tr><tr><td>4</td><td>Payment marked as a duplicate transaction</td><td></td></tr><tr><td>5</td><td>Payment has been marked as suspected fraud</td><td></td></tr><tr><td>6</td><td>Payment has an Invalid Amount specified</td><td></td></tr><tr><td>7</td><td>Timeout occurred trying to process payment</td><td></td></tr></tbody></table>
