Search

Are you looking for test card numbers?

Would you like to contact support?

Payment-method icon

3x 4x Oney Drop-in integration

Add 3x 4x Oney to an existing Drop-in integration.

Our Web Drop-in renders 3x 4x Oney in your payment form, and redirects the shopper to 3x 4x Oney to complete the payment. When making a 3x 4x Oney payment, you also have to:

  1. Collect shopper details, and specify these in your payment request. 3x 4x Oney uses this information for risk checks.
  2. Provide information about the purchased items by specifying lineItems in your payment request.
  3. Handle the redirect result after the shopper returns to your website.
  4. Make sure that the payment is authorised and successfully captured before you ship the goods.
  5. If a payment has already been captured and you need to return the funds to your shopper, you need to perform a refund.
3x 4x Oney is supported from Drop-in version 3.7.0 and later. For more information, refer to Release notes.

Before you begin

This page explains how to add 3x 4x Oney to your existing Web Drop-in integration. The Web Drop-in integration works the same way for all payment methods. If you haven't done this integration yet, refer to our Drop-in integration guide.
Before starting your 3x 4x Oney integration:

  1. Make sure that you have set up your back end implementation, and added Drop-in to your payments form.
  2. Add 3x 4x Oney in your Customer Area.

Show 3x 4x Oney in your payment form

Drop-in uses the countryCode and the amount.currency from your /paymentMethods request to show the available payment methods to your shopper.

To show 3x 4x Oney in your payment form, specify one of the following combinations in your request:

Based on the countryCode, the /paymentMethods response contains:

paymentMethod.type Number of installments and country
facilypay_3x for 3 Oney installments in France (FR) or Spain (ES).
facilypay_4x for 4 Oney installments in France (FR) or Spain (ES).
facilypay_6x for 6 Oney installments in Spain (ES).
facilypay_10x for 10 Oney installments in Spain (ES).
facilypay_12x for 12 Oney installments in Spain (ES).

When the shopper selects the payment method, Drop-in calls the onSubmit event, which contains a state.data object. If your integration is set up correctly, the state.data is passed on to your server to make the payment request.

Optional Drop-in configuration

When creating an instance of Drop-in, you can optionally configure the visibility of the shopper input fields for 3x 4x Oney:

  • personalDetails: Shopper full name, date of birth, phone number, gender 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.

const dropin = checkout
    .create('dropin', {
        paymentMethodsConfiguration: {
            facilypay_3x: { // Optional configuration for 3x 4x Oney
                visibility: {
                    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 behaviour.
                }
            }
        }
    })
    .mount('#dropin');

Make a payment

From your server, make a POST /payments request, including:

  • The following objects, included in the state.data from Drop-in:
    • paymentMethod: The state.data.paymentMethod from the onSubmit event from your front end. It contains the type of 3x 4x Oney payment the shopper wants to use. Possible values: 
      • facilypay_3x (FR or ES)
      • facilypay_4x (FR or ES)
      • facilypay_6x (ES only)
      • facilypay_10x (ES only)
      • facilypay_12x (ES only)
    • firstName: The shopper's first name.
    • lastName: The shopper's last name.
    • gender: The shopper's gender, if specified.
    • shopperEmail: The shopper's email address. This is where 3x 4x Oney will send the payment instructions.
    • dateOfBirth: The shopper's date of birth, if specified.
    • telephoneNumber: The shopper's telephone number.
    • billingAddress:  The address of the shopper associated with their payment details. 
    • deliveryAddress: The postal address of the shopper where the items will be delivered.
  • countryCode: The shopper's country.
  • shipBeforeDate: The date before which the items should be shipped.
  • shopperLocale: A combination of language code and country code to specify the language used in your checkout. For a list of supported languages, refer to Localization.
  • lineItems: Price and product information about the purchased items. 

    3x 4x Oney will only approve the payment if the total amount specified in `lineItems` matches the `amount.value`.
  • shopperReference: A unique reference to identify the shopper. 
  • returnUrl: The URL where the shopper will be redirected back to after completing the payment. The URL should include the protocol: http:// or https://. For example, https://your-company.com/checkout/. You can also include your own additional query parameters, for example, shopper ID or order reference number.
