Card Payments
This section is around the Card Payment API portion of the SmarterPay Cloud product.
Further reading:
Card Payment API Responses
As our software interacts with many different Card Payment Gateways we normalise the different responses we receive from those APIs into one. This means you can easily switch between Payment Gateways without having to rewrite your own backend code.
For example, our result status for a successful transaction is always 'successful', whereas the payment gateway may report this as 'ok' or 'success'.
If you do wish to use the Payment Gateway response, we also provide this in the message back to you.
The Status values we currently provide are:
Status | Description |
---|---|
successful | The transaction has been successfully processed at the Payment Gateway. |
pending | The transaction has been accepted by the Payment Gateway and is currently processing it. This may be because of 3D Authentication or the Payment Gateway processes the transaction asynchronously. You can view the final result of the transaction via the SmarterPay Cloud Portal or via a Webhook. |
cancelled | The Customer or Payment Gateway has cancelled the transaction. |
failed | The transaction has been accepted and processed by the Payment Gateway but the result is that the transaction has failed. |
error | There was an unexpected error processing the transaction. This could be because the information provided is incorrect, or that the Payment Gateway was unresponsive. |
In some instances we respond with additional details, such as a status code and status details. This is an ever evolving set of codes and should be checked regularly.
Status | Code | Details | Description |
---|---|---|---|
error | 101 | Unauthorised | You have not provided the correct Authorization bearer token. |
error | 102 | Invalid Platform | The platform identifier is incorrect. Currently this should only be set to 'SmarterPayCloud'. |
error | 103 | Invalid Payment Gateway | The Payment Gateway Profile Id you provided is incorrect or has resulted in an unexpected processing error in the service. |