--- title: "Zip Drop-in integration" description: "Learn how to accept Zip payments." url: "https://docs.adyen.com/payment-methods/zip/web-drop-in" source_url: "https://docs.adyen.com/payment-methods/zip/web-drop-in.md" canonical: "https://docs.adyen.com/payment-methods/zip/web-drop-in" last_modified: "2026-10-09T12:57:19+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. # Zip Drop-in integration Learn how to accept Zip payments. This page explains how to add Zip to your existing Web Drop-in integration. ## Requirements | Requirement | Description | | -------------------- | --------------------------------------------------------------------------------------------------------------------------- | | **Integration type** | Make sure that you have built your [Web Drop-in integration](https://docs.adyen.com/online-payments/build-your-integration). | | **Setup steps** | Before you begin, [add Zip in your test Customer Area](https://docs.adyen.com/payment-methods/add-payment-methods). | ## API reference Select which endpoint you are using: ### Tab: `/sessions` This is the default with [Drop-in v5.0.0](https://docs.adyen.com/online-payments/build-your-integration/sessions-flow?platform=Web\&integration=Drop-in) or later. | Parameter name | Required | Description | | ------------------------------------------------------------------------------------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [shopperName](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-shopperName) | | Shopper's first name and last name. | | [shopperEmail](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-shopperEmail) | | The shopper's email address. | | [dateOfBirth](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-dateOfBirth) | | The shopper's date of birth. | | [telephoneNumber](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-telephoneNumber) | | The shopper's phone number. | | [billingAddress](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-billingAddress) | | The address where the invoice should be sent. | | [deliveryAddress](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-deliveryAddress) | | The address where the purchased goods should be delivered. | | [lineItems](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-lineItems) | | Price and product information about the purchased items. You can optionally specify an `imageURL` to have the picture of the item on the Zip product page. The shopper will see this image when they log in to their Zip account. The URL can have a maximum of 500 characters. | **Zip payment request** #### curl ```bash curl https://checkout-test.adyen.com/v71/sessions \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -d '{ "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "reference": "YOUR_ORDER_REFERENCE", "amount": { "currency": "AUD", "value": 1000 }, "shopperName": { "firstName": "Simon", "lastName": "Hopper" }, "shopperEmail": "shopper@email.com", "dateOfBirth": "1981-01-13", "telephoneNumber": "+61121212121", "billingAddress":{ "city":"Sydney", "country":"AU", "houseNumberOrName":"123", "postalCode":"2000", "stateOrProvince":"NSW", "street":"Happy Street" }, "deliveryAddress":{ "city":"Sydney", "country":"AU", "houseNumberOrName":"123", "postalCode":"2000", "stateOrProvince":"NSW", "street":"Happy Street" }, "lineItems":[ { "description":"Shoes", "quantity":"1", "amountIncludingTax":"400", "id":"Item #1" }, { "description":"Socks", "quantity":"2", "amountIncludingTax":"300", "id":"Item #2" } ], "returnUrl": "https://your-company.example.com/checkout?shopperOrder=12xy..", "countryCode":"AU" }' ``` #### 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) .description("Shoes") .id("Item #1") .amountIncludingTax(400L); LineItem lineItem2 = new LineItem() .quantity(2L) .description("Socks") .id("Item #2") .amountIncludingTax(300L); Amount amount = new Amount() .currency("AUD") .value(1000L); ShopperName shopperName = new ShopperName() .firstName("Simon") .lastName("Hopper"); DeliveryAddress deliveryAddress = new DeliveryAddress() .country("AU") .stateOrProvince("NSW") .city("Sydney") .houseNumberOrName("123") .street("Happy Street") .postalCode("2000"); BillingAddress billingAddress = new BillingAddress() .country("AU") .stateOrProvince("NSW") .city("Sydney") .houseNumberOrName("123") .street("Happy Street") .postalCode("2000"); CreateCheckoutSessionRequest createCheckoutSessionRequest = new CreateCheckoutSessionRequest() .reference("YOUR_ORDER_REFERENCE") .lineItems(Arrays.asList(lineItem1, lineItem2)) .amount(amount) .shopperName(shopperName) .telephoneNumber("+61121212121") .merchantAccount("YOUR_MERCHANT_ACCOUNT") .deliveryAddress(deliveryAddress) .countryCode("AU") .shopperEmail("shopper@email.com") .billingAddress(billingAddress) .returnUrl("String"); // 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) ->setDescription("Shoes") ->setId("Item #1") ->setAmountIncludingTax(400); $lineItem2 = new LineItem(); $lineItem2 ->setQuantity(2) ->setDescription("Socks") ->setId("Item #2") ->setAmountIncludingTax(300); $amount = new Amount(); $amount ->setCurrency("AUD") ->setValue(1000); $shopperName = new ShopperName(); $shopperName ->setFirstName("Simon") ->setLastName("Hopper"); $deliveryAddress = new DeliveryAddress(); $deliveryAddress ->setCountry("AU") ->setStateOrProvince("NSW") ->setCity("Sydney") ->setHouseNumberOrName("123") ->setStreet("Happy Street") ->setPostalCode("2000"); $billingAddress = new BillingAddress(); $billingAddress ->setCountry("AU") ->setStateOrProvince("NSW") ->setCity("Sydney") ->setHouseNumberOrName("123") ->setStreet("Happy Street") ->setPostalCode("2000"); $createCheckoutSessionRequest = new CreateCheckoutSessionRequest(); $createCheckoutSessionRequest ->setReference("YOUR_ORDER_REFERENCE") ->setLineItems(array($lineItem1, $lineItem2)) ->setAmount($amount) ->setShopperName($shopperName) ->setTelephoneNumber("+61121212121") ->setMerchantAccount("YOUR_MERCHANT_ACCOUNT") ->setDeliveryAddress($deliveryAddress) ->setCountryCode("AU") ->setShopperEmail("shopper@email.com") ->setBillingAddress($billingAddress) ->setReturnUrl("https://your-company.example.com/checkout?shopperOrder=12xy.."); $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, Description = "Shoes", Id = "Item #1", AmountIncludingTax = 400 }; var lineItem2 = new LineItem { Quantity = 2, Description = "Socks", Id = "Item #2", AmountIncludingTax = 300 }; var amount = new Amount { Currency = "AUD", Value = 1000 }; var shopperName = new ShopperName { FirstName = "Simon", LastName = "Hopper" }; var deliveryAddress = new DeliveryAddress { Country = "AU", StateOrProvince = "NSW", City = "Sydney", HouseNumberOrName = "123", Street = "Happy Street", PostalCode = "2000" }; var billingAddress = new BillingAddress { Country = "AU", StateOrProvince = "NSW", City = "Sydney", HouseNumberOrName = "123", Street = "Happy Street", PostalCode = "2000" }; var createCheckoutSessionRequest = new CreateCheckoutSessionRequest { Reference = "YOUR_ORDER_REFERENCE", LineItems = new List{ lineItem1, lineItem2 }, Amount = amount, ShopperName = shopperName, TelephoneNumber = "+61121212121", MerchantAccount = "YOUR_MERCHANT_ACCOUNT", DeliveryAddress = deliveryAddress, CountryCode = "AU", ShopperEmail = "shopper@email.com", BillingAddress = billingAddress, ReturnUrl = "https://your-company.example.com/checkout?shopperOrder=12xy.." }; 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, description: "Shoes", id: "Item #1", amountIncludingTax: 400 }; const lineItem2 = { quantity: 2, description: "Socks", id: "Item #2", amountIncludingTax: 300 }; const amount = { currency: "AUD", value: 1000 }; const shopperName = { firstName: "Simon", lastName: "Hopper" }; const deliveryAddress = { country: "AU", stateOrProvince: "NSW", city: "Sydney", houseNumberOrName: "123", street: "Happy Street", postalCode: "2000" }; const billingAddress = { country: "AU", stateOrProvince: "NSW", city: "Sydney", houseNumberOrName: "123", street: "Happy Street", postalCode: "2000" }; const createCheckoutSessionRequest = { reference: "YOUR_ORDER_REFERENCE", lineItems: [lineItem1, lineItem2], amount: amount, shopperName: shopperName, telephoneNumber: "+61121212121", merchantAccount: "YOUR_MERCHANT_ACCOUNT", deliveryAddress: deliveryAddress, countryCode: "AU", shopperEmail: "shopper@email.com", billingAddress: billingAddress, returnUrl: "https://your-company.example.com/checkout?shopperOrder=12xy.." }; // 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), Description: common.PtrString("Shoes"), Id: common.PtrString("Item #1"), AmountIncludingTax: common.PtrInt64(400), } lineItem2 := checkout.LineItem{ Quantity: common.PtrInt64(2), Description: common.PtrString("Socks"), Id: common.PtrString("Item #2"), AmountIncludingTax: common.PtrInt64(300), } amount := checkout.Amount{ Currency: "AUD", Value: 1000, } shopperName := checkout.ShopperName{ FirstName: "Simon", LastName: "Hopper", } deliveryAddress := checkout.DeliveryAddress{ Country: "AU", StateOrProvince: common.PtrString("NSW"), City: "Sydney", HouseNumberOrName: "123", Street: "Happy Street", PostalCode: "2000", } billingAddress := checkout.BillingAddress{ Country: "AU", StateOrProvince: common.PtrString("NSW"), City: "Sydney", HouseNumberOrName: "123", Street: "Happy Street", PostalCode: "2000", } createCheckoutSessionRequest := checkout.CreateCheckoutSessionRequest{ Reference: "YOUR_ORDER_REFERENCE", LineItems: []checkout.LineItem{ lineItem1, lineItem2, }, Amount: amount, ShopperName: &shopperName, TelephoneNumber: common.PtrString("+61121212121"), MerchantAccount: "YOUR_MERCHANT_ACCOUNT", DeliveryAddress: &deliveryAddress, CountryCode: common.PtrString("AU"), ShopperEmail: common.PtrString("shopper@email.com"), BillingAddress: &billingAddress, ReturnUrl: "https://your-company.example.com/checkout?shopperOrder=12xy..", } // 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": "YOUR_MERCHANT_ACCOUNT", "reference": "YOUR_ORDER_REFERENCE", "amount": { "currency": "AUD", "value": 1000 }, "shopperName": { "firstName": "Simon", "lastName": "Hopper" }, "shopperEmail": "shopper@email.com", "dateOfBirth": "1981-01-13", "telephoneNumber": "+61121212121", "billingAddress": { "city": "Sydney", "country": "AU", "houseNumberOrName": "123", "postalCode": "2000", "stateOrProvince": "NSW", "street": "Happy Street" }, "deliveryAddress": { "city": "Sydney", "country": "AU", "houseNumberOrName": "123", "postalCode": "2000", "stateOrProvince": "NSW", "street": "Happy Street" }, "lineItems": [{ "description": "Shoes", "quantity": "1", "amountIncludingTax": "400", "id": "Item #1" }, { "description": "Socks", "quantity": "2", "amountIncludingTax": "300", "id": "Item #2" }], "returnUrl": "https://your-company.example.com/checkout?shopperOrder=12xy..", "countryCode": "AU" } # 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" => "YOUR_MERCHANT_ACCOUNT", "reference" => "YOUR_ORDER_REFERENCE", "amount" => { "currency" => "AUD", "value" => 1000 }, "shopperName" => { "firstName" => "Simon", "lastName" => "Hopper" }, "shopperEmail" => "shopper@email.com", "dateOfBirth" => "1981-01-13", "telephoneNumber" => "+61121212121", "billingAddress" => { "city" => "Sydney", "country" => "AU", "houseNumberOrName" => "123", "postalCode" => "2000", "stateOrProvince" => "NSW", "street" => "Happy Street" }, "deliveryAddress" => { "city" => "Sydney", "country" => "AU", "houseNumberOrName" => "123", "postalCode" => "2000", "stateOrProvince" => "NSW", "street" => "Happy Street" }, "lineItems" => [{ "description" => "Shoes", "quantity" => "1", "amountIncludingTax" => "400", "id" => "Item #1" }, { "description" => "Socks", "quantity" => "2", "amountIncludingTax" => "300", "id" => "Item #2" }], "returnUrl" => "https://your-company.example.com/checkout?shopperOrder=12xy..", "countryCode" => "AU" } # 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, description: "Shoes", id: "Item #1", amountIncludingTax: 400 }; const lineItem2: Types.checkout.LineItem = { quantity: 2, description: "Socks", id: "Item #2", amountIncludingTax: 300 }; const amount: Types.checkout.Amount = { currency: "AUD", value: 1000 }; const shopperName: Types.checkout.ShopperName = { firstName: "Simon", lastName: "Hopper" }; const deliveryAddress: Types.checkout.DeliveryAddress = { country: "AU", stateOrProvince: "NSW", city: "Sydney", houseNumberOrName: "123", street: "Happy Street", postalCode: "2000" }; const billingAddress: Types.checkout.BillingAddress = { country: "AU", stateOrProvince: "NSW", city: "Sydney", houseNumberOrName: "123", street: "Happy Street", postalCode: "2000" }; const createCheckoutSessionRequest: Types.checkout.CreateCheckoutSessionRequest = { reference: "YOUR_ORDER_REFERENCE", lineItems: [lineItem1, lineItem2], amount: amount, shopperName: shopperName, telephoneNumber: "+61121212121", merchantAccount: "YOUR_MERCHANT_ACCOUNT", deliveryAddress: deliveryAddress, countryCode: "AU", shopperEmail: "shopper@email.com", billingAddress: billingAddress, returnUrl: "https://your-company.example.com/checkout?shopperOrder=12xy.." }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = await checkoutAPI.PaymentsApi.sessions(createCheckoutSessionRequest, { idempotencyKey: "UUID" }); ``` ### Tab: `/payments` If you implemented an [additional use case](https://docs.adyen.com/online-payments/build-your-integration). | Parameter name | Required | Description | | --------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [shopperName](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-shopperName) | | Shopper's first name and last name. | | [shopperEmail](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-shopperEmail) | | The shopper's email address. | | [dateOfBirth](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-dateOfBirth) | | The shopper's date of birth. | | [telephoneNumber](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-telephoneNumber) | | The shopper's phone number. | | [paymentMethod.clickAndCollect](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-paymentMethod-ZipDetails-clickAndCollect) | | Set this to **true** if the shopper wants to pick up and collect their order, instead of having the goods delivered to them. | | [billingAddress](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-billingAddress) | | The address where to send the invoice. | | [deliveryAddress](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-deliveryAddress) | | The address where the purchased goods should be delivered. | | [lineItems](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-lineItems) | | Price and product information about the purchased items. You can optionally specify an `imageURL` to have the picture of the item on the Zip product page. The shopper will see this image when they log in to their Zip account. The URL can have a maximum of 500 characters. | **Zip payment request** #### curl ```bash curl https://checkout-test.adyen.com/v72/payments \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -d '{ "merchantAccount":"ADYEN_MERCHANT_ACCOUNT", "reference":"YOUR_ORDER_NUMBER", "amount":{ "currency":"AUD", "value":1000 }, "paymentMethod":{ "type":"zip", {hint:If the shopper will pick up their order}"clickAndCollect": true{/hint} }, "shopperName":{ "firstName":"Happy", "lastName":"Testing" }, "shopperEmail":"shopper@email.com", "dateOfBirth": "1981-01-13", "telephoneNumber":"+85121212121", "billingAddress":{ "city":"Sydney", "country":"AU", "houseNumberOrName":"123", "postalCode":"2000", "stateOrProvince":"NSW", "street":"Happy Street" }, "deliveryAddress":{ "city":"Sydney", "country":"AU", "houseNumberOrName":"123", "postalCode":"2000", "stateOrProvince":"NSW", "street":"Happy Street" }, "lineItems":[ { "description":"Shoes", "quantity":"1", "amountIncludingTax":"400", "id":"Item #1" }, { "description":"Socks", "quantity":"2", "amountIncludingTax":"300", "id":"Item #2" } ], "returnUrl":"https://your-company.example.com/checkout?shopperOrder=12xy..", "countryCode":"AU" }' ``` #### 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) Amount amount = new Amount() .currency("AUD") .value(1000L); LineItem lineItem1 = new LineItem() .quantity(1L) .description("Shoes") .id("Item #1") .amountIncludingTax(400L); LineItem lineItem2 = new LineItem() .quantity(2L) .description("Socks") .id("Item #2") .amountIncludingTax(300L); ShopperName shopperName = new ShopperName() .firstName("Happy") .lastName("Testing"); DeliveryAddress deliveryAddress = new DeliveryAddress() .country("AU") .stateOrProvince("NSW") .city("Sydney") .houseNumberOrName("123") .street("Happy Street") .postalCode("2000"); ZipDetails zipDetails = new ZipDetails() .type(ZipDetails.TypeEnum.ZIP) .clickAndCollect("true"); BillingAddress billingAddress = new BillingAddress() .country("AU") .stateOrProvince("NSW") .city("Sydney") .houseNumberOrName("123") .street("Happy Street") .postalCode("2000"); PaymentRequest paymentRequest = new PaymentRequest() .amount(amount) .telephoneNumber("+85121212121") .shopperEmail("shopper@email.com") .dateOfBirth(OffsetDateTime.parse("1981-01-13T00:00:00Z")) .reference("YOUR_ORDER_NUMBER") .lineItems(Arrays.asList(lineItem1, lineItem2)) .shopperName(shopperName) .merchantAccount("ADYEN_MERCHANT_ACCOUNT") .deliveryAddress(deliveryAddress) .countryCode("AU") .paymentMethod(new CheckoutPaymentMethod(zipDetails)) .billingAddress(billingAddress) .returnUrl("String"); // 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) $amount = new Amount(); $amount ->setCurrency("AUD") ->setValue(1000); $lineItem1 = new LineItem(); $lineItem1 ->setQuantity(1) ->setDescription("Shoes") ->setId("Item #1") ->setAmountIncludingTax(400); $lineItem2 = new LineItem(); $lineItem2 ->setQuantity(2) ->setDescription("Socks") ->setId("Item #2") ->setAmountIncludingTax(300); $shopperName = new ShopperName(); $shopperName ->setFirstName("Happy") ->setLastName("Testing"); $deliveryAddress = new DeliveryAddress(); $deliveryAddress ->setCountry("AU") ->setStateOrProvince("NSW") ->setCity("Sydney") ->setHouseNumberOrName("123") ->setStreet("Happy Street") ->setPostalCode("2000"); $checkoutPaymentMethod = new CheckoutPaymentMethod(); $checkoutPaymentMethod ->setType("zip") ->setClickAndCollect("true"); $billingAddress = new BillingAddress(); $billingAddress ->setCountry("AU") ->setStateOrProvince("NSW") ->setCity("Sydney") ->setHouseNumberOrName("123") ->setStreet("Happy Street") ->setPostalCode("2000"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setAmount($amount) ->setTelephoneNumber("+85121212121") ->setShopperEmail("shopper@email.com") ->setDateOfBirth("1981-01-13") ->setReference("YOUR_ORDER_NUMBER") ->setLineItems(array($lineItem1, $lineItem2)) ->setShopperName($shopperName) ->setMerchantAccount("ADYEN_MERCHANT_ACCOUNT") ->setDeliveryAddress($deliveryAddress) ->setCountryCode("AU") ->setPaymentMethod($checkoutPaymentMethod) ->setBillingAddress($billingAddress) ->setReturnUrl("https://your-company.example.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 amount = new Amount { Currency = "AUD", Value = 1000 }; var lineItem1 = new LineItem { Quantity = 1, Description = "Shoes", Id = "Item #1", AmountIncludingTax = 400 }; var lineItem2 = new LineItem { Quantity = 2, Description = "Socks", Id = "Item #2", AmountIncludingTax = 300 }; var shopperName = new ShopperName { FirstName = "Happy", LastName = "Testing" }; var deliveryAddress = new DeliveryAddress { Country = "AU", StateOrProvince = "NSW", City = "Sydney", HouseNumberOrName = "123", Street = "Happy Street", PostalCode = "2000" }; var zipDetails = new ZipDetails { Type = ZipDetails.TypeEnum.Zip, ClickAndCollect = "true" }; var billingAddress = new BillingAddress { Country = "AU", StateOrProvince = "NSW", City = "Sydney", HouseNumberOrName = "123", Street = "Happy Street", PostalCode = "2000" }; var paymentRequest = new PaymentRequest { Amount = amount, TelephoneNumber = "+85121212121", ShopperEmail = "shopper@email.com", DateOfBirth = DateTime.Parse("1981-01-13"), Reference = "YOUR_ORDER_NUMBER", LineItems = new List{ lineItem1, lineItem2 }, ShopperName = shopperName, MerchantAccount = "ADYEN_MERCHANT_ACCOUNT", DeliveryAddress = deliveryAddress, CountryCode = "AU", PaymentMethod = new CheckoutPaymentMethod(zipDetails), BillingAddress = billingAddress, ReturnUrl = "https://your-company.example.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 amount = { currency: "AUD", value: 1000 }; const lineItem1 = { quantity: 1, description: "Shoes", id: "Item #1", amountIncludingTax: 400 }; const lineItem2 = { quantity: 2, description: "Socks", id: "Item #2", amountIncludingTax: 300 }; const shopperName = { firstName: "Happy", lastName: "Testing" }; const deliveryAddress = { country: "AU", stateOrProvince: "NSW", city: "Sydney", houseNumberOrName: "123", street: "Happy Street", postalCode: "2000" }; const zipDetails = { type: "zip", clickAndCollect: "true" }; const billingAddress = { country: "AU", stateOrProvince: "NSW", city: "Sydney", houseNumberOrName: "123", street: "Happy Street", postalCode: "2000" }; const paymentRequest = { amount: amount, telephoneNumber: "+85121212121", shopperEmail: "shopper@email.com", dateOfBirth: new Date("1981-01-13"), reference: "YOUR_ORDER_NUMBER", lineItems: [lineItem1, lineItem2], shopperName: shopperName, merchantAccount: "ADYEN_MERCHANT_ACCOUNT", deliveryAddress: deliveryAddress, countryCode: "AU", paymentMethod: zipDetails, billingAddress: billingAddress, returnUrl: "https://your-company.example.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" "time" "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) amount := checkout.Amount{ Currency: "AUD", Value: 1000, } lineItem1 := checkout.LineItem{ Quantity: common.PtrInt64(1), Description: common.PtrString("Shoes"), Id: common.PtrString("Item #1"), AmountIncludingTax: common.PtrInt64(400), } lineItem2 := checkout.LineItem{ Quantity: common.PtrInt64(2), Description: common.PtrString("Socks"), Id: common.PtrString("Item #2"), AmountIncludingTax: common.PtrInt64(300), } shopperName := checkout.ShopperName{ FirstName: "Happy", LastName: "Testing", } deliveryAddress := checkout.DeliveryAddress{ Country: "AU", StateOrProvince: common.PtrString("NSW"), City: "Sydney", HouseNumberOrName: "123", Street: "Happy Street", PostalCode: "2000", } zipDetails := checkout.ZipDetails{ Type: common.PtrString("zip"), ClickAndCollect: common.PtrString("true"), } billingAddress := checkout.BillingAddress{ Country: "AU", StateOrProvince: common.PtrString("NSW"), City: "Sydney", HouseNumberOrName: "123", Street: "Happy Street", PostalCode: "2000", } paymentRequest := checkout.PaymentRequest{ Amount: amount, TelephoneNumber: common.PtrString("+85121212121"), ShopperEmail: common.PtrString("shopper@email.com"), DateOfBirth: func() *time.Time { t, _ := time.Parse(time.RFC3339, "1981-01-13"); return &t }(), Reference: "YOUR_ORDER_NUMBER", LineItems: []checkout.LineItem{ lineItem1, lineItem2, }, ShopperName: &shopperName, MerchantAccount: "ADYEN_MERCHANT_ACCOUNT", DeliveryAddress: &deliveryAddress, CountryCode: common.PtrString("AU"), PaymentMethod: checkout.ZipDetailsAsCheckoutPaymentMethod(&zipDetails), BillingAddress: &billingAddress, ReturnUrl: "https://your-company.example.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 = { "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "reference": "YOUR_ORDER_NUMBER", "amount": { "currency": "AUD", "value": 1000 }, "paymentMethod": { "type": "zip", "clickAndCollect": True }, "shopperName": { "firstName": "Happy", "lastName": "Testing" }, "shopperEmail": "shopper@email.com", "dateOfBirth": "1981-01-13", "telephoneNumber": "+85121212121", "billingAddress": { "city": "Sydney", "country": "AU", "houseNumberOrName": "123", "postalCode": "2000", "stateOrProvince": "NSW", "street": "Happy Street" }, "deliveryAddress": { "city": "Sydney", "country": "AU", "houseNumberOrName": "123", "postalCode": "2000", "stateOrProvince": "NSW", "street": "Happy Street" }, "lineItems": [{ "description": "Shoes", "quantity": "1", "amountIncludingTax": "400", "id": "Item #1" }, { "description": "Socks", "quantity": "2", "amountIncludingTax": "300", "id": "Item #2" }], "returnUrl": "https://your-company.example.com/checkout?shopperOrder=12xy..", "countryCode": "AU" } # 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 = { "merchantAccount" => "ADYEN_MERCHANT_ACCOUNT", "reference" => "YOUR_ORDER_NUMBER", "amount" => { "currency" => "AUD", "value" => 1000 }, "paymentMethod" => { "type" => "zip", "clickAndCollect" => true }, "shopperName" => { "firstName" => "Happy", "lastName" => "Testing" }, "shopperEmail" => "shopper@email.com", "dateOfBirth" => "1981-01-13", "telephoneNumber" => "+85121212121", "billingAddress" => { "city" => "Sydney", "country" => "AU", "houseNumberOrName" => "123", "postalCode" => "2000", "stateOrProvince" => "NSW", "street" => "Happy Street" }, "deliveryAddress" => { "city" => "Sydney", "country" => "AU", "houseNumberOrName" => "123", "postalCode" => "2000", "stateOrProvince" => "NSW", "street" => "Happy Street" }, "lineItems" => [{ "description" => "Shoes", "quantity" => "1", "amountIncludingTax" => "400", "id" => "Item #1" }, { "description" => "Socks", "quantity" => "2", "amountIncludingTax" => "300", "id" => "Item #2" }], "returnUrl" => "https://your-company.example.com/checkout?shopperOrder=12xy..", "countryCode" => "AU" } # 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 amount: Types.checkout.Amount = { currency: "AUD", value: 1000 }; const lineItem1: Types.checkout.LineItem = { quantity: 1, description: "Shoes", id: "Item #1", amountIncludingTax: 400 }; const lineItem2: Types.checkout.LineItem = { quantity: 2, description: "Socks", id: "Item #2", amountIncludingTax: 300 }; const shopperName: Types.checkout.ShopperName = { firstName: "Happy", lastName: "Testing" }; const deliveryAddress: Types.checkout.DeliveryAddress = { country: "AU", stateOrProvince: "NSW", city: "Sydney", houseNumberOrName: "123", street: "Happy Street", postalCode: "2000" }; const zipDetails: Types.checkout.ZipDetails = { type: Types.checkout.ZipDetails.TypeEnum.Zip, clickAndCollect: "true" }; const billingAddress: Types.checkout.BillingAddress = { country: "AU", stateOrProvince: "NSW", city: "Sydney", houseNumberOrName: "123", street: "Happy Street", postalCode: "2000" }; const paymentRequest: Types.checkout.PaymentRequest = { amount: amount, telephoneNumber: "+85121212121", shopperEmail: "shopper@email.com", dateOfBirth: new Date("1981-01-13"), reference: "YOUR_ORDER_NUMBER", lineItems: [lineItem1, lineItem2], shopperName: shopperName, merchantAccount: "ADYEN_MERCHANT_ACCOUNT", deliveryAddress: deliveryAddress, countryCode: "AU", paymentMethod: zipDetails, billingAddress: billingAddress, returnUrl: "https://your-company.example.com/checkout?shopperOrder=12xy.." }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = await checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` In the [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) response, check the `action` object for the information that you must use to redirect the shopper. **/payments response** ```json { "resultCode":"RedirectShopper", "action":{ "paymentMethodType":"zip", "method":"GET", "url":"https://checkoutshopper-test.adyen.com/checkoutshopper/checkoutPaymentRedirect?redirectData=...", "type":"redirect" } } ``` ## Drop-in configuration There are no configuration steps specific to Zip required for Drop-in. ## Recurring payments We support recurring transactions for Zip. To make recurring payments, you need to: 1. [Create a shopper token](https://docs.adyen.com/payment-methods/zip/web-drop-in#create-a-token). 2. [Use the token to make future payments for the shopper](https://docs.adyen.com/payment-methods/zip/web-drop-in#make-payment-with-token). ### Create a token To create a token, include in your [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request: * `storePaymentMethod`: **true** * [shopperReference](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-shopperReference): Your unique identifier for the shopper. When the payment has been settled, you receive a [recurring.token.created](https://docs.adyen.com/api-explorer/Tokenization-webhooks/latest/post/recurring.token.created) [webhook](https://docs.adyen.com/development-resources/webhooks) containing: * `type`: **recurring.token.created** * `shopperReference`: Your unique identifier for the shopper. * `eventId`: The `pspReference` of the initial payment. * `storedPaymentMethodId`: The token that you need to make recurring payments for this shopper. Make sure that your server is able to receive the [Recurring tokens life cycle events](https://docs.adyen.com/development-resources/webhooks/webhook-types/#other-webhooks?target=_blank) webhook. You can [set up this webhook in your Customer Area](https://docs.adyen.com/development-resources/webhooks/#set-up-webhooks-in-your-customer-area?target=_blank). ### Make a payment with a token To make a payment with the token, include in your [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request: * `paymentMethod.storedPaymentMethodId`: The `storedPaymentMethodId` from the [recurring.token.created](https://docs.adyen.com/api-explorer/Tokenization-webhooks/latest/post/recurring.token.created) webhook.\ You can also get this value using the [/listRecurringDetails](https://docs.adyen.com/api-explorer/Recurring/latest/post/listRecurringDetails) endpoint. * `shopperReference`: The unique shopper identifier that you specified when creating the token. * `shopperInteraction`: **ContAuth**. * `recurringProcessingModel`: **Subscription** or **UnscheduledCardOnFile**. For more information about the `shopperInteraction` and `recurringProcessingModel` fields, refer to [Tokenization](https://docs.adyen.com/online-payments/tokenization). #### curl ```bash curl https://checkout-test.adyen.com/v72/payments \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -d '{ "amount":{ "value":1000, "currency":"AUD" }, "paymentMethod":{ "type":"zip", "storedPaymentMethodId":"7219687191761347" }, "reference":"YOUR_ORDER_NUMBER", "merchantAccount":"YOUR_MERCHANT_ACCOUNT", "shopperReference":"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j", "shopperInteraction":"ContAuth", "recurringProcessingModel": "Subscription" }' ``` #### 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) Amount amount = new Amount() .currency("String") .value(1000L); AchDetails achDetails = new AchDetails() .storedPaymentMethodId("7219687191761347") .type(AchDetails.TypeEnum.ACH); PaymentRequest paymentRequest = new PaymentRequest() .reference("YOUR_ORDER_NUMBER") .amount(amount) .merchantAccount("YOUR_MERCHANT_ACCOUNT") .recurringProcessingModel(PaymentRequest.RecurringProcessingModelEnum.SUBSCRIPTION) .paymentMethod(new CheckoutPaymentMethod(achDetails)) .shopperInteraction(PaymentRequest.ShopperInteractionEnum.CONTAUTH) .shopperReference("YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j"); // 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) $amount = new Amount(); $amount ->setCurrency("AUD") ->setValue(1000); $checkoutPaymentMethod = new CheckoutPaymentMethod(); $checkoutPaymentMethod ->setStoredPaymentMethodId("7219687191761347") ->setType("zip"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setReference("YOUR_ORDER_NUMBER") ->setAmount($amount) ->setMerchantAccount("YOUR_MERCHANT_ACCOUNT") ->setRecurringProcessingModel("Subscription") ->setPaymentMethod($checkoutPaymentMethod) ->setShopperInteraction("ContAuth") ->setShopperReference("YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j"); $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 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 amount = new Amount { Currency = "AUD", Value = 1000 }; var achDetails = new AchDetails { StoredPaymentMethodId = "7219687191761347", Type = AchDetails.TypeEnum. }; var paymentRequest = new PaymentRequest { Reference = "YOUR_ORDER_NUMBER", Amount = amount, MerchantAccount = "YOUR_MERCHANT_ACCOUNT", RecurringProcessingModel = PaymentRequest.RecurringProcessingModelEnum.Subscription, PaymentMethod = new CheckoutPaymentMethod(achDetails), ShopperInteraction = PaymentRequest.ShopperInteractionEnum.ContAuth, ShopperReference = "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j" }; 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 amount = { currency: "AUD", value: 1000 }; const achDetails = { storedPaymentMethodId: "7219687191761347", type: "zip" }; const paymentRequest = { reference: "YOUR_ORDER_NUMBER", amount: amount, merchantAccount: "YOUR_MERCHANT_ACCOUNT", recurringProcessingModel: "Subscription", paymentMethod: achDetails, shopperInteraction: "ContAuth", shopperReference: "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j" }; // 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) amount := checkout.Amount{ Currency: "AUD", Value: 1000, } achDetails := checkout.AchDetails{ StoredPaymentMethodId: common.PtrString("7219687191761347"), Type: common.PtrString("zip"), } paymentRequest := checkout.PaymentRequest{ Reference: "YOUR_ORDER_NUMBER", Amount: amount, MerchantAccount: "YOUR_MERCHANT_ACCOUNT", RecurringProcessingModel: common.PtrString("Subscription"), PaymentMethod: checkout.AchDetailsAsCheckoutPaymentMethod(&achDetails), ShopperInteraction: common.PtrString("ContAuth"), ShopperReference: common.PtrString("YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j"), } // 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": { "value": 1000, "currency": "AUD" }, "paymentMethod": { "type": "zip", "storedPaymentMethodId": "7219687191761347" }, "reference": "YOUR_ORDER_NUMBER", "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "shopperReference": "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j", "shopperInteraction": "ContAuth", "recurringProcessingModel": "Subscription" } # 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" => { "value" => 1000, "currency" => "AUD" }, "paymentMethod" => { "type" => "zip", "storedPaymentMethodId" => "7219687191761347" }, "reference" => "YOUR_ORDER_NUMBER", "merchantAccount" => "YOUR_MERCHANT_ACCOUNT", "shopperReference" => "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j", "shopperInteraction" => "ContAuth", "recurringProcessingModel" => "Subscription" } # 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 amount: Types.checkout.Amount = { currency: "AUD", value: 1000 }; const achDetails = { storedPaymentMethodId: "7219687191761347", type: "zip" } as unknown as Types.checkout.AchDetails; const paymentRequest = { reference: "YOUR_ORDER_NUMBER", amount: amount, merchantAccount: "YOUR_MERCHANT_ACCOUNT", recurringProcessingModel: Types.checkout.PaymentRequest.RecurringProcessingModelEnum.Subscription, paymentMethod: achDetails, shopperInteraction: Types.checkout.PaymentRequest.ShopperInteractionEnum.ContAuth, shopperReference: "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j" } as unknown as Types.checkout.PaymentRequest; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = await checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` ## Test and go live Create Zip test accounts using the credentials on Zip's [test credentials](https://developers.zip.co/v2/docs/test-customers) page. You can then use your test account to make a payment in the test environment. Check the status of Zip test payments in your [Customer Area](https://ca-test.adyen.com/) > **Payments** > **Payment list**. Before you can accept live Zip payments, you need to submit a request for Zip in your [live Customer Area](https://ca-live.adyen.com/). ## See also * [Web Drop-in integration guide](https://docs.adyen.com/online-payments/drop-in-web) * [Webhooks](https://docs.adyen.com/development-resources/webhooks) * [API Explorer](https://docs.adyen.com/api-explorer/Checkout/latest/overview)