# Set your X-API-KEY with the API key from the Customer Area.
curl https://checkout-test.adyen.com/v64/payments \
-H "x-API-key: YOUR_X-API-KEY" \
-H "content-type: application/json" \
-d '{
  "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
  "reference": "YOUR_ORDER_NUMBER",
  "countryCode": "FR",
  "amount": {
    "currency": "EUR",
    "value": 15000
  },
  "paymentMethod": {
    "type": "facilypay_3x"
  },
  "billingAddress": {
    "city": "UGINE",
    "country": "FR",
    "houseNumberOrName": "0",
    "postalCode": "73400",
    "street": "461 Rue du Centenaire"
  },
  "deliveryAddress": {
    "city": "UGINE",
    "country": "FR",
    "houseNumberOrName": "0",
    "postalCode": "73400",
    "stateOrProvince": "",
    "street": "461 Rue du Centenaire"
  },
  "shopperName": {
    "firstName": "Testperson-fr",
    "gender": "UNKNOWN",
    "lastName": "Approved"
  },
  "telephoneNumber": "+33 1 76 35 07 90",
  "dateOfBirth": "1985-07-30",
  "shipBeforeDate": "2020-12-14",
  "shopperEmail": "shopper@example.com",
  "shopperLocale": "fr_FR",
  "lineItems" : [
      {
         "taxPercentage" : 0,
         "id" : "item1",
         "taxAmount" : 0,
         "description" : "Test Item 1",
         "amountIncludingTax" : 5000,
         "quantity" : 1,
         "taxCategory" : "None",
         "amountExcludingTax" : 5000
      },
      {
         "taxPercentage" : 0,
         "id" : "item2",
         "taxAmount" : 0,
         "description" : "Test Item 2",
         "amountIncludingTax" : 10000,
         "quantity" : 1,
         "taxCategory" : "None",
         "amountExcludingTax" : 10000
      }
   ],
  "shopperReference": "YOUR_UNIQUE_SHOPPER_ID",
  "returnUrl": "https://your-company.com/checkout?shopperOrder=12xy.."
}'
# Set your X-API-KEY with the API key from the Customer Area.
adyen = Adyen::Client.new
adyen.env = :test
adyen.api_key = "YOUR_X-API-KEY"

response = adyen.checkout.payments({
  :merchantAccount => "YOUR_MERCHANT_ACCOUNT",
  :reference => "YOUR_ORDER_NUMBER",
  :paymentMethod => {
    :type => "facilypay_3x"
  },
  :amount => {
    :currency => "EUR",
    :value => 15000
  },
  :shopperLocale => "fr_FR",
  :countryCode => "FR",
  :shopperEmail => "shopper@example.com",
  :dateOfBirth => "1985-07-30",
  :telephoneNumber => "+33 1 76 35 07 90",
  :shopperName => {
    :firstName => "Testperson-fr",
    :gender => "UNKNOWN",
    :lastName => "Approved"
  },
  :shopperReference => "YOUR_UNIQUE_SHOPPER_ID",
  :billingAddress => {
    :city => "UGINE",
    :country => "FR",
    :houseNumberOrName => "0",
    :postalCode => "73400",
    :street => "461 Rue du Centenaire"
  },
  :deliveryAddress => {
    :city => "UGINE",
    :country => "FR",
    :houseNumberOrName => "0",
    :postalCode => "73400",
    :street => "461 Rue du Centenaire"
  }
  :returnUrl => "https://your-company.com/checkout?shopperOrder=12xy..",
  :lineItems => [
    {
      :quantity => "1",
      :amountExcludingTax => "5000",
      :taxPercentage => "0",
      :description => "Test Item 1",
      :id => "item1",
      :taxAmount => "0",
      :amountIncludingTax => "5000"
    },
    {
      :quantity => "1",
      :amountExcludingTax => "10000",
      :taxPercentage => "0",
      :description => "Test Item 2",
      :id => "item2",
      :taxAmount => "0",
      :amountIncludingTax => "10000"
    }
  ]
})
// Create a Client to establish a connection to our services with your API Key from the Customer Area.
Client client = new Client("YOUR_API_KEY", Environment.TEST);

Checkout checkout = new Checkout(client);

