Hi
I can’t figure out from the documentation if I need to call capture on a card payment created with a hosted checkout page or if the hosted page always uses instant capture for “card.”
Hi
I can’t figure out from the documentation if I need to call capture on a card payment created with a hosted checkout page or if the hosted page always uses instant capture for “card.”
Hi @onesoft if you pass the following data fields and set the value to true, then you don’t need to capture the payment separately, otherwise, you need to.
“capture”: true
This is part of the main body.
Hi @Xi_Li
capture isn’t listed as a BODY PARAMS in the documentation for the checkout page object
https://docs.rapyd.net/build-with-rapyd/reference/checkout-page-object
Indeed, it’s not in the checkout page, however checkout is a service within the collection and since it’s not only for cards but for all payment methods available in collection. Therefore it’s not specified the card related field in the general overview. But you can call Get require fields for a payment method type to understand what is possible to pass and what is not there. Payment Method Type Object
For your info, all request we have made in the sandbox environment have defaulted to being instantly captured.
Thanks Adam, sorry that I missed out the default value applied as true:
After a few hours of experimentation and chatting with others, I have the definitive answers for these questions.
‘capture’ is not documented as a part of the Create Checkout Page API, but it works. If you set it to ‘false’, the card payment is authorized but not captured. The payment is actually initiated only when the customer completes the information on the hosted page.
In order to capture the payment, the merchant must use the ‘Capture Payment’ API method. This sets ‘capture’ to true and closes the payment. You get two webhooks to confirm this.
What was confusing is that in the sandbox, you can get almost the same result using ‘Complete Payment’ - it closes the payment and puts the money in the client wallet, but it does not change the value for ‘captured’. But this is academic, because ‘Complete Payment’ only works in the sandbox, and it was designed to simulate the customer completing the 3DS process, not the capture process.