Card Payments
๏ปฟCard payments are not enabled by default in Sandbox. Please contact Monoova to enable this feature on your sandbox account.๏ปฟ
Monoovas Card SDK enables a secure iframe on your website or app that captures card payments, without necessitating substantial PCI compliance modifications within your application.
Before you start
- Ensure that your mAccount has been properly configured to enable card payments. Please access the Monoova portal or contact Monoova Support to verify this.
- Download the Card Software Development Kit (SDK) and follow the instructions in the readme file to install the SDK in your application: https://github.com/Monoova/merchantSDK๏ปฟ
Authorisation
The card payment APIs require a bearer token for authentication, which can be generated using the Generate a Bearer Token๏ปฟ endpoint. Bearer tokens expire after 60 minutes.
Taking Payment
Once the Card SDK is installed in your application, you can initialise it by calling Generate a Client Session๏ปฟ. This will generate a client session token, which is used to load the iframe on your application and allow payment to be taken. The data included in the client session payload is passed to the card issuer, and is used by our fraud engine to determine the risk level of the payment.
As settlement of card payments takes place the next business day, the SDK uses the onCheckoutComplete callback to indicate the payment has been authorised and is pending settlement. This allows a friendly message or order confirmation to be presented to the customer on the UI. Separately, Monoova returns a webhook indicating the payment status is Pending Settlement.
Card sessions are inherently disposable, meaning customers can choose to exit or refresh the page without making payment. If a client session is in an intermediate status, such as Pending or SessionCreated, you can generate a new client session the next time the customer wants to make a payment.
Storing Card Details for Future Payments
Card details can be collected and stored as a token for future payments, with or without an upfront payment.
To save a card, set saveOnSuccess to true and pass a unique reference in clientPaymentTokenUniqueReference. This unique reference represents the customers card, and is passed when calling the Create Payment Using Token๏ปฟ endpoint.
capturePayment determines whether funds will be taken from a customers card, and is set to true by default. If this flag is set to false, the value of the payment must be $0.00. No funds will be taken from the clients account in this scenario, and no payment will appear on their bank statement.
Adding a Surcharge
Monoovas Card SDK automatically calculates surcharges if applySurcharge is set to true, and displays them on the checkout. Different payment methods, such as Visa and Mastercard may attract a different surcharge. The surcharge amount is configured by Monoova and can be changed on request.
Webhooks
In addition to callable reporting endpoints, webhooks will also be available for state changes for payment agreements and funds received.
Event | Event Name |
|---|---|
Payment status changes | CreditCardPaymentNotification |
Refund status changes | CreditCardRefundNotification |
An asynchronous refund request has been processed | AsyncJobResultNotification |
You can subscribe to these webhooks using the Notification Management๏ปฟ APIs.
Payment Status Changes
This webhook is triggered when a payment reaches one of the following final states:
- Failed
- Declined
- Settlement Complete
- Cancelled
Additionally, โinterimโ webhooks will be triggered when surcharging is in effect for the client, once the payment is authorised for a new client session. This is the point at which the surcharging information becomes available and can be communicated. In this scenario, the payment status could also be one of the following non-final status values:
- Pending
- Authorized
- Settling
Refund Status Changes
This webhook is triggered when a refund reaches one of the following final states:
- Failed
- Declined
- Settlement Complete
Refunding a Transaction
Refunds are processed asynchronously, and can be requested whether the payment is settled or not. For settled payments, a separate refund transaction will be created, and the original payment status will not be affected.
Partial refunds are supported. Multiple partial refund requests can be initiated for payment as long as the total of the refund amount does not exceed the original payment value and another refund request is not in progress for the same payment. The status of the refund can be checked using the Get Transaction By Id๏ปฟ endpoint or Get Async Request Status๏ปฟ. Monoova also initiate a webhook when the refund status is finalised.