{"title":"GrabPay for API only","category":"default","creationDate":1567783140,"content":"<p>Accept GrabPay payments using our APIs, and build your own payment form to have full control over the look and feel of your checkout page.<\/p>\n<h2>Requirements<\/h2>\n<p>Select the <a href=\"\/pt\/online-payments\/build-your-integration\">server-side flow<\/a> that your integration uses:<\/p>\n\n<div id=\"tab8JxZn\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;Sessions flow&quot;,&quot;content&quot;:&quot;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Requirement&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Integration type&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Make sure that you have built a Sessions flow &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/build-your-integration\\\/sessions-flow?platform=Web&amp;amp;integration=API-only\\&quot;&gt;Web API-only integration&lt;\\\/a&gt;. &lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Setup steps&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Before you begin, &lt;a href=\\&quot;\\\/pt\\\/payment-methods\\\/add-payment-methods\\&quot;&gt;add GrabPay in your Customer Area&lt;\\\/a&gt;.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&quot;,&quot;altTitle&quot;:&quot;sessions&quot;,&quot;oldTabId&quot;:&quot;sessions-requirements_1&quot;,&quot;relation&quot;:&quot;sessions&quot;},{&quot;title&quot;:&quot;Advanced flow&quot;,&quot;content&quot;:&quot;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Requirement&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Integration type&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Make sure that you have built an Advanced flow &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/build-your-integration\\\/advanced-flow?platform=Web&amp;amp;integration=API-only\\&quot;&gt;Web API-only integration&lt;\\\/a&gt;. &lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Setup steps&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Before you begin, &lt;a href=\\&quot;\\\/pt\\\/payment-methods\\\/add-payment-methods\\&quot;&gt;add GrabPay in your Customer Area&lt;\\\/a&gt;.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&quot;,&quot;altTitle&quot;:&quot;advanced&quot;,&quot;oldTabId&quot;:&quot;advanced-requirements_2&quot;,&quot;relation&quot;:&quot;advanced&quot;}]\"\n            :should-update-when-url-changes='true'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<h2>Build your payment form for GrabPay<\/h2>\n<p>To show GrabPay in your payment form, you need to:<\/p>\n<ol>\n<li>Include GrabPay in the list of available payment methods.<\/li>\n<li>After the shopper selects GrabPay, pass the payment method type to your server:\n<ul>\n<li><span translate=\"no\"><strong>grabpay_MY<\/strong><\/span> if the shopper is in Malaysia and is paying with Malaysian Ringgit.<\/li>\n<li><span translate=\"no\"><strong>grabpay_PH<\/strong><\/span> if the shopper is in the Philippines and is paying with Philippine Peso.<\/li>\n<li><span translate=\"no\"><strong>grabpay_SG<\/strong><\/span> if the shopper is in Singapore and is paying with Singapore Dollars.<\/li>\n<\/ul><\/li>\n<\/ol>\n<div class=\"sc-notice info\"><div>\n<p>We provide a GrabPay logo which you can use on your payment form. For more information, refer to <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#downloading-logos\">Downloading logos<\/a> for details.<\/p>\n<\/div><\/div>\n<p>You can also get the <code>paymentMethod.type<\/code> from the <code>\/paymentMethods<\/code> response as explained in the <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only&amp;version=71#get-available-payment-methods\">API-only integration<\/a> guide. 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, specify:<\/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<p><a id=\"not-available\"><\/a> <sup>1<\/sup> GrabPay PayLater is not available in Philippines.<\/p>\n<p>Get the corresponding <code>paymentMethod.type<\/code> from the response.<\/p>\n<h2 id=\"make-a-payment\">Make a payment<\/h2>\n<p>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=\"tab7gB2U\">\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;ul&gt;\\n&lt;li&gt;\\n&lt;p&gt;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, and specify:&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;  &lt;span translate=\\&quot;no\\&quot;&gt;&lt;strong&gt;grabpay_XX&lt;\\\/strong&gt;&lt;\\\/span&gt;, where &lt;em&gt;XX&lt;\\\/em&gt; is the country code. You can also refer to the &lt;code&gt;\\\/paymentMethods&lt;\\\/code&gt; response you received.&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; The URL where the shopper will be redirected back to after they complete the payment.&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;\\\/ul&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;ul&gt;\\n&lt;li&gt;\\n&lt;p&gt;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, and specify:&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;  &lt;span translate=\\&quot;no\\&quot;&gt;&lt;strong&gt;grabpay_XX&lt;\\\/strong&gt;&lt;\\\/span&gt;, where &lt;em&gt;XX&lt;\\\/em&gt; is the country code. You can also refer to the &lt;code&gt;\\\/paymentMethods&lt;\\\/code&gt; response you received.&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; The URL where the shopper will be redirected back to after they complete the payment.&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.&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;code&gt;amountIncludingTax&lt;\\\/code&gt; cannot be 0.&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;\\\/ul&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>\n<p>To complete the payment, redirect the shopper to the <code>action.url<\/code> returned 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> response, taking into account the following recommendations:<\/p>\n<ul>\n<li>\n<p><strong>When using the HTTP GET method:<\/strong><br \/>\nFor security reasons, when showing the redirect in the app, we recommend that you use <a href=\"https:\/\/developer.apple.com\/documentation\/safariservices\/sfsafariviewcontroller\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">SFSafariViewController<\/a> for iOS or <a href=\"https:\/\/developer.chrome.com\/multidevice\/android\/customtabs\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Chrome Custom Tabs<\/a> for Android, instead of WebView objects. Also refer to the <a href=\"https:\/\/developer.android.com\/topic\/security\/best-practices#webview\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">security best practices<\/a> for WebView.<\/p>\n<\/li>\n<li>\n<p><strong>Redirection for mobile integrations:<\/strong><br \/>\nFor mobile integrations, we strongly recommended that you redirect the shopper to the default browser of their device. Redirecting to the default browser ensures the best compatibility, handling of multi-factor authentication, app-to-app redirection, and error handling.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>After the shopper is redirected back to your website, check the payment result by making 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, specifying:<\/p>\n<ul>\n<li><code>details<\/code>: object that contains the URL-decoded <code>redirectResult<\/code> returned when the shopper was redirected back to your site.<\/li>\n<\/ul>\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\\\/v72\\\/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<\/li>\n<li>\n<p>In the response note the following:<\/p>\n<ul>\n<li><code>resultCode<\/code>: use this to present the 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\\\": \\\"V4HZ4RBFJGXXGN82\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\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\/api-only\"\n                        target=\"_self\"\n                        >\n                    API-only integration guide\n                <\/a><\/li><li><a href=\"\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#handle-the-redirect\"\n                        target=\"_self\"\n                        >\n                    Handling redirects\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\/api-only","articleFields":{"description":"Add GrabPay to an existing API-only integration.","never_cache_twig":true,"parameters":{"integration":"API-only","platform":"Web","integration_guide_url":"build-your-integration\/advanced-flow?platform=Web&integration=API%20only","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"}},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/grabpay\/api-only","title":"GrabPay for API only","content":"Accept GrabPay payments using our APIs, and build your own payment form to have full control over the look and feel of your checkout page.\nRequirements\nSelect the server-side flow that your integration uses:\n\n\n    \n        \n        \n    \n\n\nBuild your payment form for GrabPay\nTo show GrabPay in your payment form, you need to:\n\nInclude GrabPay in the list of available payment methods.\nAfter the shopper selects GrabPay, pass the payment method type to your server:\n\ngrabpay_MY if the shopper is in Malaysia and is paying with Malaysian Ringgit.\ngrabpay_PH if the shopper is in the Philippines and is paying with Philippine Peso.\ngrabpay_SG if the shopper is in Singapore and is paying with Singapore Dollars.\n\n\n\nWe provide a GrabPay logo which you can use on your payment form. For more information, refer to Downloading logos for details.\n\nYou can also get the paymentMethod.type from the \/paymentMethods response as explained in the API-only integration guide. In your  \/paymentMethods request, specify:\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 1 GrabPay PayLater is not available in Philippines.\nGet the corresponding paymentMethod.type from the response.\nMake a payment\nDepending 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\n\nTo complete the payment, redirect the shopper to the action.url returned in the  \/payments response, taking into account the following recommendations:\n\n\nWhen using the HTTP GET method:\nFor security reasons, when showing the redirect in the app, we recommend that you use SFSafariViewController for iOS or Chrome Custom Tabs for Android, instead of WebView objects. Also refer to the security best practices for WebView.\n\n\nRedirection for mobile integrations:\nFor mobile integrations, we strongly recommended that you redirect the shopper to the default browser of their device. Redirecting to the default browser ensures the best compatibility, handling of multi-factor authentication, app-to-app redirection, and error handling.\n\n\n\n\nAfter the shopper is redirected back to your website, check the payment result by making a POST  \/payments\/details request, specifying:\n\ndetails: object that contains the URL-decoded redirectResult returned when the shopper was redirected back to your site.\n\n\n\n\n\n\nIn the response note the following:\n\nresultCode: use this to present the result to your shopper.\npspReference: our unique identifier for the transaction.\n\n\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                    API-only integration guide\n                \n                    Handling redirects\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 for API only"},"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\/api-only"},"levels":4,"category":"Payment method","category_color":"green","tags":["GrabPay"]},"articleFiles":{"payments-installment.js":"<p alt=\"\">payments-installment.js<\/p>","payments.js":"<p alt=\"\">payments.js<\/p>"}}