PaymentsRequest paymentsRequest = new PaymentsRequest();

paymentsRequest.setMerchantAccount("YOUR_MERCHANT_ACCOUNT");
paymentsRequest.setReference("YOUR_ORDER_REFERENCE");

PaymentMethodDetails paymentMethodDetails = new DefaultPaymentMethodDetails();
paymentMethodDetails.setType("facilypay_3x");

paymentsRequest.setPaymentMethod(paymentMethodDetails);

Amount amount = new Amount();
amount.setCurrency("EUR");
amount.setValue(15000L);

paymentsRequest.setAmount(amount);
paymentsRequest.setShopperLocale("fr_FR");
paymentsRequest.setCountryCode("FR");
paymentsRequest.setShopperEmail("shopper@example.com");
paymentsRequest.setDateOfBirth("1985-07-30");
paymentsRequest.setTelephoneNumber("+33 1 76 35 07 90");

Name shopperDetails = new Name();
shopperDetails.setFirstName("TestPerson-Fr");
shopperDetails.setGender(Name.GenderEnum.UNKNOWN);
shopperDetails.setLastName("Approved");

paymentsRequest.setShopperName(shopperDetails);
paymentsRequest.setShopperReference("YOUR_UNIQUE_SHOPPER_ID");

Address billingAddress = new Address();
billingAddress.setCity("UGINE");
billingAddress.setCountry("FR");
billingAddress.setHouseNumberOrName("0");
billingAddress.setPostalCode("73400");
billingAddress.setStreet("461 Rue du Centenaire");

Address deliveryAddress = new Address();
deliveryAddress.setCity("UGINE");
deliveryAddress.setCountry("FR");
deliveryAddress.setHouseNumberOrName("0");
deliveryAddress.setPostalCode("73400");
deliveryAddress.setStreet("461 Rue du Centenaire");

paymentsRequest.setBillingAddress(billingAddress);
paymentsRequest.setDeliveryAddress(deliveryAddress);
paymentsRequest.setReturnUrl("https://your-company.com/checkout?shopperOrder=12xy..");

List<LineItem> lineItems = new ArrayList<>();
lineItems.add(
        new LineItem()
                .quantity(1L)
                .amountExcludingTax(5000L)
                .taxPercentage(0L)
                .description("Test Item 1")
                .id("item1")
                .taxAmount(0L)
                .amountIncludingTax(5000L)
);
lineItems.add(
        new LineItem()
                .quantity(1L)
                .amountExcludingTax(10000L)
                .taxPercentage(0L)
                .description("Test Item 2")
                .id("item2")
                .taxAmount(0L)
                .amountIncludingTax(10000L)
);

paymentsRequest.setLineItems(lineItems);

PaymentsResponse paymentsResponse = checkout.payments(paymentsRequest);
// Set your X-API-KEY with the API key from the Customer Area.
$client = new \Adyen\Client();
$client->setXApiKey("YOUR_X-API-KEY");
$service = new \Adyen\Service\Checkout($client);

$params = [
  "merchantAccount" => "YOUR_MERCHANT_ACCOUNT",
  "reference" => "YOUR_ORDER_REFERENCE",
  "paymentMethod" => [
     "type" => "facilypay_3x"
  ],
  "amount" => [
     "currency" => "EUR",
     "value" => "15000"
  ],
  "shopperLocale" => "fr_FR",
  "countryCode" => "FR",
  "shopperEmail" => "shopper@example.com",
  "dateOfBirth" => "1985-07-30",
  "telephoneNumber" => "+33 1 76 35 07 90",
  "shopperName" => [
     "firstName" => "Testperson-fr",
     "gender" => "UNKNOWN",
     "lastName" => "Approved"
  ],
  "shopperReference" => "YOUR_UNIQUE_SHOPPER_ID",
  "billingAddress" => [
     "city" => "UGINE",
     "country" => "FR",
     "houseNumberOrName" => "0",
     "postalCode" => "73400",
     "street" => "461 Rue du Centenaire"
  ],
  :"deliveryAddress" => [
      :"city" => "UGINE",
      :"country" => "FR",
      :"houseNumberOrName" => "0",
      :"postalCode" => "73400",
      :"street" => "461 Rue du Centenaire"
    ]
  "returnUrl" => "https://your-company.com/checkout?shopperOrder=12xy..",
  "lineItems" => [
     [
        "quantity" => "1",
        "amountExcludingTax" => "5000",
        "taxPercentage" => "0",
        "description" => "Test Item 1",
        "id" => "item1",
        "taxAmount" => "0",
        "amountIncludingTax" => "5000"
     ],
     [
        "quantity" => "1",
        "amountExcludingTax" => "10000",
        "taxPercentage" => "0",
        "description" => "Test Item 2",
        "id" => "item2",
        "taxAmount" => "0",
        "amountIncludingTax" => "10000"
     ]
  ]
];

