Skip to main content

Using Direct Charge Payment Method

First read more about Direct Charge Payment Method to learn about the direct charge payment method.


To use wallet payment method, it should be enabled on our admin panels as per your request. Contact your VONQ Partner Account Manager to get it enabled. Once it is enabled, the paymentMethodsAvailable array of orderJourney state submodule will have direct_charge option and the end user will see "Pay Now" in the "Select a payment method" dropdown in "Payment Method" step of the order journey.

Disabling direct charge method in some use cases

If the direct charge is enabled globally in our admin panels however you want to disable wallet method for certain business use cases then you can read Payment Methods Configuration.

Setting direct charge as the payment method for a campaign order

By default, the paymentMethod option in campaignForm object of campaign state submodule is null as we don't want to make an opinion on user's behalf by preselecting the wallet method.


If user does not have a "contract only" basket, in which case, we enforce "ATS Managed" option, you can specify this payment method as the selected payment method for your end user. To do that you would set paymentMethod property of campaignForm object of campaign state submodule.

//use the enum instead of hardcoded string
const selectedPaymentMethod = window.hapi.orderJourney.utils.paymentMethodKeys.directCharge

window.hapi.campaign.state.campaignForm = {
...window.hapi.campaign.state.campaignForm.value, //notice the .value
paymentMethod: selectedPaymentMethod
}

It is also required to pass a walletId when ordering a campaign but this is automatically handled by HAPI Elements.

note

There is no way to overwrite walletId and even if there was, our backend does not allow using someone else's wallet for ordering campaigns.