{"title":"GrabPay Android Component","category":"default","creationDate":1567783140,"content":"<div class=\"sc-notice info\"><div>\n<p><strong>If you are using Android Components v5.0.0 or later:<\/strong><\/p>\n<p>This payment method requires no additional configuration.<\/p>\n<p>Follow the  <a href=\"\/pt\/online-payments\/build-your-integration\/sessions-flow?platform=Android&amp;integration=Components\">Components integration guide<\/a> and use the following module and Component names:<\/p>\n<ul>\n<li>To <a href=\"\/pt\/online-payments\/build-your-integration\/sessions-flow\/?platform=Android&amp;integration=Components#import\">import the module<\/a>: <strong>instant<\/strong><\/li>\n<li>To <a href=\"\/pt\/online-payments\/build-your-integration\/sessions-flow?platform=Android&amp;integration=Components#launch-and-show\">launch and show the Component<\/a>: <strong>InstantPaymentComponent<\/strong><\/li>\n<\/ul>\n<\/div><\/div>\n<p>Our GrabPay Component renders GrabPay in your payment form and redirects the shopper to GrabPay's webpage.<\/p>\n<p>When making a GrabPay payment, you additionally need to:<\/p>\n<ul>\n<li><a href=\"#collect-additional-info\">Collect shopper information<\/a>. Required only for GrabPay PayLater payments.<\/li>\n<li><a href=\"#handle-the-redirect\">Handle the redirect<\/a>.<\/li>\n<\/ul>\n<h2>Requirements<\/h2>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Requirement<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>Integration type<\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that you have built an Advanced flow <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Android&amp;integration=Components\">Android Components integration<\/a>. <\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Setup steps<\/strong><\/td>\n<td style=\"text-align: left;\">Before you begin, <a href=\"\/pt\/payment-methods\/add-payment-methods\">add GrabPay in your Customer Area<\/a>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Show GrabPay in your payment form<\/h2>\n<p>To show GrabPay Component in your payment form, you need to:<\/p>\n<ol>\n<li>\n<p>Specify in your  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/paymentMethods<\/a> request:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Country\/region<\/th>\n<th style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">countryCode<\/a><\/th>\n<th style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods#request-amount\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">amount.currency<\/a><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">Malaysia<\/td>\n<td style=\"text-align: left;\">MY<\/td>\n<td style=\"text-align: left;\">MYR<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">Singapore<\/td>\n<td style=\"text-align: left;\">SG<\/td>\n<td style=\"text-align: left;\">SGD<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">Philippines<a href=\"#not-available\">\n  <sup>1<\/sup>\n<\/a><\/td>\n<td style=\"text-align: left;\">PH<\/td>\n<td style=\"text-align: left;\">PHP<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ol>\n<p><a id=\"not-available\"><\/a> <sup>1<\/sup> GrabPay PayLater is not available in Philippines.<\/p>\n<ol start=\"2\">\n<li>Deserialize the response from the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/paymentMethods<\/a> call and get the object with <code>type<\/code> <span translate=\"no\"><strong>grabpay_<\/strong><\/span><strong>XX<\/strong>, where <em>XX<\/em> is the country code.<\/li>\n<\/ol>\n<h3 id=\"collect-additional-info\">Collect additional information in your payment form<\/h3>\n<div class=\"notices green\">\n<p>Collecting additional information is only needed for GrabPay PayLater payments. However, we highly recommend collecting this information in your initial integration for GrabPay Wallet because it will help save development resources if you plan to enable GrabPay PayLater afterwards.<\/p>\n<\/div>\n<p>Collect the following details from the shopper:<\/p>\n<ul>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-deliveryAddress\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">deliveryAddress<\/a>&#58; The address where the purchased goods should be delivered, including the country, city, street, house number, and postal code.<\/li>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems<\/a>&#58; Price and product information about the purchased items, to be included on the invoice sent to the shopper.<\/li>\n<\/ul>\n<p>Pass the collected data to your server because you will need it when <a href=\"#make-a-payment\">making a payment<\/a>. This information will be used by GrabPay to perform risk checks.<\/p>\n<h2 id=\"make-a-payment\">Make a payment<\/h2>\n<p>When the shopper proceeds to pay, the Component returns the <code>paymentComponentState.data.paymentMethod<\/code>. Depending on the type of GrabPay payment, Wallet or PayLater, you need to provide different parameters in the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> request.<\/p>\n\n<div id=\"tabCPgmS\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;Wallet&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;To make a regular  Wallet payment:&lt;\\\/p&gt;\\n&lt;ol&gt;\\n&lt;li&gt;\\n&lt;p&gt;Pass the &lt;code&gt;paymentComponentState.data.paymentMethod&lt;\\\/code&gt; to your server.&lt;\\\/p&gt;\\n&lt;\\\/li&gt;\\n&lt;li&gt;\\n&lt;p&gt;From your server, make a  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/payments&lt;\\\/a&gt; request, specifying:&lt;\\\/p&gt;\\n&lt;ul&gt;\\n&lt;li&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-paymentMethod\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;paymentMethod&lt;\\\/a&gt;&amp;#58; The &lt;code&gt;paymentComponentState.data.paymentMethod&lt;\\\/code&gt; from your client app.&lt;\\\/li&gt;\\n&lt;li&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-returnUrl\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;returnUrl&lt;\\\/a&gt;&amp;#58; URL to where the shopper should be redirected back to after they complete the payment. Get this URL from the Component in the &lt;code&gt;RedirectComponent.getReturnUrl(context)&lt;\\\/code&gt;.&lt;\\\/li&gt;\\n&lt;li&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-reference\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;reference&lt;\\\/a&gt;&amp;#58; Your unique reference for this payment. Maximum length of 32 characters. Only alphanumeric characters, dashes and underscores are allowed.&lt;\\\/li&gt;\\n&lt;li&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#responses-200-amount\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;amount&lt;\\\/a&gt;&amp;#58; The amount that the shopper needs to pay.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;&#039;\\&quot; :id=\\&quot;&#039;payments&#039;\\&quot; :code-data=\\&quot;[{&amp;quot;language&amp;quot;:&amp;quot;bash&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;curl&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;curl https:\\\\\\\/\\\\\\\/checkout-test.adyen.com\\\\\\\/v68\\\\\\\/payments \\\\\\\\\\\\n-H &#039;x-api-key: ADYEN_API_KEY&#039; \\\\\\\\\\\\n-H &#039;content-type: application\\\\\\\/json&#039; \\\\\\\\\\\\n-d &#039;{\\\\n     \\\\&amp;quot;amount\\\\&amp;quot;: {\\\\n       \\\\&amp;quot;currency\\\\&amp;quot;: \\\\&amp;quot;SGD\\\\&amp;quot;,\\\\n       \\\\&amp;quot;value\\\\&amp;quot;: 1000\\\\n     },\\\\n     \\\\&amp;quot;reference\\\\&amp;quot;: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n     \\\\&amp;quot;paymentMethod\\\\&amp;quot;: {\\\\n       \\\\&amp;quot;type\\\\&amp;quot;: \\\\&amp;quot;grabpay_SG\\\\&amp;quot;\\\\n     },\\\\n     \\\\&amp;quot;returnUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;,\\\\n     \\\\&amp;quot;merchantAccount\\\\&amp;quot;: \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;\\\\n}&#039;&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;java&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Java&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Java API Library v27.0.0\\\\nimport com.adyen.Client;\\\\nimport com.adyen.enums.Environment;\\\\nimport com.adyen.model.checkout.*;\\\\nimport java.time.OffsetDateTime;\\\\nimport java.util.*;\\\\nimport com.adyen.model.RequestOptions;\\\\nimport com.adyen.service.checkout.*;\\\\n\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nClient client = new Client(\\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, Environment.TEST);\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nAmount amount = new Amount()\\\\n  .currency(\\\\&amp;quot;SGD\\\\&amp;quot;)\\\\n  .value(1000L);\\\\n\\\\nStoredPaymentMethodDetails storedPaymentMethodDetails = new StoredPaymentMethodDetails()\\\\n  .type(StoredPaymentMethodDetails.TypeEnum.GRABPAY_SG);\\\\n\\\\nPaymentRequest paymentRequest = new PaymentRequest()\\\\n  .reference(\\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;)\\\\n  .amount(amount)\\\\n  .merchantAccount(\\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;)\\\\n  .paymentMethod(new CheckoutPaymentMethod(storedPaymentMethodDetails))\\\\n  .returnUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;);\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nPaymentsApi service = new PaymentsApi(client);\\\\nPaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey(\\\\&amp;quot;UUID\\\\&amp;quot;));&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;php&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;PHP&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen PHP API Library v19.0.0\\\\nuse Adyen\\\\\\\\Client;\\\\nuse Adyen\\\\\\\\Environment;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\Amount;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\CheckoutPaymentMethod;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\PaymentRequest;\\\\nuse Adyen\\\\\\\\Service\\\\\\\\Checkout\\\\\\\\PaymentsApi;\\\\n\\\\n$client = new Client();\\\\n$client-&amp;gt;setXApiKey(\\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;);\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\n$client-&amp;gt;setEnvironment(Environment::TEST);\\\\n\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\n$amount = new Amount();\\\\n$amount\\\\n  -&amp;gt;setCurrency(\\\\&amp;quot;SGD\\\\&amp;quot;)\\\\n  -&amp;gt;setValue(1000);\\\\n\\\\n$checkoutPaymentMethod = new CheckoutPaymentMethod();\\\\n$checkoutPaymentMethod\\\\n  -&amp;gt;setType(\\\\&amp;quot;grabpay_SG\\\\&amp;quot;);\\\\n\\\\n$paymentRequest = new PaymentRequest();\\\\n$paymentRequest\\\\n  -&amp;gt;setReference(\\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;)\\\\n  -&amp;gt;setAmount($amount)\\\\n  -&amp;gt;setMerchantAccount(\\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;)\\\\n  -&amp;gt;setPaymentMethod($checkoutPaymentMethod)\\\\n  -&amp;gt;setReturnUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;);\\\\n\\\\n$requestOptions[&#039;idempotencyKey&#039;] = &#039;UUID&#039;;\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\n$service = new PaymentsApi($client);\\\\n$response = $service-&amp;gt;payments($paymentRequest, $requestOptions);&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;cs&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;C#&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen .net API Library v17.0.0\\\\nusing Adyen;\\\\nusing Environment = Adyen.Model.Environment;\\\\nusing Adyen.Model;\\\\nusing Adyen.Model.Checkout;\\\\nusing Adyen.Service.Checkout;\\\\n\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nvar config = new Config()\\\\n{\\\\n    XApiKey = \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;,\\\\n    Environment = Environment.Test\\\\n};\\\\nvar client = new Client(config);\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nAmount amount = new Amount\\\\n{\\\\n  Currency = \\\\&amp;quot;SGD\\\\&amp;quot;,\\\\n  Value = 1000\\\\n};\\\\n\\\\nStoredPaymentMethodDetails storedPaymentMethodDetails = new StoredPaymentMethodDetails\\\\n{\\\\n  Type = StoredPaymentMethodDetails.TypeEnum.GrabpaySG\\\\n};\\\\n\\\\nPaymentRequest paymentRequest = new PaymentRequest\\\\n{\\\\n  Reference = \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  Amount = amount,\\\\n  MerchantAccount = \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  PaymentMethod = new CheckoutPaymentMethod(storedPaymentMethodDetails),\\\\n  ReturnUrl = \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;\\\\n};\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nvar service = new PaymentsService(client);\\\\nvar response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = \\\\&amp;quot;UUID\\\\&amp;quot;});&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;js&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;NodeJS (JavaScript)&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Node API Library v18.0.0\\\\n\\\\\\\/\\\\\\\/ Require the parts of the module you want to use\\\\nconst { Client, CheckoutAPI } = require(&#039;@adyen\\\\\\\/api-library&#039;);\\\\n\\\\\\\/\\\\\\\/ Initialize the client object\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nconst client = new Client({apiKey: \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, environment: \\\\&amp;quot;TEST\\\\&amp;quot;});\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nconst paymentRequest = {\\\\n  amount: {\\\\n    currency: \\\\&amp;quot;SGD\\\\&amp;quot;,\\\\n    value: 1000\\\\n  },\\\\n  reference: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  paymentMethod: {\\\\n    type: \\\\&amp;quot;grabpay_SG\\\\&amp;quot;\\\\n  },\\\\n  returnUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;,\\\\n  merchantAccount: \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;\\\\n}\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nconst checkoutAPI = new CheckoutAPI(client);\\\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\\\&amp;quot;UUID\\\\&amp;quot; });&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;go&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Go&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Go API Library v10.4.0\\\\nimport (\\\\n  \\\\&amp;quot;context\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v9\\\\\\\/src\\\\\\\/common\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v9\\\\\\\/src\\\\\\\/adyen\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v9\\\\\\\/src\\\\\\\/checkout\\\\&amp;quot;\\\\n)\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nclient := adyen.NewClient(&amp;amp;common.Config{\\\\n  ApiKey:      \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;,\\\\n  Environment: common.TestEnv,\\\\n})\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\namount := checkout.Amount{\\\\n  Currency: \\\\&amp;quot;SGD\\\\&amp;quot;,\\\\n  Value: 1000,\\\\n}\\\\n\\\\nstoredPaymentMethodDetails := checkout.StoredPaymentMethodDetails{\\\\n  Type: common.PtrString(\\\\&amp;quot;grabpay_SG\\\\&amp;quot;),\\\\n}\\\\n\\\\npaymentRequest := checkout.PaymentRequest{\\\\n  Reference: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  Amount: amount,\\\\n  MerchantAccount: \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  PaymentMethod: checkout.StoredPaymentMethodDetailsAsCheckoutPaymentMethod(&amp;amp;storedPaymentMethodDetails),\\\\n  ReturnUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;,\\\\n}\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nservice := client.Checkout()\\\\nreq := service.PaymentsApi.PaymentsInput().IdempotencyKey(\\\\&amp;quot;UUID\\\\&amp;quot;).PaymentRequest(paymentRequest)\\\\nres, httpRes, err := service.PaymentsApi.Payments(context.Background(), req)&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;py&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Python&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;# Adyen Python API Library v12.5.1\\\\nimport Adyen\\\\n\\\\nadyen = Adyen.Adyen()\\\\nadyen.client.xapikey = \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;\\\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nadyen.client.platform = \\\\&amp;quot;test\\\\&amp;quot; # The environment to use library in.\\\\n\\\\n# Create the request object(s)\\\\njson_request = {\\\\n  \\\\&amp;quot;amount\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;currency\\\\&amp;quot;: \\\\&amp;quot;SGD\\\\&amp;quot;,\\\\n    \\\\&amp;quot;value\\\\&amp;quot;: 1000\\\\n  },\\\\n  \\\\&amp;quot;reference\\\\&amp;quot;: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  \\\\&amp;quot;paymentMethod\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;type\\\\&amp;quot;: \\\\&amp;quot;grabpay_SG\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;returnUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;,\\\\n  \\\\&amp;quot;merchantAccount\\\\&amp;quot;: \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;\\\\n}\\\\n\\\\n# Send the request\\\\nresult = adyen.checkout.payments_api.payments(request=json_request, idempotency_key=\\\\&amp;quot;UUID\\\\&amp;quot;)&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;rb&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Ruby&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;# Adyen Ruby API Library v9.5.1\\\\nrequire \\\\&amp;quot;adyen-ruby-api-library\\\\&amp;quot;\\\\n\\\\nadyen = Adyen::Client.new\\\\nadyen.api_key = &#039;ADYEN_API_KEY&#039;\\\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nadyen.env = :test # Set to \\\\&amp;quot;live\\\\&amp;quot; for live environment\\\\n\\\\n# Create the request object(s)\\\\nrequest_body = {\\\\n  :amount =&amp;gt; {\\\\n    :currency =&amp;gt; &#039;SGD&#039;,\\\\n    :value =&amp;gt; 1000\\\\n  },\\\\n  :reference =&amp;gt; &#039;YOUR_ORDER_REFERENCE&#039;,\\\\n  :paymentMethod =&amp;gt; {\\\\n    :type =&amp;gt; &#039;grabpay_SG&#039;\\\\n  },\\\\n  :returnUrl =&amp;gt; &#039;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..&#039;,\\\\n  :merchantAccount =&amp;gt; &#039;ADYEN_MERCHANT_ACCOUNT&#039;\\\\n}\\\\n\\\\n# Send the request\\\\nresult = adyen.checkout.payments_api.payments(request_body, headers: { &#039;Idempotency-Key&#039; =&amp;gt; &#039;UUID&#039; })&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;ts&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;NodeJS (TypeScript)&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Node API Library v18.0.0\\\\n\\\\\\\/\\\\\\\/ Require the parts of the module you want to use\\\\nimport { Client, CheckoutAPI, Types } from \\\\&amp;quot;@adyen\\\\\\\/api-library\\\\&amp;quot;;\\\\n\\\\\\\/\\\\\\\/ Initialize the client object\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nconst client = new Client({apiKey: \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, environment: \\\\&amp;quot;TEST\\\\&amp;quot;});\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nconst amount: Types.checkout.Amount = {\\\\n  currency: \\\\&amp;quot;SGD\\\\&amp;quot;,\\\\n  value: 1000\\\\n};\\\\n\\\\nconst storedPaymentMethodDetails: Types.checkout.StoredPaymentMethodDetails = {\\\\n  type: Types.checkout.StoredPaymentMethodDetails.TypeEnum.GrabpaySg\\\\n};\\\\n\\\\nconst paymentRequest: Types.checkout.PaymentRequest = {\\\\n  reference: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  amount: amount,\\\\n  merchantAccount: \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  paymentMethod: storedPaymentMethodDetails,\\\\n  returnUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;\\\\n};\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nconst checkoutAPI = new CheckoutAPI(client);\\\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\\\&amp;quot;UUID\\\\&amp;quot; });&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;p&gt;In the  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/payments&lt;\\\/a&gt; response, check the &lt;code&gt;action&lt;\\\/code&gt; object for the information that you must use to redirect the shopper.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;\\\/payments response&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;json\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;{\\\\n  \\\\\\&quot;resultCode\\\\\\&quot;:\\\\\\&quot;RedirectShopper\\\\\\&quot;,\\\\n  \\\\\\&quot;action\\\\\\&quot;:{\\\\n    \\\\\\&quot;paymentMethodType\\\\\\&quot;:\\\\\\&quot;grabpay_SG\\\\\\&quot;,\\\\n    \\\\\\&quot;method\\\\\\&quot;:\\\\\\&quot;GET\\\\\\&quot;,\\\\n    \\\\\\&quot;url\\\\\\&quot;:\\\\\\&quot;https:\\\\\\\/\\\\\\\/checkoutshopper-test.adyen.com\\\\\\\/checkoutshopper\\\\\\\/checkoutPaymentRedirect?redirectData=...\\\\\\&quot;,\\\\n    \\\\\\&quot;type\\\\\\&quot;:\\\\\\&quot;redirect\\\\\\&quot;\\\\n  }\\\\n}\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;\\\/li&gt;\\n&lt;li&gt;\\n&lt;p&gt;Pass the &lt;code&gt;action&lt;\\\/code&gt; object to your client app. You need this to initialize the Redirect Component.&lt;\\\/p&gt;\\n&lt;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&quot;,&quot;altTitle&quot;:&quot;payment-wallet&quot;,&quot;oldTabId&quot;:&quot;payment-wallet_1&quot;,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;PayLater&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;To make a  PayLater payment, either postpaid or installment:&lt;\\\/p&gt;\\n&lt;ol&gt;\\n&lt;li&gt;\\n&lt;p&gt;Pass the &lt;code&gt;paymentComponentState.data.paymentMethod&lt;\\\/code&gt; to your server.&lt;\\\/p&gt;\\n&lt;\\\/li&gt;\\n&lt;li&gt;\\n&lt;p&gt;From your server, make a  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/payments&lt;\\\/a&gt; request, specifying:&lt;\\\/p&gt;\\n&lt;ul&gt;\\n&lt;li&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-paymentMethod\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;paymentMethod&lt;\\\/a&gt;&amp;#58; The &lt;code&gt;paymentComponentState.data.paymentMethod&lt;\\\/code&gt; from your client app.&lt;\\\/li&gt;\\n&lt;li&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-returnUrl\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;returnUrl&lt;\\\/a&gt;&amp;#58; URL to where the shopper should be redirected back to after they complete the payment. Get this URL from the Component in the &lt;code&gt;RedirectComponent.getReturnUrl(context)&lt;\\\/code&gt;.&lt;\\\/li&gt;\\n&lt;li&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-reference\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;reference&lt;\\\/a&gt;&amp;#58; Your unique reference for this payment. Maximum length of 32 characters. Only alphanumeric characters, dashes and underscores are allowed.&lt;\\\/li&gt;\\n&lt;li&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#responses-200-amount\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;amount&lt;\\\/a&gt;&amp;#58; The amount that the shopper needs to pay.&lt;\\\/li&gt;\\n&lt;li&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-deliveryAddress\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;deliveryAddress&lt;\\\/a&gt;&amp;#58; The address where the purchased goods should be delivered.&lt;\\\/li&gt;\\n&lt;li&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-lineItems\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;lineItems&lt;\\\/a&gt;&amp;#58; Price and product information about the purchased items, to be included on the invoice sent to the shopper.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;&#039;\\&quot; :id=\\&quot;&#039;payments-installment&#039;\\&quot; :code-data=\\&quot;[{&amp;quot;language&amp;quot;:&amp;quot;bash&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;curl&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;curl https:\\\\\\\/\\\\\\\/checkout-test.adyen.com\\\\\\\/v68\\\\\\\/payments \\\\\\\\\\\\n-H &#039;x-api-key: ADYEN_API_KEY&#039; \\\\\\\\\\\\n-H &#039;content-type: application\\\\\\\/json&#039; \\\\\\\\\\\\n-d &#039;{\\\\n    \\\\&amp;quot;amount\\\\&amp;quot;: {\\\\n        \\\\&amp;quot;currency\\\\&amp;quot;: \\\\&amp;quot;SGD\\\\&amp;quot;,\\\\n        \\\\&amp;quot;value\\\\&amp;quot;: 1000\\\\n    },\\\\n    \\\\&amp;quot;reference\\\\&amp;quot;: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n    \\\\&amp;quot;paymentMethod\\\\&amp;quot;: {\\\\n        \\\\&amp;quot;type\\\\&amp;quot;: \\\\&amp;quot;grabpay_SG\\\\&amp;quot;\\\\n    },\\\\n    \\\\&amp;quot;returnUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;,\\\\n    \\\\&amp;quot;merchantAccount\\\\&amp;quot;: \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n    \\\\&amp;quot;deliveryAddress\\\\&amp;quot;: {\\\\n        \\\\&amp;quot;city\\\\&amp;quot;: \\\\&amp;quot;Singapore\\\\&amp;quot;,\\\\n        \\\\&amp;quot;country\\\\&amp;quot;: \\\\&amp;quot;SG\\\\&amp;quot;,\\\\n        \\\\&amp;quot;houseNumberOrName\\\\&amp;quot;: \\\\&amp;quot;109\\\\&amp;quot;,\\\\n        \\\\&amp;quot;postalCode\\\\&amp;quot;: \\\\&amp;quot;179097\\\\&amp;quot;,\\\\n        \\\\&amp;quot;street\\\\&amp;quot;: \\\\&amp;quot;North Bridge Road\\\\&amp;quot;\\\\n    },\\\\n    \\\\&amp;quot;lineItems\\\\&amp;quot;:[\\\\n      {\\\\n         \\\\&amp;quot;quantity\\\\&amp;quot;:\\\\&amp;quot;1\\\\&amp;quot;,\\\\n         \\\\&amp;quot;taxPercentage\\\\&amp;quot;:\\\\&amp;quot;2100\\\\&amp;quot;,\\\\n         \\\\&amp;quot;description\\\\&amp;quot;:\\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n         \\\\&amp;quot;id\\\\&amp;quot;:\\\\&amp;quot;Item #1\\\\&amp;quot;,\\\\n         \\\\&amp;quot;amountIncludingTax\\\\&amp;quot;:\\\\&amp;quot;400\\\\&amp;quot;,\\\\n         \\\\&amp;quot;productUrl\\\\&amp;quot;: \\\\&amp;quot;URL_TO_PURCHASED_ITEM\\\\&amp;quot;,\\\\n         \\\\&amp;quot;imageUrl\\\\&amp;quot;: \\\\&amp;quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\\\&amp;quot;\\\\n      }\\\\n   ]\\\\n}&#039;&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;java&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Java&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Java API Library v27.0.0\\\\nimport com.adyen.Client;\\\\nimport com.adyen.enums.Environment;\\\\nimport com.adyen.model.checkout.*;\\\\nimport java.time.OffsetDateTime;\\\\nimport java.util.*;\\\\nimport com.adyen.model.RequestOptions;\\\\nimport com.adyen.service.checkout.*;\\\\n\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nClient client = new Client(\\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, Environment.TEST);\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nLineItem lineItem1 = new LineItem()\\\\n  .quantity(1L)\\\\n  .taxPercentage(2100L)\\\\n  .imageUrl(\\\\&amp;quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\\\&amp;quot;)\\\\n  .description(\\\\&amp;quot;Shoes\\\\&amp;quot;)\\\\n  .id(\\\\&amp;quot;Item #1\\\\&amp;quot;)\\\\n  .amountIncludingTax(400L)\\\\n  .productUrl(\\\\&amp;quot;URL_TO_PURCHASED_ITEM\\\\&amp;quot;);\\\\n\\\\nAmount amount = new Amount()\\\\n  .currency(\\\\&amp;quot;SGD\\\\&amp;quot;)\\\\n  .value(1000L);\\\\n\\\\nDeliveryAddress deliveryAddress = new DeliveryAddress()\\\\n  .country(\\\\&amp;quot;SG\\\\&amp;quot;)\\\\n  .city(\\\\&amp;quot;Singapore\\\\&amp;quot;)\\\\n  .houseNumberOrName(\\\\&amp;quot;109\\\\&amp;quot;)\\\\n  .street(\\\\&amp;quot;North Bridge Road\\\\&amp;quot;)\\\\n  .postalCode(\\\\&amp;quot;179097\\\\&amp;quot;);\\\\n\\\\nStoredPaymentMethodDetails storedPaymentMethodDetails = new StoredPaymentMethodDetails()\\\\n  .type(StoredPaymentMethodDetails.TypeEnum.GRABPAY_SG);\\\\n\\\\nPaymentRequest paymentRequest = new PaymentRequest()\\\\n  .reference(\\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;)\\\\n  .lineItems(Arrays.asList(lineItem1))\\\\n  .amount(amount)\\\\n  .merchantAccount(\\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;)\\\\n  .deliveryAddress(deliveryAddress)\\\\n  .paymentMethod(new CheckoutPaymentMethod(storedPaymentMethodDetails))\\\\n  .returnUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;);\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nPaymentsApi service = new PaymentsApi(client);\\\\nPaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey(\\\\&amp;quot;UUID\\\\&amp;quot;));&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;php&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;PHP&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen PHP API Library v19.0.0\\\\nuse Adyen\\\\\\\\Client;\\\\nuse Adyen\\\\\\\\Environment;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\LineItem;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\Amount;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\DeliveryAddress;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\CheckoutPaymentMethod;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\PaymentRequest;\\\\nuse Adyen\\\\\\\\Service\\\\\\\\Checkout\\\\\\\\PaymentsApi;\\\\n\\\\n$client = new Client();\\\\n$client-&amp;gt;setXApiKey(\\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;);\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\n$client-&amp;gt;setEnvironment(Environment::TEST);\\\\n\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\n$lineItem1 = new LineItem();\\\\n$lineItem1\\\\n  -&amp;gt;setQuantity(1)\\\\n  -&amp;gt;setTaxPercentage(2100)\\\\n  -&amp;gt;setImageUrl(\\\\&amp;quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\\\&amp;quot;)\\\\n  -&amp;gt;setDescription(\\\\&amp;quot;Shoes\\\\&amp;quot;)\\\\n  -&amp;gt;setId(\\\\&amp;quot;Item #1\\\\&amp;quot;)\\\\n  -&amp;gt;setAmountIncludingTax(400)\\\\n  -&amp;gt;setProductUrl(\\\\&amp;quot;URL_TO_PURCHASED_ITEM\\\\&amp;quot;);\\\\n\\\\n$amount = new Amount();\\\\n$amount\\\\n  -&amp;gt;setCurrency(\\\\&amp;quot;SGD\\\\&amp;quot;)\\\\n  -&amp;gt;setValue(1000);\\\\n\\\\n$deliveryAddress = new DeliveryAddress();\\\\n$deliveryAddress\\\\n  -&amp;gt;setCountry(\\\\&amp;quot;SG\\\\&amp;quot;)\\\\n  -&amp;gt;setCity(\\\\&amp;quot;Singapore\\\\&amp;quot;)\\\\n  -&amp;gt;setHouseNumberOrName(\\\\&amp;quot;109\\\\&amp;quot;)\\\\n  -&amp;gt;setStreet(\\\\&amp;quot;North Bridge Road\\\\&amp;quot;)\\\\n  -&amp;gt;setPostalCode(\\\\&amp;quot;179097\\\\&amp;quot;);\\\\n\\\\n$checkoutPaymentMethod = new CheckoutPaymentMethod();\\\\n$checkoutPaymentMethod\\\\n  -&amp;gt;setType(\\\\&amp;quot;grabpay_SG\\\\&amp;quot;);\\\\n\\\\n$paymentRequest = new PaymentRequest();\\\\n$paymentRequest\\\\n  -&amp;gt;setReference(\\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;)\\\\n  -&amp;gt;setLineItems(array($lineItem1))\\\\n  -&amp;gt;setAmount($amount)\\\\n  -&amp;gt;setMerchantAccount(\\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;)\\\\n  -&amp;gt;setDeliveryAddress($deliveryAddress)\\\\n  -&amp;gt;setPaymentMethod($checkoutPaymentMethod)\\\\n  -&amp;gt;setReturnUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;);\\\\n\\\\n$requestOptions[&#039;idempotencyKey&#039;] = &#039;UUID&#039;;\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\n$service = new PaymentsApi($client);\\\\n$response = $service-&amp;gt;payments($paymentRequest, $requestOptions);&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;cs&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;C#&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen .net API Library v17.0.0\\\\nusing Adyen;\\\\nusing Environment = Adyen.Model.Environment;\\\\nusing Adyen.Model;\\\\nusing Adyen.Model.Checkout;\\\\nusing Adyen.Service.Checkout;\\\\n\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nvar config = new Config()\\\\n{\\\\n    XApiKey = \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;,\\\\n    Environment = Environment.Test\\\\n};\\\\nvar client = new Client(config);\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nLineItem lineItem1 = new LineItem\\\\n{\\\\n  Quantity = 1,\\\\n  TaxPercentage = 2100,\\\\n  ImageUrl = \\\\&amp;quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\\\&amp;quot;,\\\\n  Description = \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n  Id = \\\\&amp;quot;Item #1\\\\&amp;quot;,\\\\n  AmountIncludingTax = 400,\\\\n  ProductUrl = \\\\&amp;quot;URL_TO_PURCHASED_ITEM\\\\&amp;quot;\\\\n};\\\\n\\\\nAmount amount = new Amount\\\\n{\\\\n  Currency = \\\\&amp;quot;SGD\\\\&amp;quot;,\\\\n  Value = 1000\\\\n};\\\\n\\\\nDeliveryAddress deliveryAddress = new DeliveryAddress\\\\n{\\\\n  Country = \\\\&amp;quot;SG\\\\&amp;quot;,\\\\n  City = \\\\&amp;quot;Singapore\\\\&amp;quot;,\\\\n  HouseNumberOrName = \\\\&amp;quot;109\\\\&amp;quot;,\\\\n  Street = \\\\&amp;quot;North Bridge Road\\\\&amp;quot;,\\\\n  PostalCode = \\\\&amp;quot;179097\\\\&amp;quot;\\\\n};\\\\n\\\\nStoredPaymentMethodDetails storedPaymentMethodDetails = new StoredPaymentMethodDetails\\\\n{\\\\n  Type = StoredPaymentMethodDetails.TypeEnum.GrabpaySG\\\\n};\\\\n\\\\nPaymentRequest paymentRequest = new PaymentRequest\\\\n{\\\\n  Reference = \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  LineItems = new List&amp;lt;LineItem&amp;gt;{ lineItem1 },\\\\n  Amount = amount,\\\\n  MerchantAccount = \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  DeliveryAddress = deliveryAddress,\\\\n  PaymentMethod = new CheckoutPaymentMethod(storedPaymentMethodDetails),\\\\n  ReturnUrl = \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;\\\\n};\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nvar service = new PaymentsService(client);\\\\nvar response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = \\\\&amp;quot;UUID\\\\&amp;quot;});&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;js&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;NodeJS (JavaScript)&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Node API Library v18.0.0\\\\n\\\\\\\/\\\\\\\/ Require the parts of the module you want to use\\\\nconst { Client, CheckoutAPI } = require(&#039;@adyen\\\\\\\/api-library&#039;);\\\\n\\\\\\\/\\\\\\\/ Initialize the client object\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nconst client = new Client({apiKey: \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, environment: \\\\&amp;quot;TEST\\\\&amp;quot;});\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nconst paymentRequest = {\\\\n  amount: {\\\\n    currency: \\\\&amp;quot;SGD\\\\&amp;quot;,\\\\n    value: 1000\\\\n  },\\\\n  reference: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  paymentMethod: {\\\\n    type: \\\\&amp;quot;grabpay_SG\\\\&amp;quot;\\\\n  },\\\\n  returnUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;,\\\\n  merchantAccount: \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  deliveryAddress: {\\\\n    city: \\\\&amp;quot;Singapore\\\\&amp;quot;,\\\\n    country: \\\\&amp;quot;SG\\\\&amp;quot;,\\\\n    houseNumberOrName: \\\\&amp;quot;109\\\\&amp;quot;,\\\\n    postalCode: \\\\&amp;quot;179097\\\\&amp;quot;,\\\\n    street: \\\\&amp;quot;North Bridge Road\\\\&amp;quot;\\\\n  },\\\\n  lineItems: [ {\\\\n    quantity: \\\\&amp;quot;1\\\\&amp;quot;,\\\\n    taxPercentage: \\\\&amp;quot;2100\\\\&amp;quot;,\\\\n    description: \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n    id: \\\\&amp;quot;Item #1\\\\&amp;quot;,\\\\n    amountIncludingTax: \\\\&amp;quot;400\\\\&amp;quot;,\\\\n    productUrl: \\\\&amp;quot;URL_TO_PURCHASED_ITEM\\\\&amp;quot;,\\\\n    imageUrl: \\\\&amp;quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\\\&amp;quot;\\\\n  } ]\\\\n}\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nconst checkoutAPI = new CheckoutAPI(client);\\\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\\\&amp;quot;UUID\\\\&amp;quot; });&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;go&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Go&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Go API Library v10.4.0\\\\nimport (\\\\n  \\\\&amp;quot;context\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v9\\\\\\\/src\\\\\\\/common\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v9\\\\\\\/src\\\\\\\/adyen\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v9\\\\\\\/src\\\\\\\/checkout\\\\&amp;quot;\\\\n)\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nclient := adyen.NewClient(&amp;amp;common.Config{\\\\n  ApiKey:      \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;,\\\\n  Environment: common.TestEnv,\\\\n})\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nlineItem1 := checkout.LineItem{\\\\n  Quantity: common.PtrInt64(1),\\\\n  TaxPercentage: common.PtrInt64(2100),\\\\n  ImageUrl: common.PtrString(\\\\&amp;quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\\\&amp;quot;),\\\\n  Description: common.PtrString(\\\\&amp;quot;Shoes\\\\&amp;quot;),\\\\n  Id: common.PtrString(\\\\&amp;quot;Item #1\\\\&amp;quot;),\\\\n  AmountIncludingTax: common.PtrInt64(400),\\\\n  ProductUrl: common.PtrString(\\\\&amp;quot;URL_TO_PURCHASED_ITEM\\\\&amp;quot;),\\\\n}\\\\n\\\\namount := checkout.Amount{\\\\n  Currency: \\\\&amp;quot;SGD\\\\&amp;quot;,\\\\n  Value: 1000,\\\\n}\\\\n\\\\ndeliveryAddress := checkout.DeliveryAddress{\\\\n  Country: \\\\&amp;quot;SG\\\\&amp;quot;,\\\\n  City: \\\\&amp;quot;Singapore\\\\&amp;quot;,\\\\n  HouseNumberOrName: \\\\&amp;quot;109\\\\&amp;quot;,\\\\n  Street: \\\\&amp;quot;North Bridge Road\\\\&amp;quot;,\\\\n  PostalCode: \\\\&amp;quot;179097\\\\&amp;quot;,\\\\n}\\\\n\\\\nstoredPaymentMethodDetails := checkout.StoredPaymentMethodDetails{\\\\n  Type: common.PtrString(\\\\&amp;quot;grabpay_SG\\\\&amp;quot;),\\\\n}\\\\n\\\\npaymentRequest := checkout.PaymentRequest{\\\\n  Reference: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  LineItems: []checkout.LineItem{\\\\n      lineItem1,\\\\n  },\\\\n  Amount: amount,\\\\n  MerchantAccount: \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  DeliveryAddress: &amp;amp;deliveryAddress,\\\\n  PaymentMethod: checkout.StoredPaymentMethodDetailsAsCheckoutPaymentMethod(&amp;amp;storedPaymentMethodDetails),\\\\n  ReturnUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;,\\\\n}\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nservice := client.Checkout()\\\\nreq := service.PaymentsApi.PaymentsInput().IdempotencyKey(\\\\&amp;quot;UUID\\\\&amp;quot;).PaymentRequest(paymentRequest)\\\\nres, httpRes, err := service.PaymentsApi.Payments(context.Background(), req)&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;py&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Python&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;# Adyen Python API Library v12.5.1\\\\nimport Adyen\\\\n\\\\nadyen = Adyen.Adyen()\\\\nadyen.client.xapikey = \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;\\\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nadyen.client.platform = \\\\&amp;quot;test\\\\&amp;quot; # The environment to use library in.\\\\n\\\\n# Create the request object(s)\\\\njson_request = {\\\\n  \\\\&amp;quot;amount\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;currency\\\\&amp;quot;: \\\\&amp;quot;SGD\\\\&amp;quot;,\\\\n    \\\\&amp;quot;value\\\\&amp;quot;: 1000\\\\n  },\\\\n  \\\\&amp;quot;reference\\\\&amp;quot;: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  \\\\&amp;quot;paymentMethod\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;type\\\\&amp;quot;: \\\\&amp;quot;grabpay_SG\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;returnUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;,\\\\n  \\\\&amp;quot;merchantAccount\\\\&amp;quot;: \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  \\\\&amp;quot;deliveryAddress\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;city\\\\&amp;quot;: \\\\&amp;quot;Singapore\\\\&amp;quot;,\\\\n    \\\\&amp;quot;country\\\\&amp;quot;: \\\\&amp;quot;SG\\\\&amp;quot;,\\\\n    \\\\&amp;quot;houseNumberOrName\\\\&amp;quot;: \\\\&amp;quot;109\\\\&amp;quot;,\\\\n    \\\\&amp;quot;postalCode\\\\&amp;quot;: \\\\&amp;quot;179097\\\\&amp;quot;,\\\\n    \\\\&amp;quot;street\\\\&amp;quot;: \\\\&amp;quot;North Bridge Road\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;lineItems\\\\&amp;quot;: [ {\\\\n    \\\\&amp;quot;quantity\\\\&amp;quot;: \\\\&amp;quot;1\\\\&amp;quot;,\\\\n    \\\\&amp;quot;taxPercentage\\\\&amp;quot;: \\\\&amp;quot;2100\\\\&amp;quot;,\\\\n    \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n    \\\\&amp;quot;id\\\\&amp;quot;: \\\\&amp;quot;Item #1\\\\&amp;quot;,\\\\n    \\\\&amp;quot;amountIncludingTax\\\\&amp;quot;: \\\\&amp;quot;400\\\\&amp;quot;,\\\\n    \\\\&amp;quot;productUrl\\\\&amp;quot;: \\\\&amp;quot;URL_TO_PURCHASED_ITEM\\\\&amp;quot;,\\\\n    \\\\&amp;quot;imageUrl\\\\&amp;quot;: \\\\&amp;quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\\\&amp;quot;\\\\n  } ]\\\\n}\\\\n\\\\n# Send the request\\\\nresult = adyen.checkout.payments_api.payments(request=json_request, idempotency_key=\\\\&amp;quot;UUID\\\\&amp;quot;)&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;rb&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Ruby&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;# Adyen Ruby API Library v9.5.1\\\\nrequire \\\\&amp;quot;adyen-ruby-api-library\\\\&amp;quot;\\\\n\\\\nadyen = Adyen::Client.new\\\\nadyen.api_key = &#039;ADYEN_API_KEY&#039;\\\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nadyen.env = :test # Set to \\\\&amp;quot;live\\\\&amp;quot; for live environment\\\\n\\\\n# Create the request object(s)\\\\nrequest_body = {\\\\n  :amount =&amp;gt; {\\\\n    :currency =&amp;gt; &#039;SGD&#039;,\\\\n    :value =&amp;gt; 1000\\\\n  },\\\\n  :reference =&amp;gt; &#039;YOUR_ORDER_REFERENCE&#039;,\\\\n  :paymentMethod =&amp;gt; {\\\\n    :type =&amp;gt; &#039;grabpay_SG&#039;\\\\n  },\\\\n  :returnUrl =&amp;gt; &#039;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..&#039;,\\\\n  :merchantAccount =&amp;gt; &#039;ADYEN_MERCHANT_ACCOUNT&#039;,\\\\n  :deliveryAddress =&amp;gt; {\\\\n    :city =&amp;gt; &#039;Singapore&#039;,\\\\n    :country =&amp;gt; &#039;SG&#039;,\\\\n    :houseNumberOrName =&amp;gt; &#039;109&#039;,\\\\n    :postalCode =&amp;gt; &#039;179097&#039;,\\\\n    :street =&amp;gt; &#039;North Bridge Road&#039;\\\\n  },\\\\n  :lineItems =&amp;gt; [ {\\\\n    :quantity =&amp;gt; &#039;1&#039;,\\\\n    :taxPercentage =&amp;gt; &#039;2100&#039;,\\\\n    :description =&amp;gt; &#039;Shoes&#039;,\\\\n    :id =&amp;gt; &#039;Item #1&#039;,\\\\n    :amountIncludingTax =&amp;gt; &#039;400&#039;,\\\\n    :productUrl =&amp;gt; &#039;URL_TO_PURCHASED_ITEM&#039;,\\\\n    :imageUrl =&amp;gt; &#039;URL_TO_PICTURE_OF_PURCHASED_ITEM&#039;\\\\n  } ]\\\\n}\\\\n\\\\n# Send the request\\\\nresult = adyen.checkout.payments_api.payments(request_body, headers: { &#039;Idempotency-Key&#039; =&amp;gt; &#039;UUID&#039; })&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;ts&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;NodeJS (TypeScript)&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Node API Library v18.0.0\\\\n\\\\\\\/\\\\\\\/ Require the parts of the module you want to use\\\\nimport { Client, CheckoutAPI, Types } from \\\\&amp;quot;@adyen\\\\\\\/api-library\\\\&amp;quot;;\\\\n\\\\\\\/\\\\\\\/ Initialize the client object\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nconst client = new Client({apiKey: \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, environment: \\\\&amp;quot;TEST\\\\&amp;quot;});\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nconst lineItem1: Types.checkout.LineItem = {\\\\n  quantity: 1,\\\\n  taxPercentage: 2100,\\\\n  imageUrl: \\\\&amp;quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\\\&amp;quot;,\\\\n  description: \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n  id: \\\\&amp;quot;Item #1\\\\&amp;quot;,\\\\n  amountIncludingTax: 400,\\\\n  productUrl: \\\\&amp;quot;URL_TO_PURCHASED_ITEM\\\\&amp;quot;\\\\n};\\\\n\\\\nconst amount: Types.checkout.Amount = {\\\\n  currency: \\\\&amp;quot;SGD\\\\&amp;quot;,\\\\n  value: 1000\\\\n};\\\\n\\\\nconst deliveryAddress: Types.checkout.DeliveryAddress = {\\\\n  country: \\\\&amp;quot;SG\\\\&amp;quot;,\\\\n  city: \\\\&amp;quot;Singapore\\\\&amp;quot;,\\\\n  houseNumberOrName: \\\\&amp;quot;109\\\\&amp;quot;,\\\\n  street: \\\\&amp;quot;North Bridge Road\\\\&amp;quot;,\\\\n  postalCode: \\\\&amp;quot;179097\\\\&amp;quot;\\\\n};\\\\n\\\\nconst storedPaymentMethodDetails: Types.checkout.StoredPaymentMethodDetails = {\\\\n  type: Types.checkout.StoredPaymentMethodDetails.TypeEnum.GrabpaySg\\\\n};\\\\n\\\\nconst paymentRequest: Types.checkout.PaymentRequest = {\\\\n  reference: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  lineItems: [lineItem1],\\\\n  amount: amount,\\\\n  merchantAccount: \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  deliveryAddress: deliveryAddress,\\\\n  paymentMethod: storedPaymentMethodDetails,\\\\n  returnUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;\\\\n};\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nconst checkoutAPI = new CheckoutAPI(client);\\\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\\\&amp;quot;UUID\\\\&amp;quot; });&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;p&gt;In the  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/payments&lt;\\\/a&gt; response, check the &lt;code&gt;action&lt;\\\/code&gt; object for the information that you must use to redirect the shopper.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;\\\/payments response&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;json\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;{\\\\n  \\\\\\&quot;resultCode\\\\\\&quot;:\\\\\\&quot;RedirectShopper\\\\\\&quot;,\\\\n  \\\\\\&quot;action\\\\\\&quot;:{\\\\n    \\\\\\&quot;paymentMethodType\\\\\\&quot;:\\\\\\&quot;grabpay_SG\\\\\\&quot;,\\\\n    \\\\\\&quot;method\\\\\\&quot;:\\\\\\&quot;GET\\\\\\&quot;,\\\\n    \\\\\\&quot;url\\\\\\&quot;:\\\\\\&quot;https:\\\\\\\/\\\\\\\/checkoutshopper-test.adyen.com\\\\\\\/checkoutshopper\\\\\\\/checkoutPaymentRedirect?redirectData=...\\\\\\&quot;,\\\\n    \\\\\\&quot;type\\\\\\&quot;:\\\\\\&quot;redirect\\\\\\&quot;\\\\n  }\\\\n}\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;\\\/li&gt;\\n&lt;li&gt;\\n&lt;p&gt;Pass the &lt;code&gt;action&lt;\\\/code&gt; object to your client app. You need this to initialize the Redirect Component.&lt;\\\/p&gt;\\n&lt;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&quot;,&quot;altTitle&quot;:&quot;payment-paylater&quot;,&quot;oldTabId&quot;:&quot;payment-paylater_2&quot;,&quot;relation&quot;:&quot;&quot;}]\"\n            :should-update-when-url-changes='true'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<h2>Handle the redirect<\/h2>\n<ol>\n<li>Use the <a href=\"\/pt\/online-payments\/build-your-integration\/sessions-flow\/?platform=Android&amp;integration=Components#handle-a-redirect\">Redirect Component<\/a> to redirect the shopper to GrabPay to complete the payment.<\/li>\n<li>After the shopper returns to your app, make a POST  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> request from your server, providing:\n<ul>\n<li><code>details<\/code>: The <code>actionComponentData.details<\/code> object from the Redirect Component.<\/li>\n<\/ul><\/li>\n<\/ol>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'\/payments\/details request'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v68\\\/payments\\\/details \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n     \\&quot;details\\&quot;: {\\n       \\&quot;redirectResult\\&quot;: \\&quot;eyJ0cmFuc1N0YXR1cyI6IlkifQ==\\&quot;\\n   }\\n}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>You receive a response containing:<\/p>\n<ul>\n<li><code>resultCode<\/code>: Use this to present the payment result to your shopper.<\/li>\n<li><code>pspReference<\/code>: Our unique identifier for the transaction.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'\/payments\/details response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n      \\\"resultCode\\\": \\\"Authorised\\\",\\n      \\\"pspReference\\\": \\\"PPKFQ89R6QRXGN82\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>For GrabPay PayLater, the response also contains <code>additionalData.paymentMethodVariant<\/code> \u2014 the Adyen sub-variant of the payment method used for the payment request. Possible values:<\/p>\n<ul>\n<li>For GrabPay Wallet: <code>grabpay_wallet_SG<\/code>, <code>grabpay_sg<\/code>, <code>grabpay_wallet_MY<\/code>, <code>grabpay_my<\/code>, <code>grabpay_wallet_PH<\/code>, <code>grabpay_ph<\/code><\/li>\n<li>For GrabPay PayLater: <code>grabpay_postpaid_SG<\/code>, <code>grabpay_instalment4_SG<\/code>, <code>grabpay_postpaid_MY<\/code>, <code>grabpay_instalment4_MY<\/code>.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'\/payments\/details response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"resultCode\\\": \\\"Authorised\\\",\\n    \\\"pspReference\\\": \\\"88154795347618C\\\",\\n    \\\"additionalData\\\": {\\n        \\\"paymentMethodVariant\\\": \\\"grabpay_postpaid_SG\\\"\\n    }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2>Present the payment result<\/h2>\n<p>Use the\u00a0 <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details#responses-200-resultCode\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">resultCode<\/a> that you received in the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> response\u00a0to present the payment result to your shopper.<\/p>\n<p> <\/p>\n<p>The <code>resultCode<\/code> values you can receive for GrabPay are:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">resultCode<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<th style=\"text-align: left;\">Action<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>Authorised<\/strong><\/td>\n<td style=\"text-align: left;\">The payment was authorised. You will receive the funds in a number of days.<\/td>\n<td style=\"text-align: left;\">Inform the shopper that the payment was successful.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Cancelled<\/strong><\/td>\n<td style=\"text-align: left;\">The shopper cancelled the payment before it was completed, for example while in the GrabPay app.<\/td>\n<td style=\"text-align: left;\">Ask the shopper whether they want to continue with the order, or ask them to select a different payment method.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Refused<\/strong><\/td>\n<td style=\"text-align: left;\">The payment was refused by the shopper's card issuer.<\/td>\n<td style=\"text-align: left;\">Ask the shopper to try the payment again using a different payment method or card.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Pending<\/strong> or  <br> <strong>Received<\/strong><\/td>\n<td style=\"text-align: left;\">The shopper has completed the payment but the final result is not yet known. You will receive the final result of the payment in an <a href=\"\/pt\/development-resources\/webhooks\/webhook-types\">AUTHORISATION webhook<\/a>.<\/td>\n<td style=\"text-align: left;\">Inform the shopper that you have received their order, and are waiting for the payment to be processed.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a id=\"webhooks\"><\/a> If the shopper closed the browser and failed to return to your website, wait for webhooks to know the outcome of the payment. The webhooks you can receive for GrabPay are:<\/p>\n<table>\n<thead>\n<tr>\n<th>eventCode<\/th>\n<th>success field<\/th>\n<th>Description<\/th>\n<th>Action to take<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>AUTHORISATION<\/strong><\/td>\n<td><strong>false<\/strong><\/td>\n<td>The transaction failed.<\/td>\n<td>Cancel the order and inform the shopper that the payment failed.<\/td>\n<\/tr>\n<tr>\n<td><strong>AUTHORISATION<\/strong><\/td>\n<td><strong>true<\/strong><\/td>\n<td>The shopper successfully completed the payment.<\/td>\n<td>Inform the shopper that the payment has been successful and proceed with the order.<\/td>\n<\/tr>\n<tr>\n<td><strong>OFFER_CLOSED<\/strong><\/td>\n<td><strong>true<\/strong><\/td>\n<td>The shopper did not complete the payment.<\/td>\n<td>Cancel the order and inform the shopper that the payment timed out.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"test-and-go-live\">Test and go live<\/h2>\n<p>To test your GrabPay integration:<\/p>\n<ol>\n<li>Contact our <a href=\"https:\/\/ca-test.adyen.com\/ca\/ca\/contactUs\/support.shtml?form=other\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Support Team<\/a> for your test wallet credentials.<\/li>\n<li>In the simulator, log in to Grab with the phone number you registered, and specify the one-time password you receive on that phone number.<\/li>\n<\/ol>\n<p>Check the status of the GrabPay test payments in your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a> &gt; <strong>Transactions<\/strong> &gt; <strong>Payments<\/strong>.<\/p>\n<p> <\/p>\n<p>Before you can accept live GrabPay payments, you need to <a href=\"\/pt\/payment-methods\/add-payment-methods\">submit a request for GrabPay<\/a> in your <a href=\"https:\/\/ca-live.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">live Customer Area<\/a>.<\/p>\n<h2 id=\"see-also\">See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"\/online-payments\/build-your-integration\/sessions-flow?platform=Android&amp;integration=Components\"\n                        target=\"_self\"\n                        >\n                    Android Components integration guide\n                <\/a><\/li><li><a href=\"\/development-resources\/webhooks\"\n                        target=\"_self\"\n                        >\n                    Webhooks\n                <\/a><\/li><li><a href=\"\/online-payments\/tokenization\"\n                        target=\"_self\"\n                        >\n                    Tokenization\n                <\/a><\/li><li><a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/CheckoutService\/latest\/overview\"\n                        target=\"_blank\"\n                         class=\"external\">\n                    API Explorer\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/grabpay\/android-component","articleFields":{"description":"Add GrabPay to your Components integration.","parameters":{"payment_method":"GrabPay","country_code":"SG","currency":"SGD","payment_method_type":"grabpay_SG","return_url":"https:\/\/your-company.example.com\/checkout?shopperOrder=12xy..","component_name":"grabpay","android_component":"InstantPaymentComponent","integration":"Components","platform":"Android","module_import":"instant"}},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/grabpay\/android-component","title":"GrabPay Android Component","content":"\nIf you are using Android Components v5.0.0 or later:\nThis payment method requires no additional configuration.\nFollow the  Components integration guide and use the following module and Component names:\n\nTo import the module: instant\nTo launch and show the Component: InstantPaymentComponent\n\n\nOur GrabPay Component renders GrabPay in your payment form and redirects the shopper to GrabPay's webpage.\nWhen making a GrabPay payment, you additionally need to:\n\nCollect shopper information. Required only for GrabPay PayLater payments.\nHandle the redirect.\n\nRequirements\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nMake sure that you have built an Advanced flow Android Components integration. \n\n\nSetup steps\nBefore you begin, add GrabPay in your Customer Area.\n\n\n\nShow GrabPay in your payment form\nTo show GrabPay Component in your payment form, you need to:\n\n\nSpecify in your  \/paymentMethods request:\n\n\n\nCountry\/region\n countryCode\n amount.currency\n\n\n\n\nMalaysia\nMY\nMYR\n\n\nSingapore\nSG\nSGD\n\n\nPhilippines\n  1\n\nPH\nPHP\n\n\n\n\n\n 1 GrabPay PayLater is not available in Philippines.\n\nDeserialize the response from the  \/paymentMethods call and get the object with type grabpay_XX, where XX is the country code.\n\nCollect additional information in your payment form\n\nCollecting additional information is only needed for GrabPay PayLater payments. However, we highly recommend collecting this information in your initial integration for GrabPay Wallet because it will help save development resources if you plan to enable GrabPay PayLater afterwards.\n\nCollect the following details from the shopper:\n\n deliveryAddress&#58; The address where the purchased goods should be delivered, including the country, city, street, house number, and postal code.\n lineItems&#58; Price and product information about the purchased items, to be included on the invoice sent to the shopper.\n\nPass the collected data to your server because you will need it when making a payment. This information will be used by GrabPay to perform risk checks.\nMake a payment\nWhen the shopper proceeds to pay, the Component returns the paymentComponentState.data.paymentMethod. Depending on the type of GrabPay payment, Wallet or PayLater, you need to provide different parameters in the  \/payments request.\n\n\n    \n        \n        \n    \n\n\nHandle the redirect\n\nUse the Redirect Component to redirect the shopper to GrabPay to complete the payment.\nAfter the shopper returns to your app, make a POST  \/payments\/details request from your server, providing:\n\ndetails: The actionComponentData.details object from the Redirect Component.\n\n\n\n    \n\nYou receive a response containing:\n\nresultCode: Use this to present the payment result to your shopper.\npspReference: Our unique identifier for the transaction.\n\n\n    \n\nFor GrabPay PayLater, the response also contains additionalData.paymentMethodVariant \u2014 the Adyen sub-variant of the payment method used for the payment request. Possible values:\n\nFor GrabPay Wallet: grabpay_wallet_SG, grabpay_sg, grabpay_wallet_MY, grabpay_my, grabpay_wallet_PH, grabpay_ph\nFor GrabPay PayLater: grabpay_postpaid_SG, grabpay_instalment4_SG, grabpay_postpaid_MY, grabpay_instalment4_MY.\n\n\n    \n\nPresent the payment result\nUse the\u00a0 resultCode that you received in the  \/payments\/details response\u00a0to present the payment result to your shopper.\n \nThe resultCode values you can receive for GrabPay are:\n\n\n\nresultCode\nDescription\nAction\n\n\n\n\nAuthorised\nThe payment was authorised. You will receive the funds in a number of days.\nInform the shopper that the payment was successful.\n\n\nCancelled\nThe shopper cancelled the payment before it was completed, for example while in the GrabPay app.\nAsk the shopper whether they want to continue with the order, or ask them to select a different payment method.\n\n\nRefused\nThe payment was refused by the shopper's card issuer.\nAsk the shopper to try the payment again using a different payment method or card.\n\n\nPending or   Received\nThe shopper has completed the payment but the final result is not yet known. You will receive the final result of the payment in an AUTHORISATION webhook.\nInform the shopper that you have received their order, and are waiting for the payment to be processed.\n\n\n\n If the shopper closed the browser and failed to return to your website, wait for webhooks to know the outcome of the payment. The webhooks you can receive for GrabPay are:\n\n\n\neventCode\nsuccess field\nDescription\nAction to take\n\n\n\n\nAUTHORISATION\nfalse\nThe transaction failed.\nCancel the order and inform the shopper that the payment failed.\n\n\nAUTHORISATION\ntrue\nThe shopper successfully completed the payment.\nInform the shopper that the payment has been successful and proceed with the order.\n\n\nOFFER_CLOSED\ntrue\nThe shopper did not complete the payment.\nCancel the order and inform the shopper that the payment timed out.\n\n\n\nTest and go live\nTo test your GrabPay integration:\n\nContact our Support Team for your test wallet credentials.\nIn the simulator, log in to Grab with the phone number you registered, and specify the one-time password you receive on that phone number.\n\nCheck the status of the GrabPay test payments in your Customer Area &gt; Transactions &gt; Payments.\n \nBefore you can accept live GrabPay payments, you need to submit a request for GrabPay in your live Customer Area.\nSee also\n\n\n                    Android Components integration guide\n                \n                    Webhooks\n                \n                    Tokenization\n                \n                    API Explorer\n                \n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Payment methods","lvl2":"GrabPay","lvl3":"GrabPay Android Component"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/payment-methods","lvl2":"https:\/\/docs.adyen.com\/pt\/payment-methods\/grabpay","lvl3":"\/pt\/payment-methods\/grabpay\/android-component"},"levels":4,"category":"Payment method","category_color":"green","tags":["GrabPay","Android","Component"]},"articleFiles":{"payments-installment.js":"<p alt=\"\">payments-installment.js<\/p>","payments.js":"<p alt=\"\">payments.js<\/p>"}}
