Search

Are you looking for test card numbers?

Would you like to contact support?

Payment-method icon

3x 4x Oney for API only

Add 3x 4x Oney to an existing API-only integration.

Accept 3x 4x Oney payments using our APIs, and build your own payment form to have full control over the look and feel of your checkout page.

When making a 3x 4x Oney payment:

  1. Collect shopper details and specify these in your payment request.
  2. Provide information about the purchased items by specifying lineItems in your payment request.
  3. Make sure that the payment is authorised and successfully captured before you ship the goods.
  4. If a payment has already been captured and you need to return the funds to your shopper, you need to perform a refund.

Before you begin

These instructions explain how to add 3x 4x Oney to your existing API-only integration. The API-only integration works the same way for all payment methods. If you haven't done this integration yet, refer to our API-only integration guide.

Before starting your 3x 4x Oney integration:

  1. Make sure that you have set up your back end implementation.
  2. Add 3x 4x Oney in your test Customer Area.

Build your payment form for 3x 4x Oney

When making a 3x 4x Oney payment, collect the following shopper details:

Shopper detail Required Description
Full name -white_check_mark- The shopper's first name and last name.
Gender The shopper's gender, if specified.
Email -white_check_mark- The shopper's email address. This is where 3x 4x Oney will send the invoice.
Date of birth The shopper's date of birth, if specified.
Telephone number -white_check_mark- The shopper's telephone number.
Billing address -white_check_mark- The address of the shopper associated with their payment details, to be included on the invoice.
Delivery address -white_check_mark- The postal address of the shopper where the items will be delivered.

If you are using the /paymentMethods endpoint to show the available payment methods to the shopper, specify the following 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).

We provide logos for 3x 4x Oney which you can use on your payment form. For more information, refer to Downloading logos.

Make a payment

From your server, make a /payments request, specifying:

  • paymentMethod.type: 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)
  • countryCode: The shopper's country.
  • shopperName: The shopper's full name and gender, if specified.
  • telephoneNumber: The shopper's telephone number.
  • dateOfBirth: The shopper's date of birth, if specified.
  • shopperEmail: The shopper's email address. This is where 3x 4x Oney will send the payment instructions.
  • 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`.
  • billingAddress:  The address of the shopper associated with their payment details. 
  • deliveryAddress: The postal address of the shopper where the items will be delivered.
  • shopperReference: A unique reference to identify the shopper. 
  • returnUrl: URL to where the shopper should be taken back to after a redirection. The URL can contain a maximum of 1024 characters and should include the protocol: http:// or https://. 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:

  • action.url: Link to where you should redirect your shopper.
  • action.method: GET or POST. The HTTP request method that you should use. After the shopper completes the payment, they will be redirected back to your returnURL using the same method.
    The redirect method depends on your payment method configuration and the length of the data included in the request, so make sure that your integration can handle both HTTP GET and HTTP POST methods.

To verify the payment result in the next step, you also need the following from the /payments response:

  • action.paymentData: The paymentData value that you send in your /payments/details request.
  • details: Array of parameters that you need to send in your /payments/details request. For example, payload or redirectResult.
    The parameters can vary based on the payment method configuration. Always check the details array for the parameters that you need to send in your next API request.
/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"
    }
  ],
  ...
}

Handle the redirect

  1. To complete the payment, redirect the shopper to the action.url returned in the /payments response.
    When using the HTTP GET method:
    For security reasons, when displaying the redirect in the app, we recommend that you use SFSafariViewController for iOS or Chrome Custom Tabs for Android, instead of WebView objects. Also refer to the security best practices for WebView.
  2. After the shopper is redirected back to your website or app, check the payment result by making a /payments/details request, specifying:
    • paymentData: Value you received in 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 or app. 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/=="
         }
    }
    You receive a response containing:
    • resultCode: Use this to present the result to your shopper.
    • pspReference: Our unique identifier for the transaction.
    /payments/details response
     {
       "resultCode": "Authorised",
       "pspReference": "88154795347618C"
     }

After you have checked the payment result, use the resultCode in the /payments/details response to present the payment result to your shopper.

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