--- title: "Riverty Web Drop-in" description: "Add Riverty to your Drop-in integration." url: "https://docs.adyen.com/payment-methods/riverty/web-drop-in" source_url: "https://docs.adyen.com/payment-methods/riverty/web-drop-in.md" canonical: "https://docs.adyen.com/payment-methods/riverty/web-drop-in" last_modified: "2026-05-25T12:55:01+02:00" language: "en" --- # Riverty Web Drop-in Add Riverty to your Drop-in integration. [View source](/payment-methods/riverty/web-drop-in.md) You can add Riverty to your existing integration. The following instructions show only what you must add to your integration specifically for Riverty. If an instruction on this page corresponds with a step in the main integration guide, it includes a link to that corresponding step of the main integration guide. What you must add to your integration depends on the [server-side flow](/online-payments/build-your-integration) that your integration uses: ## Sessions flow Drop-in ### Drop-In-Before-You-Begin ## Requirements | Requirement | Description | | | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | | **Integration type** | Make sure that you have an existing Sessions flow [Web Drop-in integration](/online-payments/build-your-integration/sessions-flow?platform=Web\&integration=Drop-in). | | | **Checkout API** | Make sure that you use Checkout API v68 or later. | | | **Redirect handling** | Make sure that your existing integration is set up to [handle the redirect](/online-payments/build-your-integration/sessions-flow?platform=Web\&integration=Drop-in#handle-the-redirect). `action.type`: **redirect** | | | **Setup steps** | Before you begin, [add Riverty in your Customer Area](/payment-methods/add-payment-methods). | | Activating Riverty defaults the pricing to our standard pricing. Adyen offers Enterprise pricing for merchants with sufficient volume. Before activating Riverty, contact your account manager to verify if you are eligible. ### Drop-In-Add-Parameters-Sessions-Request ## Add additional parameters to your /sessions request When you [create a payment session](/online-payments/build-your-integration/sessions-flow?platform=Web\&integration=Drop-in#create-a-payment-session), add the following parameters: | Parameter | Required | Description | | ----------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `shopperName.firstName` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Shopper's first name. (B2B payments are currently not supported. Providing a business name here may result in a rejection.) | | `shopperName.lastName` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Shopper's last name. (B2B payments are currently not supported. Providing a business name here may result in a rejection.) | | `telephoneNumber` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Shopper's telephone number. | | `shopperEmail` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Shopper's email address. | | `billingAddress` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Shopper's billing address. | | `deliveryAddress` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Shopper's delivery address. | | `lineItems` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Price and product information about the purchased items. This is included on the invoice that Riverty sends to the shopper. Required values for each `lineItem`: `quantity`, `description` and `id`. If you operate in a [DACH country](https://www.statista.com/topics/4623/dach-countries/), the VAT must not be null to support the [VAT reclaim process](https://docs.riverty.com/bnpl/documentation/vat_reclaim) in cases of uncollectible debt. Riverty reverts the VAT from your settlement (visible as `PaymentCost` - see [journal types](https://docs.adyen.com/reporting/settlement-reconciliation/transaction-level/settlement-details-report/#journal-types)) and sends you a monthly overview via email with all affected transactions, VAT amounts and instructions to claim back the VAT amounts. | | `dateOfBirth` | | Shopper's date of birth, in the following format: `YYYY-MM-DD` | | `shopperIP` | | The shopper's IP address. Riverty uses this for risk checks. | **Example /sessions request** ```bash curl https://checkout-test.adyen.com/v71/sessions \ -H "x-API-key: ADYEN_API_KEY" \ -H "Idempotency-Key: YOUR_IDEMPOTENCY_KEY" \ -H "content-type: application/json" \ -X POST -d '{ "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "reference": "YOUR_ORDER_REFERENCE", "amount": { "currency": "EUR", "value": 2700 }, "shopperLocale": "de_DE", "countryCode": "DE", "telephoneNumber": "+49 840 839 298", "shopperEmail": "test@example.com", "shopperReference": "YOUR_SHOPPER_REFERENCE", "shopperIP": "123.123.123.123", "dateOfBirth": "1980-11-02", "shopperName": { "firstName": "John", "lastName": "Doe" }, "billingAddress": { "city": "Berlin", "country": "DE", "houseNumberOrName": "4", "postalCode": "10924", "street": "Friedrichstraat" }, "deliveryAddress": { "city": "Berlin", "country": "DE", "houseNumberOrName": "14", "postalCode": "10924", "street": "Friedrichstraat", "firstName": "Jane", "lastName": "Doe" }, "returnUrl": "https://your-company.example.com/?shopperOrder=12xy..", "lineItems": [ { "quantity": "1", "taxPercentage": "2000", "description": "Polo shirt", "id": "Item #1", "itemCategory": "Shirts", "amountIncludingTax": "1200", "taxAmount": "200", "amountExcludingTax": "1000", "productUrl": "https://www.mystoredemo.io#/product/01", "imageUrl": "https://www.mystoredemo.io/1689f3f40b292d1de2c6.png" }, { "quantity": "1", "taxPercentage": "2000", "description": "Headphones", "id": "Item #2", "itemCategory": "Electronics", "amountIncludingTax": "1500", "amountExcludingTax": "1250", "taxAmount": "250", "productUrl": "https://www.mystoredemo.io#/product/02", "imageUrl": "https://www.mystoredemo.io/a7504eee284c774d0a73.png" } ] }' ``` ### Drop-In-Import-Optional ## Import Riverty (optional) When you [import Adyen Web](/online-payments/build-your-integration/sessions-flow?platform=Web\&integration=Drop-in#get-adyen-web), you can optionally import individual payment methods to optimize performance by using [tree shaking](https://developer.mozilla.org/en-US/docs/Glossary/Tree_shaking). To do this, include `Riverty`. **Import** ```javascript import { AdyenCheckout, Dropin, Riverty } from '@adyen/adyen-web'; ``` ### Drop-In-Add-Configuration ## Add additional configuration for Riverty You do not need to add any configuration parameters for Riverty. ### Capture ## 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. If you do not manually capture the payment within 30 days, the authorization will expire. If you require a longer period before authorizations expire, contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other). They will inform you when Riverty has updated the expiration period for you. ### Partial captures To [partially capture](/online-payments/capture) a Riverty payment, specify in your [/payments/{paymentPspReference}/captures](https://docs.adyen.com/api-explorer/Checkout/latest/post/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. Any unclaimed amount that is left after partially capturing a payment should be manually cancelled. To set up multiple partial captures, contact our Support Team. Multiple partial captures will create a new invoice for each capture. The following example shows how to make a partial capture request if the shopper only kept item #1 of the order. **Example /captures request** ```bash curl https: //checkout-test.adyen.com/checkout/v72/payments/TCG5XS42X8NKGK82/captures \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \ -H 'content-type: application/json' \ -X POST -d '{ "reference": "YOUR_UNIQUE_REFERENCE", "amount": { "value": 1200, "currency": "EUR" }, "paymentPspReference": "TCG5XS42X8NKGK82", "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "lineItems": [ { "quantity": "1", "taxPercentage": "2000", "description": "Polo shirt", "id": "Item-1", "itemCategory": "Shirts", "amountIncludingTax": "1200", "taxAmount": "200", "amountExcludingTax": "1000", "productUrl": "your-store.example.com/product-url", "imageUrl": "your-store.example.com/image-url" } ] }' ``` The following response is returned: **Example /captures response** ```json { "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "paymentPspReference": "R5WCJDJ890WZNN82", "pspReference": "TCG5XS42X8NKGK82", "reference": "YOUR_UNIQUE_REFERENCE", "status": "received", "amount": { "currency": "EUR", "value": 1200 }, "lineItems": [ { "quantity": "1", "taxPercentage": "2000", "description": "Polo shirt", "id": "Item-1", "itemCategory": "Shirts", "amountIncludingTax": "1200", "taxAmount": "200", "amountExcludingTax": "1000", "productUrl": "your-store.example.com/product-url", "imageUrl": "your-store.example.com/image-url" } ] } ``` [Manually cancel](/online-payments/cancel) any amount that remains after partially capturing a payment. If a part of the authorized amount has been captured, simply sending an empty [/payments/{paymentPspReference}/cancels](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/\(paymentPspReference\)/cancels) request releases the remaining balance (without having to specify the lineItems remaining that need to be canceled). **Example /cancel request** ```bash curl https://checkout-test.adyen.com/v72/payments/{pspreference}/cancels \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \ -H 'content-type: application/json' \ -X POST -d '{ "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "reference": "YOUR_ORDER_REFERENCE" }' ``` To set up multiple partial captures, contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other). Multiple partial captures will create a new invoice for each capture.  ### Refunds-Cancellations ## Refunds and cancellations If you have not captured a Riverty payment, you can [cancel](/online-payments/cancel) it. If you have captured the payment and you want to return the funds to the shopper, you need to [refund](/online-payments/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](https://docs.adyen.com/api-explorer/Checkout/latest/post/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. | | `capturePspReference` | Specify which capture needs to be refunded when doing partial refunds. If not specified, the last capture will be chosen automatically, whether that was the intended capture to be refunded or not. | 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. **Example refund request for Riverty** #### curl ```bash curl https://checkout-test.adyen.com/v72/payments/R5WCJDJ890WZNN82/refunds \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \ -H 'content-type: application/json' \ -X POST -d '{ "reference": "YOUR_UNIQUE_REFERENCE", "amount": { "value": 1200, "currency": "EUR" }, "capturePspReference": "TCG5XS42X8NKGK82", "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "lineItems": [ { "quantity": "1", "taxPercentage": "2000", "description": "Polo shirt", "id": "Item-1", "itemCategory": "Shirts", "amountIncludingTax": "1200", "taxAmount": "200", "amountExcludingTax": "1000", "productUrl": "your-store.example.com/product-url", "imageUrl": "your-store.example.com/image-url" } ] }' ``` #### Java ```java // Adyen Java API Library v39.3.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.checkout.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.checkout.*; // For the LIVE environment, also include your liveEndpointUrlPrefix. Client client = new Client("ADYEN_API_KEY", Environment.TEST); // Create the request object(s) LineItem lineItem1 = new LineItem() .quantity(1L) .itemCategory("Shirts") .taxPercentage(2000L) .amountExcludingTax(1000L) .imageUrl("your-store.example.com/image-url") .description("Polo shirt") .id("Item-1") .amountIncludingTax(1200L) .taxAmount(200L) .productUrl("your-store.example.com/product-url"); Amount amount = new Amount() .currency("EUR") .value(1200L); PaymentRefundRequest paymentRefundRequest = new PaymentRefundRequest() .reference("YOUR_UNIQUE_REFERENCE") .lineItems(Arrays.asList(lineItem1)) .amount(amount) .merchantAccount("YOUR_MERCHANT_ACCOUNT"); // Send the request ModificationsApi service = new ModificationsApi(client); PaymentRefundResponse response = service.refundCapturedPayment("paymentPspReference", paymentRefundRequest, new RequestOptions().idempotencyKey("UUID")); ``` #### PHP ```php setXApiKey("ADYEN_API_KEY"); // For the LIVE environment, also include your liveEndpointUrlPrefix. $client->setEnvironment(Environment::TEST); // Create the request object(s) $lineItem1 = new LineItem(); $lineItem1 ->setQuantity(1) ->setItemCategory("Shirts") ->setTaxPercentage(2000) ->setAmountExcludingTax(1000) ->setImageUrl("your-store.example.com/image-url") ->setDescription("Polo shirt") ->setId("Item-1") ->setAmountIncludingTax(1200) ->setTaxAmount(200) ->setProductUrl("your-store.example.com/product-url"); $amount = new Amount(); $amount ->setCurrency("EUR") ->setValue(1200); $paymentRefundRequest = new PaymentRefundRequest(); $paymentRefundRequest ->setReference("YOUR_UNIQUE_REFERENCE") ->setLineItems(array($lineItem1)) ->setAmount($amount) ->setMerchantAccount("YOUR_MERCHANT_ACCOUNT"); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new ModificationsApi($client); $response = $service->refundCapturedPayment('paymentPspReference', $paymentRefundRequest, $requestOptions); ``` #### C\# ```cs // Adyen .net API Library v32.1.1 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Checkout; using Adyen.Service.Checkout; // For the LIVE environment, also include your liveEndpointUrlPrefix. var config = new Config() { XApiKey = "ADYEN_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) LineItem lineItem1 = new LineItem { Quantity = 1, ItemCategory = "Shirts", TaxPercentage = 2000, AmountExcludingTax = 1000, ImageUrl = "your-store.example.com/image-url", Description = "Polo shirt", Id = "Item-1", AmountIncludingTax = 1200, TaxAmount = 200, ProductUrl = "your-store.example.com/product-url" }; Amount amount = new Amount { Currency = "EUR", Value = 1200 }; PaymentRefundRequest paymentRefundRequest = new PaymentRefundRequest { Reference = "YOUR_UNIQUE_REFERENCE", LineItems = new List{ lineItem1 }, Amount = amount, MerchantAccount = "YOUR_MERCHANT_ACCOUNT" }; // Send the request var service = new ModificationsService(client); var response = service.RefundCapturedPayment("paymentPspReference", paymentRefundRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"}); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v29.0.0 const { Client, CheckoutAPI } = require('@adyen/api-library'); // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const paymentRefundRequest = { reference: "YOUR_UNIQUE_REFERENCE", amount: { value: 1200, currency: "EUR" }, capturePspReference: "TCG5XS42X8NKGK82", merchantAccount: "YOUR_MERCHANT_ACCOUNT", lineItems: [ { quantity: "1", taxPercentage: "2000", description: "Polo shirt", id: "Item-1", itemCategory: "Shirts", amountIncludingTax: "1200", taxAmount: "200", amountExcludingTax: "1000", productUrl: "your-store.example.com/product-url", imageUrl: "your-store.example.com/image-url" } ] } // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.ModificationsApi.refundCapturedPayment("paymentPspReference", paymentRefundRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v21.0.0 import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/src/checkout" ) // For the LIVE environment, also include your liveEndpointUrlPrefix. client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) lineItem1 := checkout.LineItem{ Quantity: common.PtrInt64(1), ItemCategory: common.PtrString("Shirts"), TaxPercentage: common.PtrInt64(2000), AmountExcludingTax: common.PtrInt64(1000), ImageUrl: common.PtrString("your-store.example.com/image-url"), Description: common.PtrString("Polo shirt"), Id: common.PtrString("Item-1"), AmountIncludingTax: common.PtrInt64(1200), TaxAmount: common.PtrInt64(200), ProductUrl: common.PtrString("your-store.example.com/product-url"), } amount := checkout.Amount{ Currency: "EUR", Value: 1200, } paymentRefundRequest := checkout.PaymentRefundRequest{ Reference: common.PtrString("YOUR_UNIQUE_REFERENCE"), LineItems: []checkout.LineItem{ lineItem1, }, Amount: amount, MerchantAccount: "YOUR_MERCHANT_ACCOUNT", } // Send the request service := client.Checkout() req := service.ModificationsApi.RefundCapturedPaymentInput("paymentPspReference").IdempotencyKey("UUID").PaymentRefundRequest(paymentRefundRequest) res, httpRes, err := service.ModificationsApi.RefundCapturedPayment(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v13.6.0 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" # For the LIVE environment, also include your liveEndpointUrlPrefix. adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "reference": "YOUR_UNIQUE_REFERENCE", "amount": { "value": 1200, "currency": "EUR" }, "capturePspReference": "TCG5XS42X8NKGK82", "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "lineItems": [ { "quantity": "1", "taxPercentage": "2000", "description": "Polo shirt", "id": "Item-1", "itemCategory": "Shirts", "amountIncludingTax": "1200", "taxAmount": "200", "amountExcludingTax": "1000", "productUrl": "your-store.example.com/product-url", "imageUrl": "your-store.example.com/image-url" } ] } # Send the request result = adyen.checkout.modifications_api.refund_captured_payment(request=json_request, paymentPspReference="paymentPspReference", idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v10.4.0 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_API_KEY' # For the LIVE environment, also include your liveEndpointUrlPrefix. adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :reference => 'YOUR_UNIQUE_REFERENCE', :amount => { :value => 1200, :currency => 'EUR' }, :capturePspReference => 'TCG5XS42X8NKGK82', :merchantAccount => 'YOUR_MERCHANT_ACCOUNT', :lineItems => [ { :quantity => '1', :taxPercentage => '2000', :description => 'Polo shirt', :id => 'Item-1', :itemCategory => 'Shirts', :amountIncludingTax => '1200', :taxAmount => '200', :amountExcludingTax => '1000', :productUrl => 'your-store.example.com/product-url', :imageUrl => 'your-store.example.com/image-url' } ] } # Send the request result = adyen.checkout.modifications_api.refund_captured_payment(request_body, 'paymentPspReference', headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v29.0.0 import { Client, CheckoutAPI, Types } from "@adyen/api-library"; // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.ModificationsApi.refundCapturedPayment("paymentPspReference", paymentRefundRequest, { idempotencyKey: "UUID" }); ``` The following response is returned: **Example refund response for Riverty** ```json { "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "paymentPspReference": "R5WCJDJ890WZNN82", "pspReference": "IHG5XS4FGKVLGK82", "reference": "YOUR_UNIQUE_REFERENCE", "status": "received", "amount": { "currency": "EUR", "value": 1200 }, "lineItems": [ { "quantity": "1", "taxPercentage": "2000", "description": "Polo shirt", "id": "Item-1", "itemCategory": "Shirts", "amountIncludingTax": "1200", "taxAmount": "200", "amountExcludingTax": "1000", "productUrl": "your-store.example.com/product-url", "imageUrl": "your-store.example.com/image-url" } ] } ``` The `pspReference` in the response is the reference of the refund itself. ### Drop-In-Test-And-Go-Live ## Test and go live Riverty provides detailed [error codes](https://docs.riverty.com/bnpl/documentation/response_codes), recommendations on how to test some of the most common [scenarios](https://docs.riverty.com/bnpl/psp/adyen) as well as a comprehensive list of market specific [test data](https://docs.riverty.com/bnpl/documentation/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](https://docs.riverty.com/bnpl/documentation/visual_guidelines) for details. ## Advanced flow Drop-in ### Drop-In-Before-You-Begin ## Requirements | Requirement | Description | | | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | | **Integration type** | Make sure that you have an existing Advanced flow [Web Drop-in integration](/online-payments/build-your-integration/advanced-flow?platform=%7B%7BgetParameter%28%27platform%27%29%7D%7D\&integration=Drop-in). | | | **Redirect handling** | Make sure that your existing integration is set up to [handle the redirect](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=Drop-in#handle-the-redirect). `action.type`: **redirect** | | | **Setup steps** | Before you begin, [add Riverty in your Customer Area](/payment-methods/add-payment-methods). | | Activating Riverty defaults the pricing to our standard pricing. Adyen offers Enterprise pricing for merchants with sufficient volume. Before activating Riverty, contact your account manager to verify if you are eligible. ## How it works The following is the process to make a Riverty payment. 1. Collect your shopper's details and specify these in your [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request. 2. When you make the [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request, include the following information. * The shopper's details that you collected. * The details of the items, in the `lineItems` object. * Optional: if you use [profile tracking from Riverty](#profile-tracking) to calculate the profile tracking ID, include `deviceFingerprint`. 3. [Capture](#capture-the-payment) the payment after the goods are sent. This triggers the invoice that the merchant sends to the shopper. ### Profile tracking [Profile tracking](https://docs.riverty.com/bnpl/documentation/profile_tracking) is Riverty's technology for risk evaluation of shoppers. For payments in the following countries, we recommend that you use it to improve acceptance. * Austria * Germany * Switzerland You must get the [`profileTrackingShopId` ](https://docs.riverty.com/bnpl/documentation/profile_tracking)from [Riverty’s implementation support team](mailto:implementation_BNPL@riverty.com) before implementing profile tracking. To integrate with profile tracking, you can [implement the script from Riverty](https://docs.riverty.com/bnpl/documentation/profile_tracking). It calculates a profile tracking ID for each shopper. The script collects data about the shopper’s device (profile tracking ID) to predict scripted attacks. 1. When the shopper goes to the checkout page, run the script. It outputs a profile tracking ID. 2. Encrypt the profile tracking ID in a string. 3. When you make the [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request, include the encrypted string in `deviceFingerprint`. We recommend you always include this. ### Get-Payment-Method ## Get Riverty as an available payment method When you make the [/paymentMethods](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods) to [get available payment methods](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=Drop-in#get-available-payment-methods), specify the following so that Riverty is included in the response. | Parameter | Possible values | | ------------------------------------------------------------------------------------------------------------------ | -------------------------------------- | | [countryCode](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-countryCode) | **AT**, **BE**, **DE**, **NL**, **CH** | | [amount.currency](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-amount-currency) | **EUR**, **CHF** | **Example request for available payment methods** ```bash curl https://checkout-test.adyen.com/v72/paymentMethods \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \ -H 'content-type: application/json' \ -X POST -d '{ "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "countryCode": "NL", "amount": { "currency": "EUR", "value": 2700 }, "shopperLocale": "nl-NL" }' ``` The response includes `paymentMethod.type`: **riverty**. **Example response with Riverty available** ```json { "paymentMethods": [ { "name": "Riverty", "type": "riverty" } ] } ``` ### Drop-In-Import-Optional ## Import Riverty (optional) When you [import Adyen Web](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=Drop-in#get-adyen-web), you can optionally import individual payment methods to optimize performance by using [tree shaking](https://developer.mozilla.org/en-US/docs/Glossary/Tree_shaking). To do this, include `Riverty`. **Import** ```javascript import { AdyenCheckout, Dropin, Riverty } from '@adyen/adyen-web'; ``` ### Drop-In-Add-Configuration ## Add additional configuration for Riverty You do not need to add any configuration parameters for Riverty. ### Drop-In-Add-Parameters-Payments-Request ## Add additional parameters to your /payments request When you [make a payment](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=Drop-in#make-a-payment), add the following parameters: | Parameter | Required | Description | | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `paymentMethod.type` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The type of Riverty payment. Possible values: - **riverty**: Pay in 14. - **riverty\_account**: Monthly Consolidated Invoice. - **sepadirectdebit\_riverty**: Secure Direct Debit - **riverty\_installments**: Pay in fixed installments of 3, 6, 12, or 24 months | | `paymentMethod.subtype` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | **redirect** | | [billingAddress](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-billingAddress) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The address where to send the invoice. | | [deliveryAddress](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-deliveryAddress) | | The address where the purchased goods should be delivered. Only send `deliveryAddress` if either the address and/or the "delivery person" deviate from the billing address. When sending `deliveryAddress` , the `deliveryAddress.firstName` and `deliveryAddress.lastname` are required, even if the person is the same as `shopperName.firstName` and `shopperName.lastName`. This helps to identify whoever will be accepting the delivery. **Note:** If the shopper is using Riverty for the first time, the payment can be rejected for risk reasons if `deliveryAddress` is different from `billingAddress`. In that case, only send `billingAddress`. The shopper is expected to receive the package there. | | [shopperName.firstName](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-shopperName-firstName) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Shopper's first name. (B2B payments are currently not supported. Providing a business name here may result in a rejection.) | | [shopperName.lastName](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-shopperName-lastName) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Shopper's last name. (B2B payments are currently not supported. Providing a business name here may result in a rejection.) | | [telephoneNumber](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-telephoneNumber) | | Shopper's telephone number. | | [shopperEmail](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-shopperEmail) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Shopper's email address. | | [lineItems](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-lineItems) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Price and product information about the purchased items. This is included on the invoice that Riverty sends to the shopper. Required values for each `lineItem`: `quantity`, `description` and `id`. If you operate in a [DACH country](https://www.statista.com/topics/4623/dach-countries/), the VAT must not be null to support the [VAT reclaim process](https://docs.riverty.com/bnpl/documentation/vat_reclaim) in cases of uncollectible debt. Riverty reverts the VAT from your settlement (visible as `PaymentCost` - see [journal types](https://docs.adyen.com/reporting/settlement-reconciliation/transaction-level/settlement-details-report/#journal-types)) and sends you a monthly overview via email with all affected transactions, VAT amounts and instructions to claim back the VAT amounts. | | `paymentMethod.iban` | Required for `paymentMethod.type`: **sepadirectdebit\_riverty**. | The IBAN of the shopper. | | `paymentMethod.deviceFingerprint` | | A string containing the shopper's calculated [profile tracking ID](https://docs.riverty.com/bnpl/documentation/profile_tracking). | | [dateOfBirth](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-dateOfBirth) | | Shopper's date of birth, in the following format: `YYYY-MM-DD` | | [shopperIP](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-shopperIP) | | The shopper's IP address. Riverty uses this for risk checks. | **Example payment request for Riverty** ```bash curl https://checkout-test.adyen.com/v72/payments \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \ -H 'content-type: application/json' \ -X POST -d '{ "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "reference": "YOUR_ORDER_REFERENCE", "paymentMethod": { "type": "riverty", "subtype": "redirect" }, "amount": { "currency": "EUR", "value": 2700 }, "deviceFingerprint": "2dD14a898...", "shopperLocale": "de_DE", "countryCode": "DE", "telephoneNumber": "+49 840 839 298", "shopperEmail": "test@example.com", "shopperReference": "YOUR_SHOPPER_REFERENCE", "shopperIP": "123.123.123.123", "dateOfBirth": "1980-11-02", "shopperName": { "firstName": "John", "lastName": "Doe" }, "billingAddress": { "city": "Berlin", "country": "DE", "houseNumberOrName": "4", "postalCode": "10924", "street": "Friedrichstraat" }, "deliveryAddress": { "city": "Berlin", "country": "DE", "houseNumberOrName": "14", "postalCode": "10924", "street": "Friedrichstraat", "firstName": "Jane", "lastName": "Doe" }, "returnUrl": "https://your-company.example.com/?shopperOrder=12xy..", "lineItems": [ { "quantity": "1", "taxPercentage": "2000", "description": "Polo shirt", "id": "Item #1", "itemCategory": "Shirts", "amountIncludingTax": "1200", "taxAmount": "200", "amountExcludingTax": "1000", "productUrl": "https://www.mystoredemo.io#/product/01", "imageUrl": "https://www.mystoredemo.io/1689f3f40b292d1de2c6.png" }, { "quantity": "1", "taxPercentage": "2000", "description": "Headphones", "id": "Item #2", "itemCategory": "Electronics", "amountIncludingTax": "1500", "amountExcludingTax": "1250", "taxAmount": "250", "productUrl": "https://www.mystoredemo.io#/product/02", "imageUrl": "https://www.mystoredemo.io/a7504eee284c774d0a73.png" } ] }' ``` The response includes `action.type`: **redirect**. **Example response with a redirect action** ```json { "resultCode":"RedirectShopper", "action":{ "paymentMethodType":"riverty", "method":"GET", "url":"https://checkoutshopper-test.adyen.com/checkoutshopper…", "type":"redirect" } } ``` ### Capture ## 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. If you do not manually capture the payment within 30 days, the authorization will expire. If you require a longer period before authorizations expire, contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other). They will inform you when Riverty has updated the expiration period for you. ### Partial captures To [partially capture](/online-payments/capture) a Riverty payment, specify in your [/payments/{paymentPspReference}/captures](https://docs.adyen.com/api-explorer/Checkout/latest/post/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. Any unclaimed amount that is left after partially capturing a payment should be manually cancelled. To set up multiple partial captures, contact our Support Team. Multiple partial captures will create a new invoice for each capture. The following example shows how to make a partial capture request if the shopper only kept item #1 of the order. **Example /captures request** ```bash curl https: //checkout-test.adyen.com/checkout/v72/payments/TCG5XS42X8NKGK82/captures \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \ -H 'content-type: application/json' \ -X POST -d '{ "reference": "YOUR_UNIQUE_REFERENCE", "amount": { "value": 1200, "currency": "EUR" }, "paymentPspReference": "TCG5XS42X8NKGK82", "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "lineItems": [ { "quantity": "1", "taxPercentage": "2000", "description": "Polo shirt", "id": "Item-1", "itemCategory": "Shirts", "amountIncludingTax": "1200", "taxAmount": "200", "amountExcludingTax": "1000", "productUrl": "your-store.example.com/product-url", "imageUrl": "your-store.example.com/image-url" } ] }' ``` The following response is returned: **Example /captures response** ```json { "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "paymentPspReference": "R5WCJDJ890WZNN82", "pspReference": "TCG5XS42X8NKGK82", "reference": "YOUR_UNIQUE_REFERENCE", "status": "received", "amount": { "currency": "EUR", "value": 1200 }, "lineItems": [ { "quantity": "1", "taxPercentage": "2000", "description": "Polo shirt", "id": "Item-1", "itemCategory": "Shirts", "amountIncludingTax": "1200", "taxAmount": "200", "amountExcludingTax": "1000", "productUrl": "your-store.example.com/product-url", "imageUrl": "your-store.example.com/image-url" } ] } ``` [Manually cancel](/online-payments/cancel) any amount that remains after partially capturing a payment. If a part of the authorized amount has been captured, simply sending an empty [/payments/{paymentPspReference}/cancels](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/\(paymentPspReference\)/cancels) request releases the remaining balance (without having to specify the lineItems remaining that need to be canceled). **Example /cancel request** ```bash curl https://checkout-test.adyen.com/v72/payments/{pspreference}/cancels \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \ -H 'content-type: application/json' \ -X POST -d '{ "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "reference": "YOUR_ORDER_REFERENCE" }' ``` To set up multiple partial captures, contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other). 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](/online-payments/cancel) it. If you have captured the payment and you want to return the funds to the shopper, you need to [refund](/online-payments/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](https://docs.adyen.com/api-explorer/Checkout/latest/post/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. | | `capturePspReference` | Specify which capture needs to be refunded when doing partial refunds. If not specified, the last capture will be chosen automatically, whether that was the intended capture to be refunded or not. | 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. **Example refund request for Riverty** #### curl ```bash curl https://checkout-test.adyen.com/v72/payments/R5WCJDJ890WZNN82/refunds \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \ -H 'content-type: application/json' \ -X POST -d '{ "reference": "YOUR_UNIQUE_REFERENCE", "amount": { "value": 1200, "currency": "EUR" }, "capturePspReference": "TCG5XS42X8NKGK82", "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "lineItems": [ { "quantity": "1", "taxPercentage": "2000", "description": "Polo shirt", "id": "Item-1", "itemCategory": "Shirts", "amountIncludingTax": "1200", "taxAmount": "200", "amountExcludingTax": "1000", "productUrl": "your-store.example.com/product-url", "imageUrl": "your-store.example.com/image-url" } ] }' ``` #### Java ```java // Adyen Java API Library v39.3.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.checkout.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.checkout.*; // For the LIVE environment, also include your liveEndpointUrlPrefix. Client client = new Client("ADYEN_API_KEY", Environment.TEST); // Create the request object(s) LineItem lineItem1 = new LineItem() .quantity(1L) .itemCategory("Shirts") .taxPercentage(2000L) .amountExcludingTax(1000L) .imageUrl("your-store.example.com/image-url") .description("Polo shirt") .id("Item-1") .amountIncludingTax(1200L) .taxAmount(200L) .productUrl("your-store.example.com/product-url"); Amount amount = new Amount() .currency("EUR") .value(1200L); PaymentRefundRequest paymentRefundRequest = new PaymentRefundRequest() .reference("YOUR_UNIQUE_REFERENCE") .lineItems(Arrays.asList(lineItem1)) .amount(amount) .merchantAccount("YOUR_MERCHANT_ACCOUNT"); // Send the request ModificationsApi service = new ModificationsApi(client); PaymentRefundResponse response = service.refundCapturedPayment("paymentPspReference", paymentRefundRequest, new RequestOptions().idempotencyKey("UUID")); ``` #### PHP ```php setXApiKey("ADYEN_API_KEY"); // For the LIVE environment, also include your liveEndpointUrlPrefix. $client->setEnvironment(Environment::TEST); // Create the request object(s) $lineItem1 = new LineItem(); $lineItem1 ->setQuantity(1) ->setItemCategory("Shirts") ->setTaxPercentage(2000) ->setAmountExcludingTax(1000) ->setImageUrl("your-store.example.com/image-url") ->setDescription("Polo shirt") ->setId("Item-1") ->setAmountIncludingTax(1200) ->setTaxAmount(200) ->setProductUrl("your-store.example.com/product-url"); $amount = new Amount(); $amount ->setCurrency("EUR") ->setValue(1200); $paymentRefundRequest = new PaymentRefundRequest(); $paymentRefundRequest ->setReference("YOUR_UNIQUE_REFERENCE") ->setLineItems(array($lineItem1)) ->setAmount($amount) ->setMerchantAccount("YOUR_MERCHANT_ACCOUNT"); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new ModificationsApi($client); $response = $service->refundCapturedPayment('paymentPspReference', $paymentRefundRequest, $requestOptions); ``` #### C\# ```cs // Adyen .net API Library v32.1.1 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Checkout; using Adyen.Service.Checkout; // For the LIVE environment, also include your liveEndpointUrlPrefix. var config = new Config() { XApiKey = "ADYEN_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) LineItem lineItem1 = new LineItem { Quantity = 1, ItemCategory = "Shirts", TaxPercentage = 2000, AmountExcludingTax = 1000, ImageUrl = "your-store.example.com/image-url", Description = "Polo shirt", Id = "Item-1", AmountIncludingTax = 1200, TaxAmount = 200, ProductUrl = "your-store.example.com/product-url" }; Amount amount = new Amount { Currency = "EUR", Value = 1200 }; PaymentRefundRequest paymentRefundRequest = new PaymentRefundRequest { Reference = "YOUR_UNIQUE_REFERENCE", LineItems = new List{ lineItem1 }, Amount = amount, MerchantAccount = "YOUR_MERCHANT_ACCOUNT" }; // Send the request var service = new ModificationsService(client); var response = service.RefundCapturedPayment("paymentPspReference", paymentRefundRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"}); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v29.0.0 const { Client, CheckoutAPI } = require('@adyen/api-library'); // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const paymentRefundRequest = { reference: "YOUR_UNIQUE_REFERENCE", amount: { value: 1200, currency: "EUR" }, capturePspReference: "TCG5XS42X8NKGK82", merchantAccount: "YOUR_MERCHANT_ACCOUNT", lineItems: [ { quantity: "1", taxPercentage: "2000", description: "Polo shirt", id: "Item-1", itemCategory: "Shirts", amountIncludingTax: "1200", taxAmount: "200", amountExcludingTax: "1000", productUrl: "your-store.example.com/product-url", imageUrl: "your-store.example.com/image-url" } ] } // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.ModificationsApi.refundCapturedPayment("paymentPspReference", paymentRefundRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v21.0.0 import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/src/checkout" ) // For the LIVE environment, also include your liveEndpointUrlPrefix. client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) lineItem1 := checkout.LineItem{ Quantity: common.PtrInt64(1), ItemCategory: common.PtrString("Shirts"), TaxPercentage: common.PtrInt64(2000), AmountExcludingTax: common.PtrInt64(1000), ImageUrl: common.PtrString("your-store.example.com/image-url"), Description: common.PtrString("Polo shirt"), Id: common.PtrString("Item-1"), AmountIncludingTax: common.PtrInt64(1200), TaxAmount: common.PtrInt64(200), ProductUrl: common.PtrString("your-store.example.com/product-url"), } amount := checkout.Amount{ Currency: "EUR", Value: 1200, } paymentRefundRequest := checkout.PaymentRefundRequest{ Reference: common.PtrString("YOUR_UNIQUE_REFERENCE"), LineItems: []checkout.LineItem{ lineItem1, }, Amount: amount, MerchantAccount: "YOUR_MERCHANT_ACCOUNT", } // Send the request service := client.Checkout() req := service.ModificationsApi.RefundCapturedPaymentInput("paymentPspReference").IdempotencyKey("UUID").PaymentRefundRequest(paymentRefundRequest) res, httpRes, err := service.ModificationsApi.RefundCapturedPayment(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v13.6.0 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" # For the LIVE environment, also include your liveEndpointUrlPrefix. adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "reference": "YOUR_UNIQUE_REFERENCE", "amount": { "value": 1200, "currency": "EUR" }, "capturePspReference": "TCG5XS42X8NKGK82", "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "lineItems": [ { "quantity": "1", "taxPercentage": "2000", "description": "Polo shirt", "id": "Item-1", "itemCategory": "Shirts", "amountIncludingTax": "1200", "taxAmount": "200", "amountExcludingTax": "1000", "productUrl": "your-store.example.com/product-url", "imageUrl": "your-store.example.com/image-url" } ] } # Send the request result = adyen.checkout.modifications_api.refund_captured_payment(request=json_request, paymentPspReference="paymentPspReference", idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v10.4.0 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_API_KEY' # For the LIVE environment, also include your liveEndpointUrlPrefix. adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :reference => 'YOUR_UNIQUE_REFERENCE', :amount => { :value => 1200, :currency => 'EUR' }, :capturePspReference => 'TCG5XS42X8NKGK82', :merchantAccount => 'YOUR_MERCHANT_ACCOUNT', :lineItems => [ { :quantity => '1', :taxPercentage => '2000', :description => 'Polo shirt', :id => 'Item-1', :itemCategory => 'Shirts', :amountIncludingTax => '1200', :taxAmount => '200', :amountExcludingTax => '1000', :productUrl => 'your-store.example.com/product-url', :imageUrl => 'your-store.example.com/image-url' } ] } # Send the request result = adyen.checkout.modifications_api.refund_captured_payment(request_body, 'paymentPspReference', headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v29.0.0 import { Client, CheckoutAPI, Types } from "@adyen/api-library"; // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.ModificationsApi.refundCapturedPayment("paymentPspReference", paymentRefundRequest, { idempotencyKey: "UUID" }); ``` The following response is returned: **Example refund response for Riverty** ```json { "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "paymentPspReference": "R5WCJDJ890WZNN82", "pspReference": "IHG5XS4FGKVLGK82", "reference": "YOUR_UNIQUE_REFERENCE", "status": "received", "amount": { "currency": "EUR", "value": 1200 }, "lineItems": [ { "quantity": "1", "taxPercentage": "2000", "description": "Polo shirt", "id": "Item-1", "itemCategory": "Shirts", "amountIncludingTax": "1200", "taxAmount": "200", "amountExcludingTax": "1000", "productUrl": "your-store.example.com/product-url", "imageUrl": "your-store.example.com/image-url" } ] } ``` The `pspReference` in the response is the reference of the refund itself. ### Drop-In-Test-And-Go-Live ## Test and go live Riverty provides detailed [error codes](https://docs.riverty.com/bnpl/documentation/response_codes), recommendations on how to test some of the most common [scenarios](https://docs.riverty.com/bnpl/psp/adyen) as well as a comprehensive list of market specific [test data](https://docs.riverty.com/bnpl/documentation/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](https://docs.riverty.com/bnpl/documentation/visual_guidelines) for details.