|
2 | 2 |
|
3 | 3 | namespace Monnify.Collections; |
4 | 4 |
|
| 5 | +/// <remarks> |
| 6 | +/// Registered with automatic HTTP retry disabled: <see cref="ChargeAsync"/> directly attempts to |
| 7 | +/// debit a card, so an ambiguous failure (timeout, network error, 5xx) must not be blindly resent |
| 8 | +/// with the same details - that risks a double charge, same reasoning as |
| 9 | +/// <see cref="Disbursements.IMonnifyDisbursementsClient"/> and <see cref="Bills.IMonnifyBillsClient"/>. |
| 10 | +/// Query <see cref="GetTransactionAsync"/> with the same <c>transactionReference</c> instead. The |
| 11 | +/// other methods on this client don't move money directly (they set up a payment instrument the |
| 12 | +/// customer still has to complete), so this is a more conservative retry stance than they |
| 13 | +/// strictly need, traded for keeping every collection method - including card charges - on one |
| 14 | +/// client. |
| 15 | +/// </remarks> |
5 | 16 | public interface IMonnifyCollectionsClient |
6 | 17 | { |
7 | 18 | /// <summary>Starts a checkout, returning a hosted page URL to redirect the customer to.</summary> |
@@ -37,6 +48,24 @@ Task<MonnifyPagedResult<ReservedAccountTransaction>> GetReservedAccountTransacti |
37 | 48 | Task<BankTransferPaymentDetails> InitiateBankTransferAsync( |
38 | 49 | InitiateBankTransferRequest request, CancellationToken cancellationToken = default); |
39 | 50 |
|
| 51 | + /// <summary> |
| 52 | + /// Charges a card (raw PAN/CVV/PIN) against a transaction reference from |
| 53 | + /// <see cref="InitializeTransactionAsync"/>, as an alternative to the hosted checkout flow. |
| 54 | + /// Depending on the card, the result is either immediately final, or requires a follow-up call |
| 55 | + /// to <see cref="AuthorizeOtpAsync"/> (OTP) or <see cref="Authorize3dsAsync"/> (3DS) to complete. |
| 56 | + /// </summary> |
| 57 | + Task<ChargeCardResult> ChargeAsync(ChargeCardRequest request, CancellationToken cancellationToken = default); |
| 58 | + |
| 59 | + /// <summary>Completes a charge that required an OTP, using the token ID from <see cref="ChargeAsync"/>'s response.</summary> |
| 60 | + Task<AuthorizeCardOtpResult> AuthorizeOtpAsync(AuthorizeCardOtpRequest request, CancellationToken cancellationToken = default); |
| 61 | + |
| 62 | + /// <summary> |
| 63 | + /// Completes a charge on a card that uses 3D Secure authentication. This is not active by |
| 64 | + /// default - it's restricted to PCI DSS-certified merchants and requires it to be enabled for |
| 65 | + /// your account first. |
| 66 | + /// </summary> |
| 67 | + Task<AuthorizeCardOtpResult> Authorize3dsAsync(Authorize3dsCardRequest request, CancellationToken cancellationToken = default); |
| 68 | + |
40 | 69 | /// <summary>Searches transactions on the integration, optionally filtered by reference, amount range, customer, status, or date range.</summary> |
41 | 70 | Task<MonnifyPagedResult<TransactionSummary>> SearchTransactionsAsync( |
42 | 71 | SearchTransactionsRequest? filter = null, int page = 0, int size = 10, CancellationToken cancellationToken = default); |
|
0 commit comments