CB_VISA_MASTERCARD
only
Note - Multi-capture not possible with 30-day preauthorizationMulti-capture is only available for 7-day preauthorization.
- The Deposit Preauthorization to request the card authorization, which involves the user completing 3DS
- The Deposit Preauthorized PayIn to capture the funds without the user present and based on the authorization
How to process a 30-day card preauthorization
Prerequisites
- A
ClientId
and an API key – if you don’t have these, contact Sales to get access to the Mangopay Dashboard - A User object created for your end user, and their associated Wallet
- A registered card (CB, Visa, or Mastercard), which is
VALID
or registered less than 24 hours ago, to make the payments - The URL of a page on your platform to return the end user to after authentication
1. Secure the funds
Create a deposit preauthorization to hold funds for 30 days:POST /v2.01/{ClientId}/deposit-preauthorizations/card/direct
Id
of the Deposit Preauthorization for the next steps.
2. Redirect the user to 3DS protocol (if required)
Redirect the user to theSecureModeRedirectURL
value to complete strong customer authentication, unless it is null
. If SecureModeRedirectURL
is null
, this means that 3DS is not required and no redirection is needed.
You can also use the SecureModeNeeded
boolean to determine this redirection behavior.
For more information on how to handle 3DS redirection, see Steps 4, 6, and 7 of the How to process a card payment guide.
3. Capture the funds
Once the Deposit Preauthorization’sPaymentStatus
is WAITING
, the funds are authorized to be captured within 29.5 days.
Note - Multiple captures not possibleCapturing the preauthorized amount can only be done once. It is possible to do a partial capture (for an amount less than the preauthorized amount).
Id
of the Deposit Preauthorization obtained previously as the DepositId
.
Specify the Amount
values of debited funds and fees. The amount of the DebitedFunds
must be less than or equal to the preauthorized amount.
POST /v2.01/{ClientId}/payins/deposit-preauthorized/direct/full-capture
PaymentStatus
becomes VALIDATED
. In the PayinsLinked
parameter, the Id
of the capture is linked as the PayinCaptureId
.
You can set up a webhook for the following event type to be notified of the status change:
- DEPOSIT_PREAUTHORIZATION_PAYMENT_VALIDATED
API response
PaymentStatus
is VALIDATED
, no further action is possible.
4. Cancel hold if not used
In the scenario where the capture is not needed, you should release the user’s funds proactively rather than letting the hold expire after 29.5 days. You can release the preauthorized funds by changing the Deposit Preauthorization’sPaymentStatus
to CANCELED
:
PUT /v2.01/{ClientId}/deposit-preauthorizations/{DepositId}
PaymentStatus
is CANCELED
, no further action is possible.
API response parameters - Canceled
- DEPOSIT_PREAUTHORIZATION_PAYMENT_CANCEL_REQUESTED
- DEPOSIT_PREAUTHORIZATION_PAYMENT_CANCELED