API (VR pay secure Gateway)
When do I use VR pay secure Gateway?
A VR pay secure Gateway is generated for integrating into an application (e.g. online shop software).
In general, it is an invoice including amount, currency and customer data in the background.
The status of a gateway can be tracked using Webhooks and API.
Payment Types
We support different types of payments:
- One-off payments:
Immediate capture of a specific amount. - Recurring payments:
A subscription is handled by VR Payment. - Tokenization:
VR Payment stores the credit card information for further captures. Payments can be made on behalf of this tokenization through merchant backend or API. - Reservation:
A specific amount gets blocked on the credit card. A capture is possible within 7 days.
For a tokenization, you need to pass "preAuthorization=1" along with your VR pay secure Gateway creation request. It is possible to directly make the first charge after the authorization, using "chargeOnAuthorization=1".
For a reservation, you need to pass "reservation=1".
For recurring payments, you can pass different parameters:
- subscriptionState=1 (activate subscription for the VR pay secure Gateway)
- subscriptionInterval=P1M (e.g. for one month of payment interval)
- subscriptionPeriod=P1M (e.g. for one month of subscription period, subscriptions will be automatically renewed)
- subscriptionCancellationInterval=P1M (e.g. notice period of a subscription)
Integration types
VR pay secure Gateway can be implemented in two ways:
- Redirect
- Modal window
Usage
First, you need to place the order using our VR pay secure Gateway endpoint.
See Gateway for more information about the request.
You will receive a link back to which you can redirect your customer for the checkout procedure.
In case you want to implement a modal window, use this link for the data-href attribute. More information can be found in the next section.
Modal window
Necessary scripts that need to be included in the head section of your html file:
- jQuery: (e.g. from CDN https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js)
- VR pay secure Gateway JS:
https://media.vr-pay-secure.de/modal/v1/gateway.min.js
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js">
</script>
<script type="text/javascript" src="https://media.vr-pay-secure.de/modal/v1/gateway.min.js"></script>
To open the generated VR pay secure gateway link in modal window, use the following code example:
<a class="vr-pay-secure-modal-window" href="#"
data-href="https://example.vr-pay-secure.de/?payment=GATEWAY-HASH">
Open modal window
</a>
<script type="text/javascript">
jQuery(".vr-pay-secure-modal-window").vrpaysecureModal();
</script>
- More information about modal window can be found on Modal window
Replacements
- Replace example.vr-pay-secure.de with the URL of your VR pay secure installation
- Replace GATEWAY-HASH by the hash returned by VR pay secure Gateway API
Updated 8 months ago