No momento, esta página não está disponível em português
Payment-method icon

Oney for API only

Add Oney to an existing API-only integration.

Accept 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 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.

Requirements

Requirement Description
Integration type Make sure that you have an existing API-only integration.
Setup steps Before you begin, add Oney in your test Customer Area.

Build your payment form for Oney

When making a 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 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/region
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 France (FR) or Spain (ES).
facilypay_12x for 12 Oney installments in France (FR) or Spain (ES).

We provide logos for 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 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 (FR or ES)
    • facilypay_12x (FR or ES)
  • shopperName: The shopper's first and last name (required). Maximum length: 32 characters. You can optionally include gender, if specified.

  • shopperEmail: The shopper's email address. This is where Oney will send the payment instructions.

  • dateOfBirth

    Optional
    : The shopper's date of birth, if specified. The format must be YYYY-MM-DD.

  • telephoneNumber: The shopper's mobile telephone number, using an international number format.

    • France : +336 or +337 followed by eight digits
    • Spain : +346 or +347 followed by eight digits
  • billingAddress: The address of the shopper associated with their payment details.

    •  billingAddress.postalCode must have five characters.
  • deliveryAddress: The postal address of the shopper where the items will be delivered.

    • deliveryAddress.postalCode must have five characters.
  • countryCode: The shopper's country code.

  • shopperLocale: A combination of language code and country code to specify the language used in your checkout. Refer to list of supported languages.

  • lineItems: Price and product information about the purchased items.

    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. Minimum length: three characters.

  • returnUrl: The URL where the shopper will be redirected back to after completing the payment. The URL can contain a maximum of 1024 characters and must 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.

  • additionalData.oneydata.trustFlag

    Optional
    : An optional field to flag trusted shoppers to Oney for their risk assessment. To use this feature Oney must enable the Oney trust setting on your account. Possible values: 1 or -1.

  • additionalData.oneydata.merchantPays

    Optional
    : An optional field to override the default configuration. When we set up Oney for your merchant account, we also configure who pays the interest fees.

    • true: You pay the interest fees for the shopper.
    • false: The shopper pays the interest fees.

    For example:

    "additionalData": {
        "oneydata.merchantPays": true,
        "oneydata.trustFlag": "1"
    }

Here's an example of a payment of EUR 150 split into three installments.

In the /payments response, note the action object. This contains the information needed to redirect the shopper.

Handle the redirect

  1. To complete the payment, redirect the shopper to the action.url returned in the /payments response, taking into account the following recommendations:

    • When using the HTTP GET method:
      For security reasons, when showing 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.

    • Redirection for mobile integrations:
      For mobile integrations, we strongly recommended that you redirect the shopper to the default browser of their device. Redirecting to the default browser ensures the best compatibility, handling of multi-factor authentication, app-to-app redirection, and error handling.

  2. After the shopper is redirected back to your website, check the payment result by making a POST /payments/details request, specifying:

    • details: object that contains the URL-decoded redirectResult returned when the shopper was redirected back to your site.
  3. In the response note the following:

    • resultCode: use this to present the result to your shopper.
    • pspReference: our unique identifier for the transaction.

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 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 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
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 have received their order, and are waiting for the payment to be completed.
To know the final result of the payment, wait for the AUTHORISATION webhook.

1 Pending or received is only applicable for 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.

Depending on your capture settings, Oney payments are captured manually or automatically, with or without a delay.

If a payment is captured after more than six days, the payment authorization expires and the payment must be authorised again.

Refund the payment

If a Oney payment has not yet been captured, you can cancel it.

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 Oney payment, specify in your call to the /payments/{paymentPspReference}/refunds 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 /payments/{paymentPspReference}/refunds response containing a pspReference associated with this request. Once we have processed your request, you will also receive a REFUND webhook. For more information, refer to Refund.

Test and go live

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

France

Test card number Expiry date CVV
4970 1015 1882 0000 Any date within 3 years from now. Any value.
4970 1030 6015 0000 Any date within 3 years from now. Any value.
4970 1027 3124 0000 Any date within 3 years from now. Any value.
4970 1022 9571 0000 Any date within 3 years from now. Any value.
4970 1093 1788 0000 Any date within 3 years from now. Any value.
4970 1017 0783 0000 Any date within 3 years from now. Any value.
4970 1090 7275 0000 Any date within 3 years from now. Any value.
4970 1084 5160 0000 Any date within 3 years from now. Any value.

You can test 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

To test different responses when making payments in 10 or 12 installments, you need to include the following:

  • Authorised:

    • Shopper email: 10X12X.OK.BDE@oney.fr.
    • Under Complétez vos informations, include:
      • Vos revenus: 3500€
      • Origine du revenu principal: Salarie
      • Vos charges: 500€
    • Under Signez votre contrat, include:
      • Phone number: use 0666000000 to bypass a digital signature, or a real phone number to receive the OTP SMS for digital signing.
  • Refused:

    • Shopper email: 10X12X.KO.BDE@oney.fr.
    • In the Completez vos informations step, include:
      • Vos revenus: 1000€
      • Origine du revenu principal: Autres
      • Vos charges: 800€

To test the full Oney payment flow, contact Support Team.

Spain

Test card number Expiry date CVV
5436 0310 3060 6378 01/2099 257
5199 9923 1264 1465 01/2099 010
2223 0000 1047 9399 01/2099 299
4543 4740 0224 9996 01/2099 956

You can test the different responses by using the following information:

  • Authorised:
    • Shopper email: test_ok@oney.com
    • Correct CVV
  • Refused:
    • Shopper email: test_ko@oney.com
    • Incorrect CVV

Go live

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

See also