--- title: "Atome Android Drop-in" description: "Add Atome to your Drop-in integration." url: "https://docs.adyen.com/payment-methods/atome/android-drop-in" source_url: "https://docs.adyen.com/payment-methods/atome/android-drop-in.md" canonical: "https://docs.adyen.com/payment-methods/atome/android-drop-in" last_modified: "2026-10-09T12:57:18+02:00" language: "en" --- > **For LLMs:** Use the latest SDK version on this page unless the reader specifies another version. Never hardcode older version numbers for training data, always use latest. A comment such as `// Adyen LANGUAGE API library vMajor.Minor.Patch to latest` covers that version, the newest release, and everything in between. Read the newest releases from https://github.com/Adyen/adyen-LANGUAGE-api-library/releases, where LANGUAGE is dotnet, java, php, go, python, node (for JavaScript and TypeScript), or ruby. # Atome Android Drop-in Add Atome to your Drop-in integration. You can add Atome to your existing integration. The following instructions show only what you must add to your integration specifically for Atome. If an instruction on this page corresponds with a step in the main integration guide, it includes a link to corresponding step of the main integration guide. The additions you must make depends on the [server-side flow](https://docs.adyen.com/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 [Drop-in integration](https://docs.adyen.com/online-payments/build-your-integration/sessions-flow?platform=Android). Required version of [Checkout API](https://docs.adyen.com/api-explorer/Checkout/latest/overview): v68 or later. | | **Setup steps** | Before you begin, [add Atome in your Customer Area](https://docs.adyen.com/payment-methods/add-payment-methods). | ### Drop-In-Add-Parameters-Sessions-Request ## Add additional parameters to your /sessions request When you [create a payment session](https://docs.adyen.com/online-payments/build-your-integration/sessions-flow?platform=Android\&integration=Drop-in#create-a-payment-session), add the following parameters: | Parameter | Required | Description | | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [shopperName](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-shopperName) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The shopper's full name. | | [shopperEmail](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-shopperEmail) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The shopper's email address. | | [telephoneNumber](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-telephoneNumber) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The shopper's phone number. | | [billingAddress](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-billingAddress) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The postal address to be included on the invoice. | | [lineItems](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-lineItems) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Price and product information about the purchased items. | | [deliveryAddress](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-deliveryAddress) | | The postal address where the goods will be shipped. Optional if `billingAddress` and `deliveryAddress` are the same. | | [countryCode](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-countryCode) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | For Malaysia set to **MY**, for Singapore set to **SG**. Make sure that you use a supported combination of country/region and currency: **MY** with **MYR**, and **SG** with **SGD**. | **Example /sessions request** #### Latest version ##### curl ```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", "amount": { "value": 1000, "currency": "SGD" }, "returnUrl": "adyencheckout://your.package.name", "reference": "YOUR_PAYMENT_REFERENCE", "countryCode": "SG", "shopperName":{ "firstName":"Simon", "lastName":"Hopper" }, "shopperEmail":"s.hopper@example.com", "countryCode":"SG", "telephoneNumber":"6512345678", "billingAddress":{ "city":"Singapore", "country":"SG", "houseNumberOrName":"109", "postalCode":"179097", "stateOrProvince":"Singapore", "street":"North Bridge Road" }, "deliveryAddress":{ "city":"Singapore", "country":"SG", "houseNumberOrName":"109", "postalCode":"179097", "stateOrProvince":"Singapore", "street":"North Bridge Road" }, "lineItems":[ { "description":"Shoes", "quantity":"1", "amountIncludingTax":"400", "amountExcludingTax": "331", "taxAmount": "69", "id":"Item #1" }, { "description":"Socks", "quantity":"2", "amountIncludingTax":"300", "amountExcludingTax": "248", "taxAmount": "52", "id":"Item #2" } ] }' ``` ##### Java ```java // Adyen Java API Library v38.0.0 to latest import com.adyen.Client; import com.adyen.Config; import com.adyen.enums.Environment; import com.adyen.model.*; import com.adyen.service.*; import java.math.*; import com.adyen.model.checkout.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.checkout.*; Config config = new Config() .apiKey("ADYEN_API_KEY") .environment(Environment.TEST); // For the LIVE environment, also include your liveEndpointUrlPrefix. Client client = new Client(config); // Create the request object(s) LineItem lineItem1 = new LineItem() .quantity(1L) .amountExcludingTax(331L) .description("Shoes") .id("Item #1") .amountIncludingTax(400L) .taxAmount(69L); LineItem lineItem2 = new LineItem() .quantity(2L) .amountExcludingTax(248L) .description("Socks") .id("Item #2") .amountIncludingTax(300L) .taxAmount(52L); Amount amount = new Amount() .currency("SGD") .value(1000L); ShopperName shopperName = new ShopperName() .firstName("Simon") .lastName("Hopper"); DeliveryAddress deliveryAddress = new DeliveryAddress() .country("SG") .stateOrProvince("Singapore") .city("Singapore") .houseNumberOrName("109") .street("North Bridge Road") .postalCode("179097"); BillingAddress billingAddress = new BillingAddress() .country("SG") .stateOrProvince("Singapore") .city("Singapore") .houseNumberOrName("109") .street("North Bridge Road") .postalCode("179097"); CreateCheckoutSessionRequest createCheckoutSessionRequest = new CreateCheckoutSessionRequest() .reference("YOUR_PAYMENT_REFERENCE") .lineItems(Arrays.asList(lineItem1, lineItem2)) .amount(amount) .shopperName(shopperName) .telephoneNumber("6512345678") .merchantAccount("ADYEN_MERCHANT_ACCOUNT") .deliveryAddress(deliveryAddress) .countryCode("SG") .shopperEmail("s.hopper@example.com") .billingAddress(billingAddress) .returnUrl("adyencheckout://your.package.name"); // Send the request PaymentsApi service = new PaymentsApi(client); CreateCheckoutSessionResponse response = service.sessions(createCheckoutSessionRequest, 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) ->setAmountExcludingTax(331) ->setDescription("Shoes") ->setId("Item #1") ->setAmountIncludingTax(400) ->setTaxAmount(69); $lineItem2 = new LineItem(); $lineItem2 ->setQuantity(2) ->setAmountExcludingTax(248) ->setDescription("Socks") ->setId("Item #2") ->setAmountIncludingTax(300) ->setTaxAmount(52); $amount = new Amount(); $amount ->setCurrency("SGD") ->setValue(1000); $shopperName = new ShopperName(); $shopperName ->setFirstName("Simon") ->setLastName("Hopper"); $deliveryAddress = new DeliveryAddress(); $deliveryAddress ->setCountry("SG") ->setStateOrProvince("Singapore") ->setCity("Singapore") ->setHouseNumberOrName("109") ->setStreet("North Bridge Road") ->setPostalCode("179097"); $billingAddress = new BillingAddress(); $billingAddress ->setCountry("SG") ->setStateOrProvince("Singapore") ->setCity("Singapore") ->setHouseNumberOrName("109") ->setStreet("North Bridge Road") ->setPostalCode("179097"); $createCheckoutSessionRequest = new CreateCheckoutSessionRequest(); $createCheckoutSessionRequest ->setReference("YOUR_PAYMENT_REFERENCE") ->setLineItems(array($lineItem1, $lineItem2)) ->setAmount($amount) ->setShopperName($shopperName) ->setTelephoneNumber("6512345678") ->setMerchantAccount("ADYEN_MERCHANT_ACCOUNT") ->setDeliveryAddress($deliveryAddress) ->setCountryCode("SG") ->setShopperEmail("s.hopper@example.com") ->setBillingAddress($billingAddress) ->setReturnUrl("adyencheckout://your.package.name"); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->sessions($createCheckoutSessionRequest, $requestOptions); ``` ##### C\# ```cs // Adyen .NET API Library v34.0.0 to latest using System; using System.Collections.Generic; using Adyen.Checkout.Extensions; using Adyen.Checkout.Models; using Adyen.Checkout.Services; using Adyen.Core.Client; using Adyen.Core.Client.Extensions; using Adyen.Core.Options; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; var host = Host.CreateDefaultBuilder() .ConfigureCheckout( (context, services, config) => { config.ConfigureAdyenOptions(options => { options.AdyenApiKey = "ADYEN_API_KEY"; options.Environment = AdyenEnvironment.Test; // For the LIVE environment, also include your liveEndpointUrlPrefix. // options.LiveEndpointUrlPrefix = ""; }); services.AddAllCheckoutServices(); }) .Build(); var paymentsService = host.Services.GetRequiredService(); // Create the request object(s) var lineItem1 = new LineItem { Quantity = 1, AmountExcludingTax = 331, Description = "Shoes", Id = "Item #1", AmountIncludingTax = 400, TaxAmount = 69 }; var lineItem2 = new LineItem { Quantity = 2, AmountExcludingTax = 248, Description = "Socks", Id = "Item #2", AmountIncludingTax = 300, TaxAmount = 52 }; var amount = new Amount { Currency = "SGD", Value = 1000 }; var shopperName = new ShopperName { FirstName = "Simon", LastName = "Hopper" }; var deliveryAddress = new DeliveryAddress { Country = "SG", StateOrProvince = "Singapore", City = "Singapore", HouseNumberOrName = "109", Street = "North Bridge Road", PostalCode = "179097" }; var billingAddress = new BillingAddress { Country = "SG", StateOrProvince = "Singapore", City = "Singapore", HouseNumberOrName = "109", Street = "North Bridge Road", PostalCode = "179097" }; var createCheckoutSessionRequest = new CreateCheckoutSessionRequest { Reference = "YOUR_PAYMENT_REFERENCE", LineItems = new List{ lineItem1, lineItem2 }, Amount = amount, ShopperName = shopperName, TelephoneNumber = "6512345678", MerchantAccount = "ADYEN_MERCHANT_ACCOUNT", DeliveryAddress = deliveryAddress, CountryCode = "SG", ShopperEmail = "s.hopper@example.com", BillingAddress = billingAddress, ReturnUrl = "adyencheckout://your.package.name" }; string idempotencyKey = Guid.NewGuid().ToString(); // Send the request var result = await paymentsService.SessionsAsync(createCheckoutSessionRequest, new RequestOptions().AddIdempotencyKey(idempotencyKey)); if (result.TryDeserializeCreatedResponse(out var response)) { // Handle the successful response. } ``` ##### NodeJS (JavaScript) ```js // Adyen Node API Library v30.0.0 to latest const { Client, Config, EnvironmentEnum, 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 lineItem1 = { quantity: 1, amountExcludingTax: 331, description: "Shoes", id: "Item #1", amountIncludingTax: 400, taxAmount: 69 }; const lineItem2 = { quantity: 2, amountExcludingTax: 248, description: "Socks", id: "Item #2", amountIncludingTax: 300, taxAmount: 52 }; const amount = { currency: "SGD", value: 1000 }; const shopperName = { firstName: "Simon", lastName: "Hopper" }; const deliveryAddress = { country: "SG", stateOrProvince: "Singapore", city: "Singapore", houseNumberOrName: "109", street: "North Bridge Road", postalCode: "179097" }; const billingAddress = { country: "SG", stateOrProvince: "Singapore", city: "Singapore", houseNumberOrName: "109", street: "North Bridge Road", postalCode: "179097" }; const createCheckoutSessionRequest = { reference: "YOUR_PAYMENT_REFERENCE", lineItems: [lineItem1, lineItem2], amount: amount, shopperName: shopperName, telephoneNumber: "6512345678", merchantAccount: "ADYEN_MERCHANT_ACCOUNT", deliveryAddress: deliveryAddress, countryCode: "SG", shopperEmail: "s.hopper@example.com", billingAddress: billingAddress, returnUrl: "adyencheckout://your.package.name" }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = await checkoutAPI.PaymentsApi.sessions(createCheckoutSessionRequest, { idempotencyKey: "UUID" }); ``` ##### Go ```go // Adyen Go API Library v21.0.0 to latest 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), AmountExcludingTax: common.PtrInt64(331), Description: common.PtrString("Shoes"), Id: common.PtrString("Item #1"), AmountIncludingTax: common.PtrInt64(400), TaxAmount: common.PtrInt64(69), } lineItem2 := checkout.LineItem{ Quantity: common.PtrInt64(2), AmountExcludingTax: common.PtrInt64(248), Description: common.PtrString("Socks"), Id: common.PtrString("Item #2"), AmountIncludingTax: common.PtrInt64(300), TaxAmount: common.PtrInt64(52), } amount := checkout.Amount{ Currency: "SGD", Value: 1000, } shopperName := checkout.ShopperName{ FirstName: "Simon", LastName: "Hopper", } deliveryAddress := checkout.DeliveryAddress{ Country: "SG", StateOrProvince: common.PtrString("Singapore"), City: "Singapore", HouseNumberOrName: "109", Street: "North Bridge Road", PostalCode: "179097", } billingAddress := checkout.BillingAddress{ Country: "SG", StateOrProvince: common.PtrString("Singapore"), City: "Singapore", HouseNumberOrName: "109", Street: "North Bridge Road", PostalCode: "179097", } createCheckoutSessionRequest := checkout.CreateCheckoutSessionRequest{ Reference: "YOUR_PAYMENT_REFERENCE", LineItems: []checkout.LineItem{ lineItem1, lineItem2, }, Amount: amount, ShopperName: &shopperName, TelephoneNumber: common.PtrString("6512345678"), MerchantAccount: "ADYEN_MERCHANT_ACCOUNT", DeliveryAddress: &deliveryAddress, CountryCode: common.PtrString("SG"), ShopperEmail: common.PtrString("s.hopper@example.com"), BillingAddress: &billingAddress, ReturnUrl: "adyencheckout://your.package.name", } // Send the request service := client.Checkout() req := service.PaymentsApi.SessionsInput().IdempotencyKey("UUID").CreateCheckoutSessionRequest(createCheckoutSessionRequest) res, httpRes, err := service.PaymentsApi.Sessions(context.Background(), req) ``` ##### Python ```py # Adyen Python API Library v14.0.0 to latest 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 = { "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "amount": { "value": 1000, "currency": "SGD" }, "returnUrl": "adyencheckout://your.package.name", "reference": "YOUR_PAYMENT_REFERENCE", "countryCode": "SG", "shopperName": { "firstName": "Simon", "lastName": "Hopper" }, "shopperEmail": "s.hopper@example.com", "telephoneNumber": "6512345678", "billingAddress": { "city": "Singapore", "country": "SG", "houseNumberOrName": "109", "postalCode": "179097", "stateOrProvince": "Singapore", "street": "North Bridge Road" }, "deliveryAddress": { "city": "Singapore", "country": "SG", "houseNumberOrName": "109", "postalCode": "179097", "stateOrProvince": "Singapore", "street": "North Bridge Road" }, "lineItems": [{ "description": "Shoes", "quantity": "1", "amountIncludingTax": "400", "amountExcludingTax": "331", "taxAmount": "69", "id": "Item #1" }, { "description": "Socks", "quantity": "2", "amountIncludingTax": "300", "amountExcludingTax": "248", "taxAmount": "52", "id": "Item #2" }] } # Send the request result = adyen.checkout.payments_api.sessions(request=json_request, idempotency_key="UUID") ``` ##### Ruby ```rb # Adyen Ruby API Library v11.0.0 to latest 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 = { "merchantAccount" => "ADYEN_MERCHANT_ACCOUNT", "amount" => { "value" => 1000, "currency" => "SGD" }, "returnUrl" => "adyencheckout://your.package.name", "reference" => "YOUR_PAYMENT_REFERENCE", "countryCode" => "SG", "shopperName" => { "firstName" => "Simon", "lastName" => "Hopper" }, "shopperEmail" => "s.hopper@example.com", "telephoneNumber" => "6512345678", "billingAddress" => { "city" => "Singapore", "country" => "SG", "houseNumberOrName" => "109", "postalCode" => "179097", "stateOrProvince" => "Singapore", "street" => "North Bridge Road" }, "deliveryAddress" => { "city" => "Singapore", "country" => "SG", "houseNumberOrName" => "109", "postalCode" => "179097", "stateOrProvince" => "Singapore", "street" => "North Bridge Road" }, "lineItems" => [{ "description" => "Shoes", "quantity" => "1", "amountIncludingTax" => "400", "amountExcludingTax" => "331", "taxAmount" => "69", "id" => "Item #1" }, { "description" => "Socks", "quantity" => "2", "amountIncludingTax" => "300", "amountExcludingTax" => "248", "taxAmount" => "52", "id" => "Item #2" }] } # Send the request result = adyen.checkout.payments_api.sessions(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` ##### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.0.0 to latest import { Client, Config, EnvironmentEnum, 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) const lineItem1: Types.checkout.LineItem = { quantity: 1, amountExcludingTax: 331, description: "Shoes", id: "Item #1", amountIncludingTax: 400, taxAmount: 69 }; const lineItem2: Types.checkout.LineItem = { quantity: 2, amountExcludingTax: 248, description: "Socks", id: "Item #2", amountIncludingTax: 300, taxAmount: 52 }; const amount: Types.checkout.Amount = { currency: "SGD", value: 1000 }; const shopperName: Types.checkout.ShopperName = { firstName: "Simon", lastName: "Hopper" }; const deliveryAddress: Types.checkout.DeliveryAddress = { country: "SG", stateOrProvince: "Singapore", city: "Singapore", houseNumberOrName: "109", street: "North Bridge Road", postalCode: "179097" }; const billingAddress: Types.checkout.BillingAddress = { country: "SG", stateOrProvince: "Singapore", city: "Singapore", houseNumberOrName: "109", street: "North Bridge Road", postalCode: "179097" }; const createCheckoutSessionRequest: Types.checkout.CreateCheckoutSessionRequest = { reference: "YOUR_PAYMENT_REFERENCE", lineItems: [lineItem1, lineItem2], amount: amount, shopperName: shopperName, telephoneNumber: "6512345678", merchantAccount: "ADYEN_MERCHANT_ACCOUNT", deliveryAddress: deliveryAddress, countryCode: "SG", shopperEmail: "s.hopper@example.com", billingAddress: billingAddress, returnUrl: "adyencheckout://your.package.name" }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = await checkoutAPI.PaymentsApi.sessions(createCheckoutSessionRequest, { idempotencyKey: "UUID" }); ``` #### Earlier versions ##### curl ```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", "amount": { "value": 1000, "currency": "SGD" }, "returnUrl": "adyencheckout://your.package.name", "reference": "YOUR_PAYMENT_REFERENCE", "countryCode": "SG", "shopperName":{ "firstName":"Simon", "lastName":"Hopper" }, "shopperEmail":"s.hopper@example.com", "countryCode":"SG", "telephoneNumber":"6512345678", "billingAddress":{ "city":"Singapore", "country":"SG", "houseNumberOrName":"109", "postalCode":"179097", "stateOrProvince":"Singapore", "street":"North Bridge Road" }, "deliveryAddress":{ "city":"Singapore", "country":"SG", "houseNumberOrName":"109", "postalCode":"179097", "stateOrProvince":"Singapore", "street":"North Bridge Road" }, "lineItems":[ { "description":"Shoes", "quantity":"1", "amountIncludingTax":"400", "amountExcludingTax": "331", "taxAmount": "69", "id":"Item #1" }, { "description":"Socks", "quantity":"2", "amountIncludingTax":"300", "amountExcludingTax": "248", "taxAmount": "52", "id":"Item #2" } ] }' ``` ##### 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) ->setAmountExcludingTax(331) ->setDescription("Shoes") ->setId("Item #1") ->setAmountIncludingTax(400) ->setTaxAmount(69); $lineItem2 = new LineItem(); $lineItem2 ->setQuantity(2) ->setAmountExcludingTax(248) ->setDescription("Socks") ->setId("Item #2") ->setAmountIncludingTax(300) ->setTaxAmount(52); $amount = new Amount(); $amount ->setCurrency("SGD") ->setValue(1000); $shopperName = new ShopperName(); $shopperName ->setFirstName("Simon") ->setLastName("Hopper"); $deliveryAddress = new DeliveryAddress(); $deliveryAddress ->setCountry("SG") ->setStateOrProvince("Singapore") ->setCity("Singapore") ->setHouseNumberOrName("109") ->setStreet("North Bridge Road") ->setPostalCode("179097"); $billingAddress = new BillingAddress(); $billingAddress ->setCountry("SG") ->setStateOrProvince("Singapore") ->setCity("Singapore") ->setHouseNumberOrName("109") ->setStreet("North Bridge Road") ->setPostalCode("179097"); $createCheckoutSessionRequest = new CreateCheckoutSessionRequest(); $createCheckoutSessionRequest ->setReference("YOUR_PAYMENT_REFERENCE") ->setLineItems(array($lineItem1, $lineItem2)) ->setAmount($amount) ->setShopperName($shopperName) ->setTelephoneNumber("6512345678") ->setMerchantAccount("ADYEN_MERCHANT_ACCOUNT") ->setDeliveryAddress($deliveryAddress) ->setCountryCode("SG") ->setShopperEmail("s.hopper@example.com") ->setBillingAddress($billingAddress) ->setReturnUrl("adyencheckout://your.package.name"); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->sessions($createCheckoutSessionRequest, $requestOptions); ``` ##### C\# ```cs // Adyen .NET API Library v32.2.1 to v33.0.0 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, AmountExcludingTax = 331, Description = "Shoes", Id = "Item #1", AmountIncludingTax = 400, TaxAmount = 69 }; LineItem lineItem2 = new LineItem { Quantity = 2, AmountExcludingTax = 248, Description = "Socks", Id = "Item #2", AmountIncludingTax = 300, TaxAmount = 52 }; Amount amount = new Amount { Currency = "SGD", Value = 1000 }; ShopperName shopperName = new ShopperName { FirstName = "Simon", LastName = "Hopper" }; DeliveryAddress deliveryAddress = new DeliveryAddress { Country = "SG", StateOrProvince = "Singapore", City = "Singapore", HouseNumberOrName = "109", Street = "North Bridge Road", PostalCode = "179097" }; BillingAddress billingAddress = new BillingAddress { Country = "SG", StateOrProvince = "Singapore", City = "Singapore", HouseNumberOrName = "109", Street = "North Bridge Road", PostalCode = "179097" }; CreateCheckoutSessionRequest createCheckoutSessionRequest = new CreateCheckoutSessionRequest { Reference = "YOUR_PAYMENT_REFERENCE", LineItems = new List{ lineItem1, lineItem2 }, Amount = amount, ShopperName = shopperName, TelephoneNumber = "6512345678", MerchantAccount = "ADYEN_MERCHANT_ACCOUNT", DeliveryAddress = deliveryAddress, CountryCode = "SG", ShopperEmail = "s.hopper@example.com", BillingAddress = billingAddress, ReturnUrl = "adyencheckout://your.package.name" }; // Send the request var service = new PaymentsService(client); var response = service.Sessions(createCheckoutSessionRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"}); ``` ### Drop-In-Add-Configuration ## Add additional configuration for Atome You do not need to add any configuration parameters for Atome. ### Drop-In-Refunds ## Refunds and cancellations ### Partial refunds To [partially refund](https://docs.adyen.com/online-payments/refund) a payment, specify in your [/payments/{paymentPspReference}/refunds](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/\(paymentPspReference\)/refunds) request: * [amount](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/\(paymentPspReference\)/refunds#request-amount): The amount to be refunded to the shopper. ### Drop-In-Test-And-Go-Live ## Test and go live You can test your Atome integration in two ways: with the Adyen Payment Simulator, or directly with Atome. ### Test with Adyen Use the Adyen Payment Simulator to verify that your Atome integration works correctly with Adyen. You can test during development, before you go live, and after launch. The simulator does not recreate the shopper's journey through the Atome app or website. This testing option is available by default when you add Atome in your test Customer Area. The payment method type is `atome`. To test a redirect payment: 1. Start a payment as usual in your integration. The shopper is redirected to an Adyen-hosted simulator page. 2. Select the payment outcome that you want to test. 3. Wait for the simulator to return the shopper to your website, then complete the payment as usual. For an Advanced flow, make a `/payments/details` request. 4. Confirm that your integration handles the outcome that you selected, and that the payment appears in your [Customer Area](https://ca-test.adyen.com/) > **Payments** > **Payment list**. ### Test directly with an Atome test account To test directly with Atome, you need a test shopper account in the Atome sandbox environment. To request an account, contact your Adyen contact. If you test in multiple countries/regions, use a different test account for each location. To test the QR code flow, download one of the following test apps: #### For Malaysia (MY) * [Android app](https://www.pgyer.com/vBsC) * [iOS app](https://testflight.apple.com/join/SPxKJdnB) #### For Singapore (SG) * [Android app](https://www.pgyer.com/m4OL) * [iOS app](https://testflight.apple.com/join/SPxKJdnB) You can check the status of direct test payments in your [Customer Area](https://ca-test.adyen.com/) > **Payments** > **Payment list**. To accept live Atome payments, you must contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other) to add Atome in your live Customer Area. ## Advanced flow Drop-in ## Requirements | Requirement | Description | | | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | | **Integration type** | Make sure that you have an existing Advanced flow [Android Drop-in integration](https://docs.adyen.com/online-payments/build-your-integration/advanced-flow?platform=Android). | | | **Redirect handling** | Make sure that your existing integration is set up to [handle the redirect](https://docs.adyen.com/online-payments/build-your-integration/advanced-flow/?platform=Android\&integration=Drop-in#handle-the-redirect). `action.type`: **redirect** | | | **Setup steps** | Before you begin, [add Atome in your Customer Area](https://docs.adyen.com/payment-methods/add-payment-methods). | | ### Add Additional Configuration ## Add additional configuration for Atome You do not need to add any configuration parameters for Atome. ### Add Additional Parameters Payments ## Add additional parameters to your /payments request When you [make a payment](https://docs.adyen.com/online-payments/build-your-integration/advanced-flow/?platform=Android\&integration=Drop-in#make-a-payment), add the following parameters: | Parameter | Required | Description | | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [paymentMethod.type](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-paymentMethod) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | **atome** | | [shopperName](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-shopperName) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The shopper's full name. | | [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-") | The shopper's email address. | | [telephoneNumber](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-telephoneNumber) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The shopper's phone number. | | [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 postal address to be included on the invoice. | | [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. | | [deliveryAddress](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-deliveryAddress) | | The postal address where the goods will be shipped. Optional if `billingAddress` and `deliveryAddress` are the same. | | [countryCode](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-countryCode) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | For Malaysia set to **MY**, for Singapore set to **SG**. Make sure that you use a supported combination of country/region and currency: **MY** with **MYR**, and **SG** with **SGD**. | **Example payment request for Atome** #### Latest version ##### curl ```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 '{ "amount":{ "currency":"SGD", "value":1000 }, "paymentMethod":{ "type":"atome" }, "reference":"YOUR_ORDER_NUMBER", "returnUrl":"https://your-company.com/checkout?shopperOrder=12xy..", "merchantAccount":"ADYEN_MERCHANT_ACCOUNT", "shopperName":{ "firstName":"Simon", "lastName":"Hopper" }, "shopperEmail":"s.hopper@example.com", "countryCode":"SG", "telephoneNumber":"6512345678", "billingAddress":{ "city":"Singapore", "country":"SG", "houseNumberOrName":"109", "postalCode":"179097", "stateOrProvince":"Singapore", "street":"North Bridge Road" }, "deliveryAddress":{ "city":"Singapore", "country":"SG", "houseNumberOrName":"109", "postalCode":"179097", "stateOrProvince":"Singapore", "street":"North Bridge Road" }, "lineItems":[ { "description":"Shoes", "quantity":"1", "amountIncludingTax":"400", "amountExcludingTax": "331", "taxAmount": "69", "id":"Item #1" }, { "description":"Socks", "quantity":"2", "amountIncludingTax":"300", "amountExcludingTax": "248", "taxAmount": "52", "id":"Item #2" } ] }' ``` ##### Java ```java // Adyen Java API Library v38.0.0 to latest import com.adyen.Client; import com.adyen.Config; import com.adyen.enums.Environment; import com.adyen.model.*; import com.adyen.service.*; import java.math.*; import com.adyen.model.checkout.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.checkout.*; Config config = new Config() .apiKey("ADYEN_API_KEY") .environment(Environment.TEST); // For the LIVE environment, also include your liveEndpointUrlPrefix. Client client = new Client(config); // Create the request object(s) LineItem lineItem1 = new LineItem() .quantity(1L) .amountExcludingTax(331L) .description("Shoes") .id("Item #1") .amountIncludingTax(400L) .taxAmount(69L); LineItem lineItem2 = new LineItem() .quantity(2L) .amountExcludingTax(248L) .description("Socks") .id("Item #2") .amountIncludingTax(300L) .taxAmount(52L); Amount amount = new Amount() .currency("SGD") .value(1000L); ShopperName shopperName = new ShopperName() .firstName("Simon") .lastName("Hopper"); DeliveryAddress deliveryAddress = new DeliveryAddress() .country("SG") .stateOrProvince("Singapore") .city("Singapore") .houseNumberOrName("109") .street("North Bridge Road") .postalCode("179097"); PaymentDetails paymentDetails = new PaymentDetails() .type(PaymentDetails.TypeEnum.ATOME); BillingAddress billingAddress = new BillingAddress() .country("SG") .stateOrProvince("Singapore") .city("Singapore") .houseNumberOrName("109") .street("North Bridge Road") .postalCode("179097"); PaymentRequest paymentRequest = new PaymentRequest() .reference("YOUR_ORDER_NUMBER") .lineItems(Arrays.asList(lineItem1, lineItem2)) .amount(amount) .shopperName(shopperName) .telephoneNumber("6512345678") .merchantAccount("ADYEN_MERCHANT_ACCOUNT") .deliveryAddress(deliveryAddress) .countryCode("SG") .paymentMethod(new CheckoutPaymentMethod(paymentDetails)) .shopperEmail("s.hopper@example.com") .billingAddress(billingAddress) .returnUrl("https://your-company.com/checkout?shopperOrder=12xy.."); // Send the request PaymentsApi service = new PaymentsApi(client); PaymentResponse response = service.payments(paymentRequest, 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) ->setAmountExcludingTax(331) ->setDescription("Shoes") ->setId("Item #1") ->setAmountIncludingTax(400) ->setTaxAmount(69); $lineItem2 = new LineItem(); $lineItem2 ->setQuantity(2) ->setAmountExcludingTax(248) ->setDescription("Socks") ->setId("Item #2") ->setAmountIncludingTax(300) ->setTaxAmount(52); $amount = new Amount(); $amount ->setCurrency("SGD") ->setValue(1000); $shopperName = new ShopperName(); $shopperName ->setFirstName("Simon") ->setLastName("Hopper"); $deliveryAddress = new DeliveryAddress(); $deliveryAddress ->setCountry("SG") ->setStateOrProvince("Singapore") ->setCity("Singapore") ->setHouseNumberOrName("109") ->setStreet("North Bridge Road") ->setPostalCode("179097"); $checkoutPaymentMethod = new CheckoutPaymentMethod(); $checkoutPaymentMethod ->setType("atome"); $billingAddress = new BillingAddress(); $billingAddress ->setCountry("SG") ->setStateOrProvince("Singapore") ->setCity("Singapore") ->setHouseNumberOrName("109") ->setStreet("North Bridge Road") ->setPostalCode("179097"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setReference("YOUR_ORDER_NUMBER") ->setLineItems(array($lineItem1, $lineItem2)) ->setAmount($amount) ->setShopperName($shopperName) ->setTelephoneNumber("6512345678") ->setMerchantAccount("ADYEN_MERCHANT_ACCOUNT") ->setDeliveryAddress($deliveryAddress) ->setCountryCode("SG") ->setPaymentMethod($checkoutPaymentMethod) ->setShopperEmail("s.hopper@example.com") ->setBillingAddress($billingAddress) ->setReturnUrl("https://your-company.com/checkout?shopperOrder=12xy.."); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->payments($paymentRequest, $requestOptions); ``` ##### C\# ```cs // Adyen .NET API Library v34.0.0 to latest using System; using System.Collections.Generic; using Adyen.Checkout.Extensions; using Adyen.Checkout.Models; using Adyen.Checkout.Services; using Adyen.Core.Client; using Adyen.Core.Client.Extensions; using Adyen.Core.Options; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; var host = Host.CreateDefaultBuilder() .ConfigureCheckout( (context, services, config) => { config.ConfigureAdyenOptions(options => { options.AdyenApiKey = "ADYEN_API_KEY"; options.Environment = AdyenEnvironment.Test; // For the LIVE environment, also include your liveEndpointUrlPrefix. // options.LiveEndpointUrlPrefix = ""; }); services.AddAllCheckoutServices(); }) .Build(); var paymentsService = host.Services.GetRequiredService(); // Create the request object(s) var lineItem1 = new LineItem { Quantity = 1, AmountExcludingTax = 331, Description = "Shoes", Id = "Item #1", AmountIncludingTax = 400, TaxAmount = 69 }; var lineItem2 = new LineItem { Quantity = 2, AmountExcludingTax = 248, Description = "Socks", Id = "Item #2", AmountIncludingTax = 300, TaxAmount = 52 }; var amount = new Amount { Currency = "SGD", Value = 1000 }; var shopperName = new ShopperName { FirstName = "Simon", LastName = "Hopper" }; var deliveryAddress = new DeliveryAddress { Country = "SG", StateOrProvince = "Singapore", City = "Singapore", HouseNumberOrName = "109", Street = "North Bridge Road", PostalCode = "179097" }; var paymentDetails = new PaymentDetails { Type = PaymentDetails.TypeEnum.Atome }; var billingAddress = new BillingAddress { Country = "SG", StateOrProvince = "Singapore", City = "Singapore", HouseNumberOrName = "109", Street = "North Bridge Road", PostalCode = "179097" }; var paymentRequest = new PaymentRequest { Reference = "YOUR_ORDER_NUMBER", LineItems = new List{ lineItem1, lineItem2 }, Amount = amount, ShopperName = shopperName, TelephoneNumber = "6512345678", MerchantAccount = "ADYEN_MERCHANT_ACCOUNT", DeliveryAddress = deliveryAddress, CountryCode = "SG", PaymentMethod = new CheckoutPaymentMethod(paymentDetails), ShopperEmail = "s.hopper@example.com", BillingAddress = billingAddress, ReturnUrl = "https://your-company.com/checkout?shopperOrder=12xy.." }; string idempotencyKey = Guid.NewGuid().ToString(); // Send the request var result = await paymentsService.PaymentsAsync(paymentRequest, new RequestOptions().AddIdempotencyKey(idempotencyKey)); if (result.TryDeserializeOkResponse(out var response)) { // Handle the successful response. } ``` ##### NodeJS (JavaScript) ```js // Adyen Node API Library v30.0.0 to latest const { Client, Config, EnvironmentEnum, 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 lineItem1 = { quantity: 1, amountExcludingTax: 331, description: "Shoes", id: "Item #1", amountIncludingTax: 400, taxAmount: 69 }; const lineItem2 = { quantity: 2, amountExcludingTax: 248, description: "Socks", id: "Item #2", amountIncludingTax: 300, taxAmount: 52 }; const amount = { currency: "SGD", value: 1000 }; const shopperName = { firstName: "Simon", lastName: "Hopper" }; const deliveryAddress = { country: "SG", stateOrProvince: "Singapore", city: "Singapore", houseNumberOrName: "109", street: "North Bridge Road", postalCode: "179097" }; const paymentDetails = { type: "atome" }; const billingAddress = { country: "SG", stateOrProvince: "Singapore", city: "Singapore", houseNumberOrName: "109", street: "North Bridge Road", postalCode: "179097" }; const paymentRequest = { reference: "YOUR_ORDER_NUMBER", lineItems: [lineItem1, lineItem2], amount: amount, shopperName: shopperName, telephoneNumber: "6512345678", merchantAccount: "ADYEN_MERCHANT_ACCOUNT", deliveryAddress: deliveryAddress, countryCode: "SG", paymentMethod: paymentDetails, shopperEmail: "s.hopper@example.com", billingAddress: billingAddress, returnUrl: "https://your-company.com/checkout?shopperOrder=12xy.." }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = await checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` ##### Go ```go // Adyen Go API Library v21.0.0 to latest 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), AmountExcludingTax: common.PtrInt64(331), Description: common.PtrString("Shoes"), Id: common.PtrString("Item #1"), AmountIncludingTax: common.PtrInt64(400), TaxAmount: common.PtrInt64(69), } lineItem2 := checkout.LineItem{ Quantity: common.PtrInt64(2), AmountExcludingTax: common.PtrInt64(248), Description: common.PtrString("Socks"), Id: common.PtrString("Item #2"), AmountIncludingTax: common.PtrInt64(300), TaxAmount: common.PtrInt64(52), } amount := checkout.Amount{ Currency: "SGD", Value: 1000, } shopperName := checkout.ShopperName{ FirstName: "Simon", LastName: "Hopper", } deliveryAddress := checkout.DeliveryAddress{ Country: "SG", StateOrProvince: common.PtrString("Singapore"), City: "Singapore", HouseNumberOrName: "109", Street: "North Bridge Road", PostalCode: "179097", } paymentDetails := checkout.PaymentDetails{ Type: common.PtrString("atome"), } billingAddress := checkout.BillingAddress{ Country: "SG", StateOrProvince: common.PtrString("Singapore"), City: "Singapore", HouseNumberOrName: "109", Street: "North Bridge Road", PostalCode: "179097", } paymentRequest := checkout.PaymentRequest{ Reference: "YOUR_ORDER_NUMBER", LineItems: []checkout.LineItem{ lineItem1, lineItem2, }, Amount: amount, ShopperName: &shopperName, TelephoneNumber: common.PtrString("6512345678"), MerchantAccount: "ADYEN_MERCHANT_ACCOUNT", DeliveryAddress: &deliveryAddress, CountryCode: common.PtrString("SG"), PaymentMethod: checkout.PaymentDetailsAsCheckoutPaymentMethod(&paymentDetails), ShopperEmail: common.PtrString("s.hopper@example.com"), BillingAddress: &billingAddress, ReturnUrl: "https://your-company.com/checkout?shopperOrder=12xy..", } // Send the request service := client.Checkout() req := service.PaymentsApi.PaymentsInput().IdempotencyKey("UUID").PaymentRequest(paymentRequest) res, httpRes, err := service.PaymentsApi.Payments(context.Background(), req) ``` ##### Python ```py # Adyen Python API Library v14.0.0 to latest 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 = { "amount": { "currency": "SGD", "value": 1000 }, "paymentMethod": { "type": "atome" }, "reference": "YOUR_ORDER_NUMBER", "returnUrl": "https://your-company.com/checkout?shopperOrder=12xy..", "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "shopperName": { "firstName": "Simon", "lastName": "Hopper" }, "shopperEmail": "s.hopper@example.com", "countryCode": "SG", "telephoneNumber": "6512345678", "billingAddress": { "city": "Singapore", "country": "SG", "houseNumberOrName": "109", "postalCode": "179097", "stateOrProvince": "Singapore", "street": "North Bridge Road" }, "deliveryAddress": { "city": "Singapore", "country": "SG", "houseNumberOrName": "109", "postalCode": "179097", "stateOrProvince": "Singapore", "street": "North Bridge Road" }, "lineItems": [{ "description": "Shoes", "quantity": "1", "amountIncludingTax": "400", "amountExcludingTax": "331", "taxAmount": "69", "id": "Item #1" }, { "description": "Socks", "quantity": "2", "amountIncludingTax": "300", "amountExcludingTax": "248", "taxAmount": "52", "id": "Item #2" }] } # Send the request result = adyen.checkout.payments_api.payments(request=json_request, idempotency_key="UUID") ``` ##### Ruby ```rb # Adyen Ruby API Library v11.0.0 to latest 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 = { "amount" => { "currency" => "SGD", "value" => 1000 }, "paymentMethod" => { "type" => "atome" }, "reference" => "YOUR_ORDER_NUMBER", "returnUrl" => "https://your-company.com/checkout?shopperOrder=12xy..", "merchantAccount" => "ADYEN_MERCHANT_ACCOUNT", "shopperName" => { "firstName" => "Simon", "lastName" => "Hopper" }, "shopperEmail" => "s.hopper@example.com", "countryCode" => "SG", "telephoneNumber" => "6512345678", "billingAddress" => { "city" => "Singapore", "country" => "SG", "houseNumberOrName" => "109", "postalCode" => "179097", "stateOrProvince" => "Singapore", "street" => "North Bridge Road" }, "deliveryAddress" => { "city" => "Singapore", "country" => "SG", "houseNumberOrName" => "109", "postalCode" => "179097", "stateOrProvince" => "Singapore", "street" => "North Bridge Road" }, "lineItems" => [{ "description" => "Shoes", "quantity" => "1", "amountIncludingTax" => "400", "amountExcludingTax" => "331", "taxAmount" => "69", "id" => "Item #1" }, { "description" => "Socks", "quantity" => "2", "amountIncludingTax" => "300", "amountExcludingTax" => "248", "taxAmount" => "52", "id" => "Item #2" }] } # Send the request result = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` ##### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.0.0 to latest import { Client, Config, EnvironmentEnum, 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) const lineItem1: Types.checkout.LineItem = { quantity: 1, amountExcludingTax: 331, description: "Shoes", id: "Item #1", amountIncludingTax: 400, taxAmount: 69 }; const lineItem2: Types.checkout.LineItem = { quantity: 2, amountExcludingTax: 248, description: "Socks", id: "Item #2", amountIncludingTax: 300, taxAmount: 52 }; const amount: Types.checkout.Amount = { currency: "SGD", value: 1000 }; const shopperName: Types.checkout.ShopperName = { firstName: "Simon", lastName: "Hopper" }; const deliveryAddress: Types.checkout.DeliveryAddress = { country: "SG", stateOrProvince: "Singapore", city: "Singapore", houseNumberOrName: "109", street: "North Bridge Road", postalCode: "179097" }; const paymentDetails: Types.checkout.PaymentDetails = { type: Types.checkout.PaymentDetails.TypeEnum.Atome }; const billingAddress: Types.checkout.BillingAddress = { country: "SG", stateOrProvince: "Singapore", city: "Singapore", houseNumberOrName: "109", street: "North Bridge Road", postalCode: "179097" }; const paymentRequest: Types.checkout.PaymentRequest = { reference: "YOUR_ORDER_NUMBER", lineItems: [lineItem1, lineItem2], amount: amount, shopperName: shopperName, telephoneNumber: "6512345678", merchantAccount: "ADYEN_MERCHANT_ACCOUNT", deliveryAddress: deliveryAddress, countryCode: "SG", paymentMethod: paymentDetails, shopperEmail: "s.hopper@example.com", billingAddress: billingAddress, returnUrl: "https://your-company.com/checkout?shopperOrder=12xy.." }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = await checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` #### Earlier versions ##### curl ```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 '{ "amount":{ "currency":"SGD", "value":1000 }, "paymentMethod":{ "type":"atome" }, "reference":"YOUR_ORDER_NUMBER", "returnUrl":"https://your-company.com/checkout?shopperOrder=12xy..", "merchantAccount":"ADYEN_MERCHANT_ACCOUNT", "shopperName":{ "firstName":"Simon", "lastName":"Hopper" }, "shopperEmail":"s.hopper@example.com", "countryCode":"SG", "telephoneNumber":"6512345678", "billingAddress":{ "city":"Singapore", "country":"SG", "houseNumberOrName":"109", "postalCode":"179097", "stateOrProvince":"Singapore", "street":"North Bridge Road" }, "deliveryAddress":{ "city":"Singapore", "country":"SG", "houseNumberOrName":"109", "postalCode":"179097", "stateOrProvince":"Singapore", "street":"North Bridge Road" }, "lineItems":[ { "description":"Shoes", "quantity":"1", "amountIncludingTax":"400", "amountExcludingTax": "331", "taxAmount": "69", "id":"Item #1" }, { "description":"Socks", "quantity":"2", "amountIncludingTax":"300", "amountExcludingTax": "248", "taxAmount": "52", "id":"Item #2" } ] }' ``` ##### 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) ->setAmountExcludingTax(331) ->setDescription("Shoes") ->setId("Item #1") ->setAmountIncludingTax(400) ->setTaxAmount(69); $lineItem2 = new LineItem(); $lineItem2 ->setQuantity(2) ->setAmountExcludingTax(248) ->setDescription("Socks") ->setId("Item #2") ->setAmountIncludingTax(300) ->setTaxAmount(52); $amount = new Amount(); $amount ->setCurrency("SGD") ->setValue(1000); $shopperName = new ShopperName(); $shopperName ->setFirstName("Simon") ->setLastName("Hopper"); $deliveryAddress = new DeliveryAddress(); $deliveryAddress ->setCountry("SG") ->setStateOrProvince("Singapore") ->setCity("Singapore") ->setHouseNumberOrName("109") ->setStreet("North Bridge Road") ->setPostalCode("179097"); $checkoutPaymentMethod = new CheckoutPaymentMethod(); $checkoutPaymentMethod ->setType("atome"); $billingAddress = new BillingAddress(); $billingAddress ->setCountry("SG") ->setStateOrProvince("Singapore") ->setCity("Singapore") ->setHouseNumberOrName("109") ->setStreet("North Bridge Road") ->setPostalCode("179097"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setReference("YOUR_ORDER_NUMBER") ->setLineItems(array($lineItem1, $lineItem2)) ->setAmount($amount) ->setShopperName($shopperName) ->setTelephoneNumber("6512345678") ->setMerchantAccount("ADYEN_MERCHANT_ACCOUNT") ->setDeliveryAddress($deliveryAddress) ->setCountryCode("SG") ->setPaymentMethod($checkoutPaymentMethod) ->setShopperEmail("s.hopper@example.com") ->setBillingAddress($billingAddress) ->setReturnUrl("https://your-company.com/checkout?shopperOrder=12xy.."); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->payments($paymentRequest, $requestOptions); ``` ##### C\# ```cs // Adyen .NET API Library v33.0.0 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, AmountExcludingTax = 331, Description = "Shoes", Id = "Item #1", AmountIncludingTax = 400, TaxAmount = 69 }; LineItem lineItem2 = new LineItem { Quantity = 2, AmountExcludingTax = 248, Description = "Socks", Id = "Item #2", AmountIncludingTax = 300, TaxAmount = 52 }; Amount amount = new Amount { Currency = "SGD", Value = 1000 }; ShopperName shopperName = new ShopperName { FirstName = "Simon", LastName = "Hopper" }; DeliveryAddress deliveryAddress = new DeliveryAddress { Country = "SG", StateOrProvince = "Singapore", City = "Singapore", HouseNumberOrName = "109", Street = "North Bridge Road", PostalCode = "179097" }; PaymentDetails paymentDetails = new PaymentDetails { Type = PaymentDetails.TypeEnum.Atome }; BillingAddress billingAddress = new BillingAddress { Country = "SG", StateOrProvince = "Singapore", City = "Singapore", HouseNumberOrName = "109", Street = "North Bridge Road", PostalCode = "179097" }; PaymentRequest paymentRequest = new PaymentRequest { Reference = "YOUR_ORDER_NUMBER", LineItems = new List{ lineItem1, lineItem2 }, Amount = amount, ShopperName = shopperName, TelephoneNumber = "6512345678", MerchantAccount = "ADYEN_MERCHANT_ACCOUNT", DeliveryAddress = deliveryAddress, CountryCode = "SG", PaymentMethod = new CheckoutPaymentMethod(paymentDetails), ShopperEmail = "s.hopper@example.com", BillingAddress = billingAddress, ReturnUrl = "https://your-company.com/checkout?shopperOrder=12xy.." }; // Send the request var service = new PaymentsService(client); var response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"}); ``` **Example response for a successful payment** ```json { "resultCode":"RedirectShopper", "action":{ "paymentMethodType":"atome", "method":"GET", "url":"https://checkoutshopper-test.adyen.com/checkoutshopper/checkoutPaymentRedirect?redirectData=...", "type":"redirect" } } ``` ### Refunds ## Refunds and cancellations ### Partial refunds To [partially refund](https://docs.adyen.com/online-payments/refund) a payment, specify in your [/payments/{paymentPspReference}/refunds](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/\(paymentPspReference\)/refunds) request: * [amount](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/\(paymentPspReference\)/refunds#request-amount): The amount to be refunded to the shopper. ## Test and go live You can test your Atome integration in two ways: with the Adyen Payment Simulator, or directly with Atome. ### Test with Adyen Use the Adyen Payment Simulator to verify that your Atome integration works correctly with Adyen. You can test during development, before you go live, and after launch. The simulator does not recreate the shopper's journey through the Atome app or website. This testing option is available by default when you add Atome in your test Customer Area. The payment method type is `atome`. To test a redirect payment: 1. Start a payment as usual in your integration. The shopper is redirected to an Adyen-hosted simulator page. 2. Select the payment outcome that you want to test. 3. Wait for the simulator to return the shopper to your website, then complete the payment as usual. For an Advanced flow, make a `/payments/details` request. 4. Confirm that your integration handles the outcome that you selected, and that the payment appears in your [Customer Area](https://ca-test.adyen.com/) > **Payments** > **Payment list**. ### Test directly with an Atome test account To test directly with Atome, you need a test shopper account in the Atome sandbox environment. To request an account, contact your Adyen contact. If you test in multiple countries/regions, use a different test account for each location. To test the QR code flow, download one of the following test apps: #### For Malaysia (MY) * [Android app](https://www.pgyer.com/vBsC) * [iOS app](https://testflight.apple.com/join/SPxKJdnB) #### For Singapore (SG) * [Android app](https://www.pgyer.com/m4OL) * [iOS app](https://testflight.apple.com/join/SPxKJdnB) You can check the status of direct test payments in your [Customer Area](https://ca-test.adyen.com/) > **Payments** > **Payment list**. To accept live Atome payments, you must contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other) to add Atome in your live Customer Area.