$result = $service->payments($params);

// Check if further action is needed
if (array_key_exists("action", $result){
   // Pass the action object to your frontend.
   // $result["action"]
}
else {
   // No further action needed, pass the resultCode to your front end
   // $result['resultCode']
}
# Set your X-API-KEY with the API key from the Customer Area.
adyen = Adyen.Adyen()
adyen.client.xapikey = 'YOUR_X-API-KEY'

result = adyen.checkout.payments({
  "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
  "reference": "YOUR_ORDER_REFERENCE",
  "paymentMethod": {
    "type": "facilypay_3x"
  },
  "amount": {
    "currency": "EUR",
    "value": 15000
  },
  ,
  "telephoneNumber": "+33 1 76 35 07 90",
  "dateOfBirth": "1985-07-30",
  "shipBeforeDate": "2020-12-14",
  "shopperLocale": "fr_FR",
  "countryCode": "FR",
  "shopperEmail": "shopper@example.com",
  "shopperName": {
    "firstName": "Testperson-fr",
    "gender": "UNKNOWN",
    "lastName": "Approved"
  },
  "shopperReference": "YOUR_UNIQUE_SHOPPER_ID",
  "billingAddress": {
    "city": "UGINE",
    "country": "FR",
    "houseNumberOrName": "0",
    "postalCode": "73400",
    "street": "461 Rue du Centenaire"
  },
  "deliveryAddress": {
      "city": "UGINE",
      "country": "FR",
      "houseNumberOrName": "0",
      "postalCode": "73400",
      "stateOrProvince": "",
      "street": "461 Rue du Centenaire"
  },
  "returnUrl": "https://your-company.com/checkout?shopperOrder=12xy..",
  "lineItems": [
    {
      "taxPercentage" : "0",
      "id" : "item1",
      "taxAmount" : "0",
      "description" : "Test Item 1",
      "amountIncludingTax" : "5000",
      "quantity" : "1",
      "taxCategory" : "None",
       "amountExcludingTax" : "5000"
    },
    {
       "taxPercentage" : "0",
       "id" : "item2",
       "taxAmount" : "0",
       "description" : "Test Item 2",
       "amountIncludingTax" : "10000",
       "quantity" : "1",
       "taxCategory" : "None",
       "amountExcludingTax" : "10000"
    }
  ]
})
// Set your X-API-KEY with the API key from the Customer Area.
var client = new Client ("YOUR_X-API-KEY", Environment.Test);
var checkout = new Checkout(client);

var paymentRequest = new Adyen.Model.Checkout.PaymentRequest
{
   MerchantAccount = "YOUR_MERCHANT_ACCOUNT",
   Reference = "YOUR_ORDER_REFERENCE",
   PaymentMethod = new DefaultPaymentMethodDetails { Type = "facilypay_3x" },
   Amount = new Model.Checkout.Amount(Currency: "EUR", Value: 15000),
   ShopperLocale = "fr_FR",
   CountryCode = "FR",
   ShopperEmail = "shopper@example.com",
   DateOfBirth = "1985-07-30",
   TelephoneNumber = "+33 1 76 35 07 90",
   ShopperName = new Model.Checkout.Name
   {
       FirstName = "Testperson-fr",
       Gender = Model.Checkout.Name.GenderEnum.UNKNOWN,
       LastName = "Approved"
   },
   ShopperReference = "YOUR_UNIQUE_SHOPPER_ID",
   OneyData = new Adyen.Model.Checkout.OneyData
   {
       MerchantPays: "true"
   }
   BillingAddress = new Model.Checkout.Address
   {
       City = "UGINE",
       Country = "FR",
       HouseNumberOrName = "0",
       PostalCode = "73400",
       Street = "461 Rue du Centenaire"
   },
    DeliveryAddress: new Model.Checkout.Address
    {
       City: "UGINE",
       Country: "FR",
       HouseNumberOrName: "0",
       PostalCode: "73400",
       StateOrProvince: "",
       Street: "461 Rue du Centenaire"
     },
   ReturnUrl = "https://your-company.com/checkout?shopperOrder=12xy..",
   LineItems = new List<LineItem>
{
   new LineItem(TaxPercentage:0, Id:"item1", TaxAmount:0,
   Description:"Test Item 1", AmountIncludingTax:5000, Quantity:1, TaxCategory:"None", AmountExcludingTax:5000),
   new LineItem(TaxPercentage:0, Id:"item2", TaxAmount:0,
   Description:"Test Item 2", AmountIncludingTax:10000, Quantity:1, TaxCategory:"None", AmountExcludingTax:10000),
}
return paymentRequest;
}
// Set your X-API-KEY with the API key from the Customer Area.
const {Client, Config, CheckoutAPI} = require('@adyen/api-library');
const config = new Config();
// Set your X-API-KEY with the API key from the Customer Area.
config.apiKey = '[API_KEY]';
config.merchantAccount = '[MERCHANT_ACCOUNT]';
const client = new Client({ config });
client.setEnvironment("TEST");
const checkout = new CheckoutAPI(client);
checkout.payments({
  merchantAccount: "YOUR_MERCHANT_ACCOUNT",
  reference: "YOUR_ORDER_REFERENCE",
  paymentMethod: {
     type: "facilypay_3x"
  },
  amount: {
     currency: "EUR",
     value: "15000"
  },
  shopperLocale: "fr_FR",
  countryCode: "FR",
  shopperEmail: "shopper@example.com",
  dateOfBirth: "1985-07-30",
  telephoneNumber:"+33 1 76 35 07 90",
  shopperName: {
     firstName: "Testperson-fr",
     gender: "UNKNOWN",
     lastName: "Approved"
  },
  shopperReference: "YOUR_UNIQUE_SHOPPER_ID",
  billingAddress: {
     city: "UGINE",
     country: "FR",
     houseNumberOrName: "0",
     postalCode: "73400",
     street: "461 Rue du Centenaire"
  },
  deliveryAddress: {
      city: "UGINE",
      country: "FR",
      houseNumberOrName: "0",
      postalCode: "73400",
      street: "461 Rue du Centenaire"
  },
  returnUrl: "https://your-company.com/checkout?shopperOrder=12xy..",
  lineItems: [
     {
        quantity: "1",
        amountExcludingTax: "5000",
        taxPercentage: "0",
        description: "Test Item 1",
        id: "item1",
        taxAmount: "0",
        amountIncludingTax: "5000"
     },
     {
        quantity: "1",
        amountExcludingTax: "10000",
        taxPercentage: "0",
        description: "Test Item 2",
        id: "item2",
        taxAmount: "0",
        amountIncludingTax: "10000"
     }
  ]
}).then(res => res);

The /payments response contains an action object with type:redirect.

/payments response
{
   "resultCode":"RedirectShopper",
   "action":{
      "method":"GET",
      "paymentData":"Ab02b4c0!BQABAgCSZT7t...",
      "paymentMethodType":"facilypay_3x",
      "type":"redirect",
      "url":"https://test.adyen.com/hpp/redirect.shtml?brandCode=.."
   },
   "details":[
      {
         "key":"payload",
         "type":"text"
      }
   ],
    ...
}

If your integration is set up correctly, the action object is passed from your server to the front end, and the action.paymentData temporarily stored on your server.

Handle the redirect

Handling the redirect works the same way for all redirect payment methods.

Drop-in uses dropin.handleAction(action) to redirect the shopper to 3x 4x Oney. After the shopper is redirected back to your website, check the payment result by making a POST /payments/details request, specifying:

  • paymentData: The value from the /payments response.
  • details: Object that contains the URL-decoded values of the parameters that were returned when the shopper was redirected back to your website. For example, payload or redirectResult.
    The parameters can vary based on the payment method configuration. To check which parameters you should submit, always check the details array from the /payments response.

/payments/details request
{
     "paymentData":"Ab02b4c0!BQABAgCJN1wRZuGJmq8dMncmypvknj9s7l5Tj...",
     "details":{
       "{hint:Verify the parameters from /payments response}payload{/hint}":"Ab02b4c0!BQABAgCW5sxB4e/=="
     }
}

The /payments/details response contains:

  • resultCode: Use this to present the payment result to your shopper.
  • pspReference: Our unique identifier for the transaction.

/payments/details response
 {
   "resultCode": "Authorised",
   "pspReference": "88154795347618C"
 }

Present the payment result

Use the resultCode from the /payments/details response to present the payment result to your shopper. The resultCode values you can receive for 3x 4x Oney are:

resultCode Description Action to take
Authorised The payment was successful. Inform the shopper that the payment was successful. Ship the goods after you successfully capture the payment.
Cancelled The shopper cancelled the payment. Ask the shopper whether they want to continue with the order, or ask them to select a different payment method.
Refused The payment was refused by 3x 4x Oney, because it didn't pass their risk checks. Ask the shopper to try the payment again using a different payment method.
Pending or Received
See note 1
3x 4x Oney has not confirmed the final status of the payment yet, for example because of suspected fraud. If the payment is not authorised within 24 hours, it is automatically cancelled. Inform the shopper that you've received their order, and are waiting for the payment to be completed.
To know the final result of the payment, wait for the AUTHORISATION notification.

1 Pending or received is only applicable for 3x 4x Oney payments with countryCode FR. Payments with countryCode ES are accepted or rejected immediately.

Capture the payment

Make sure that the payment is captured successfully before you ship the goods.

France

All 3x 4x Oney payments have to be manually captured within six days after authorisation, even if you have enabled automatic capture on your merchant account.

If you can guarantee that the goods are shipped within 24 hours of capturing the payment, our Support Team can also set up automatic capture for 3x 4x Oney payments.

Currently, you cannot do partial captures with 3x 4x Oney for France.

Spain

All 3x 4x Oney payments are captured automatically after authorisation.
Currently, you cannot do partial captures with 3x 4x Oney for Spain.

Refund the payment

If a 3x 4x Oney payment has not yet been captured, you can cancel it. Cancelling is only possible for 3x 4x Oney payments with countryCode FR because payments with countryCode ES are captured immediately after authorisation.
If the payment has already been captured and you want to return the funds to the shopper, you need to refund it.

You can refund payments until 13 months after they have been captured.

Partial refunds

To partially refund a 3x 4x Oney payment, specify in your call to the /refund endpoint:

  • modificationAmount: The amount to be refunded to the shopper.
{
   "merchantAccount":"YOUR_MERCHANT_ACCOUNT",
   "modificationAmount":{
      "currency":"EUR",
      "value":400
   },
   "originalReference":"8825408195409505"
}

You will receive a /refund response containing a pspReference associated with this request. Once we have processed your request, you will also receive a REFUND notification. For more information, refer to Refund.

Test and go live

Before accepting live 3x 4x Oney payments, test your integration using the following test details:

France

Test card number Expiry date CVV
4970 1015 5874 4789 Any date in the future Any value
4970 1090 4680 2374 Any date in the future Any value
4970 1090 0325 6200 Any date in the future Any value

You can test the different responses by changing the amount to be paid:

  • Authorised: Between EUR 150.00 and EUR 999.99
  • Pending: Between EUR 1000.00 and EUR 1499.99
  • Refused: Between EUR 1500.00 and EUR 2000.00

Spain

Test card number Expiry date CVV
4907 2720 1107 2841 Any date in the future Any value
5410 0800 0888 8005 Any date in the future Any value

You can test the different responses using different documento nacional de identidad (DNI, Spanish ID card) numbers:

  • Authorised: DNI 05696340E
  • Refused: DNI 75914068S

Go live

Before you can accept live 3x 4x Oney payments, you need to submit a request for Oney 3x4x in your live Customer Area.

See also