Accept Riverty payments using an existing Components integration. Our Web Component renders Riverty in your payment form, and collects the required payment information from the shopper.
When accepting a payment with Riverty:
- Collect your shopper's details, and specify these in your /payments request.
- Provide information about the purchased items in the
lineItems
object of your /payments request. - Use Riverty’s profile tracking technology to calculate the profile tracking ID, and specify this in your /payments request. Riverty uses this identifier for risk evaluation.
- Capture the payment after the goods are sent. This triggers the invoice that the merchant sends to the shopper.
Before you begin
Riverty is available from v5.58.0 of the adyen-web library.
Before starting your Riverty integration:
- Make sure that you have done the Components integration.
- Add Riverty in your test Customer Area.
Show Riverty in your payment form
To show Riverty in your payment form:
-
From your server, make a POST /paymentMethods request and specify one of the following combinations of countryCode and amount.currency:
Country countryCode
amount.currency
Germany DE EUR Austria AT EUR Switzerland CH CHF The response contains the payment method type
riverty
. -
Pass the full response from the /paymentMethods call as the
paymentMethodsResponse
object when creating an instance of the AdyenCheckout. -
Add the Riverty Component:
a. Create a DOM element on your checkout page, placing it where you want the payment method form to be rendered:
<div id="riverty-container"></div>
b. Use the
create
method of your AdyenCheckout instance, in this casecheckout
, to create the Component. Optionally include configuration for the visibility settings of the following shopper input fields:Parameter Description personalDetails
Shopper name, date of birth, phone number, and email address. billingAddress
The address where to send the invoice. deliveryAddress
The address where the purchased goods should be delivered. If you remove these fields from your payment form, you need to provide this information in your
/payments
request. For information on the required fields, refer to Make a payment.This is an example of creating an instance of the Riverty Component with various configuration options:
const riverty = checkout.create("riverty", { countryCode: "DE", // the country code from the /paymentMethods` request visibility: { // Optional configuration personalDetails: "hidden", // These fields will not appear on the payment form. billingAddress: "readOnly", // These fields will appear on the payment form, but the shopper can't edit them. deliveryAddress: "editable" //These fields will appear on the payment form, and the shopper can edit them. This is the default behavior. } }).mount('#riverty-container');;
When the shopper selects to pay, the Component calls the
onSubmit
event, which contains astate.data
. Ifstate.isValid
is true, collect thestate.data
and pass this to your server and proceed making a /payments request from your server.
Make a payment
Riverty uses profile tracking technology to detect and recognize internet access devices (for example PCs, smartphones, and tablets) and to identify possible fraud attempts on your websites. Before making a payment you need to implement Riverty’s profile tracking integration. Send the calculated profile tracking ID (using the deviceFingerprint
parameter) when making a /payments request.
From your server, make a /payments request:
Parameter | Required | Description |
---|---|---|
paymentMethod.type | riverty | |
paymentMethod.deviceFingerprint | A string containing the shopper's calculated profile tracking ID | |
shopperName.firstName | Shopper's first name. | |
shopperName.lastName | Shopper's last name. | |
telephoneNumber | Shopper's telephone number. | |
shopperEmail | Shopper's email address. | |
dateOfBirth | Shopper's date of birth, in format: YYYY-MM-DD | |
shopperIP | The shopper's IP address. Riverty uses this for risk checks. | |
billingAddress | The address where to send the invoice. | |
deliveryAddress | The address where the purchased goods should be delivered. | |
lineItems | Price and product information about the purchased items. This is included on the invoice that Riverty sends to the shopper. |
The /payments response contains:
Parameter | Description |
---|---|
resultCode |
Use this to present the payment result to your shopper. |
pspReference |
Our unique reference for the payment. |
merchantReference |
Your reference from the /payments request. |
Present the payment result
Use the resultCode that you received in the /payments response to present the payment result to your shopper.
The resultCode
values you can receive for Riverty are:
resultCode | Description | Action to take |
---|---|---|
Authorised | The payment was successfully authorised. | Inform the shopper that the payment was successful. After the goods have been sent, you also need to capture the payment. |
Refused | The payment was refused by Riverty. | Ask the shopper to try the payment again using a different payment method. |
Capture the payment
After the goods have been sent, you also need to capture the payment. All Riverty payments must be manually captured, even if you have enabled automatic capture for other payment methods. Capturing the payment is what triggers the invoice to be sent to the shopper and starts the payment schedule.
Partial captures
To partially capture a Riverty payment, specify in your /payments/{paymentPspReference}/captures request:
Parameter | Description |
---|---|
amount |
The amount that the shopper should pay. |
lineItems |
Price and product information for the items that the shopper should pay for. You only need to specify lineItems if you are sending a partial capture, not if you are sending a full capture. The sum of the lineItems must match the amount declared in the capture call, otherwise Adyen will add a dummy lineItems entry to account for the difference. |
Only specify the items that you are capturing.
The following example shows how to make a partial capture request if the shopper only kept item #1 of the order.
The following response is returned:
Manually cancel any amount that remains after partially capturing a payment.
To set up multiple partial captures, contact our Support Team. Multiple partial captures will create a new invoice for each capture.
Refunds and cancellations
If you have not captured a Riverty payment, you can cancel it. If you have captured the payment and you want to return the funds to the shopper, you need to refund it.
As with captures, you don’t need to specify lineItems
in the refund request if you are doing a full refund. To partially refund a Riverty payment, specify in your /payments/{paymentPspReference}/refunds request:
Parameter | Description |
---|---|
amount |
The amount that is refunded to the shopper. |
lineItems |
Price and product information for the items that the shopper should pay for. The sum of the lineItems needs to match the amount declared in the refund call. If they do not match, Adyen will add a dummy lineItem entry to account for the difference. |
Only specify the items that you are refunding the money for.
The following example shows how to make a partial refund for item #1 of the above order.
The following response is returned:
The pspReference
is specifically for the refund transaction, not for the original payment.
Test and go live
To test Riverty, submit a request to add Riverty in your test Customer Area.
Riverty provides detailed error codes, recommendations on how to test some of the most common scenarios as well as a comprehensive list of market specific test data.
Go-live requirements
Riverty requires you to display Terms & Conditions as well as data protection guidelines in your checkout for the shopper to approve before making the payment. See Riverty's documentation for details.