--- title: "TrueMoney Redirect Component" description: "Add TrueMoney to your existing iOS Components integration." url: "https://docs.adyen.com/payment-methods/truemoney/ios-component" source_url: "https://docs.adyen.com/payment-methods/truemoney/ios-component.md" canonical: "https://docs.adyen.com/payment-methods/truemoney/ios-component" last_modified: "2026-09-25T16:52:14+02:00" language: "en" --- # TrueMoney Redirect Component Add TrueMoney to your existing iOS Components integration. If you have an existing iOS Components integration, you can use our Redirect Component to redirect the shopper to TrueMoney's website to complete the payment. When making an TrueMoney payment, you need to: * [Include TrueMoney in the list of available payment methods](https://docs.adyen.com/payment-methods/truemoney/ios-component#show-in-your-payment-form). * [Handle the redirect](https://docs.adyen.com/payment-methods/truemoney/ios-component#handle-the-redirect). ## Requirements | Requirement | Description | | -------------------- | ------------------------------------------------------------------------------------------------------------------------ | | **Integration type** | Make sure that you have built your [integration](https://docs.adyen.com/online-payments/build-your-integration). | | **Setup steps** | Before you begin, [add TrueMoney in your test Customer Area](https://docs.adyen.com/payment-methods/add-payment-methods). | ## Show TrueMoney in your payment form Include TrueMoney in the list of available payment methods. You do not need to collect any information from the shopper in your payment form. * Specify in your [/paymentMethods](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods) request: * [countryCode](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods): **TH** * [amount.currency](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-amount): **THB** * [amount.value](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-amount): The value of the payment. The response contains `paymentMethod.type`: **truemoney**. We provide logos for TrueMoney which you can use on your payment form. For more information, refer to [Downloading logos](https://docs.adyen.com/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only#downloading-logos). ## Make a payment When the shopper proceeds to pay, you need to: 1. From your server, make a [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request, specifying: * [paymentMethod](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-paymentMethod): Set this to **truemoney** to redirect to the TrueMoney mobile app or website. * [returnUrl](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-returnUrl): The URL where the shopper will be redirected back to after completing the payment. This URL can have a maximum of 1024 characters. Use the custom URL for your app, for example, `my-app://`. For more information on setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). #### curl ```bash curl https://checkout-test.adyen.com/v68/payments \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -d '{ "merchantAccount":"ADYEN_MERCHANT_ACCOUNT", "reference":"YOUR_ORDER_NUMBER", "amount":{ "currency":"THB", "value":1000 }, "{hint:data.paymentMethod from didSubmit}paymentMethod{/hint}":{ "type":"truemoney" }, "returnUrl":"my-app://adyen" }' ``` #### Java ```java // Adyen Java API Library v27.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.checkout.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.checkout.*; // For the live environment, additionally include your liveEndpointUrlPrefix. Client client = new Client("ADYEN_API_KEY", Environment.TEST); // Create the request object(s) Amount amount = new Amount() .currency("THB") .value(1000L); StoredPaymentMethodDetails storedPaymentMethodDetails = new StoredPaymentMethodDetails() .type(StoredPaymentMethodDetails.TypeEnum.TRUEMONEY); PaymentRequest paymentRequest = new PaymentRequest() .reference("YOUR_ORDER_NUMBER") .amount(amount) .merchantAccount("ADYEN_MERCHANT_ACCOUNT") .paymentMethod(new CheckoutPaymentMethod(storedPaymentMethodDetails)) .returnUrl("my-app://adyen"); // Send the request PaymentsApi service = new PaymentsApi(client); PaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey("UUID")); ``` #### PHP ```php // Adyen PHP API Library v19.0.0 use Adyen\Client; use Adyen\Environment; use Adyen\Model\Checkout\Amount; use Adyen\Model\Checkout\CheckoutPaymentMethod; use Adyen\Model\Checkout\PaymentRequest; use Adyen\Service\Checkout\PaymentsApi; $client = new Client(); $client->setXApiKey("ADYEN_API_KEY"); // For the live environment, additionally include your liveEndpointUrlPrefix. $client->setEnvironment(Environment::TEST); // Create the request object(s) $amount = new Amount(); $amount ->setCurrency("THB") ->setValue(1000); $checkoutPaymentMethod = new CheckoutPaymentMethod(); $checkoutPaymentMethod ->setType("truemoney"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setReference("YOUR_ORDER_NUMBER") ->setAmount($amount) ->setMerchantAccount("ADYEN_MERCHANT_ACCOUNT") ->setPaymentMethod($checkoutPaymentMethod) ->setReturnUrl("my-app://adyen"); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->payments($paymentRequest, $requestOptions); ``` #### C\# ```cs // Adyen .net API Library v17.0.0 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Checkout; using Adyen.Service.Checkout; // For the live environment, additionally include your liveEndpointUrlPrefix. var config = new Config() { XApiKey = "ADYEN_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) Amount amount = new Amount { Currency = "THB", Value = 1000 }; StoredPaymentMethodDetails storedPaymentMethodDetails = new StoredPaymentMethodDetails { Type = StoredPaymentMethodDetails.TypeEnum.Truemoney }; PaymentRequest paymentRequest = new PaymentRequest { Reference = "YOUR_ORDER_NUMBER", Amount = amount, MerchantAccount = "ADYEN_MERCHANT_ACCOUNT", PaymentMethod = new CheckoutPaymentMethod(storedPaymentMethodDetails), ReturnUrl = "my-app://adyen" }; // Send the request var service = new PaymentsService(client); var response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"}); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v18.0.0 // Require the parts of the module you want to use const { Client, CheckoutAPI } = require('@adyen/api-library'); // Initialize the client object // For the live environment, additionally include your liveEndpointUrlPrefix. const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"}); // Create the request object(s) const paymentRequest = { merchantAccount: "ADYEN_MERCHANT_ACCOUNT", reference: "YOUR_ORDER_NUMBER", amount: { currency: "THB", value: 1000 }, paymentMethod: { type: "truemoney" }, returnUrl: "my-app://adyen" } // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v10.4.0 import ( "context" "github.com/adyen/adyen-go-api-library/v9/src/common" "github.com/adyen/adyen-go-api-library/v9/src/adyen" "github.com/adyen/adyen-go-api-library/v9/src/checkout" ) // For the live environment, additionally include your liveEndpointUrlPrefix. client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) amount := checkout.Amount{ Currency: "THB", Value: 1000, } storedPaymentMethodDetails := checkout.StoredPaymentMethodDetails{ Type: common.PtrString("truemoney"), } paymentRequest := checkout.PaymentRequest{ Reference: "YOUR_ORDER_NUMBER", Amount: amount, MerchantAccount: "ADYEN_MERCHANT_ACCOUNT", PaymentMethod: checkout.StoredPaymentMethodDetailsAsCheckoutPaymentMethod(&storedPaymentMethodDetails), ReturnUrl: "my-app://adyen", } // Send the request service := client.Checkout() req := service.PaymentsApi.PaymentsInput().IdempotencyKey("UUID").PaymentRequest(paymentRequest) res, httpRes, err := service.PaymentsApi.Payments(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v12.5.1 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" # For the live environment, additionally include your liveEndpointUrlPrefix. adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "reference": "YOUR_ORDER_NUMBER", "amount": { "currency": "THB", "value": 1000 }, "paymentMethod": { "type": "Truemoney" }, "returnUrl": "my-app://adyen" } # Send the request result = adyen.checkout.payments_api.payments(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v9.5.1 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_API_KEY' # For the live environment, additionally include your liveEndpointUrlPrefix. adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :merchantAccount => 'ADYEN_MERCHANT_ACCOUNT', :reference => 'YOUR_ORDER_NUMBER', :amount => { :currency => 'THB', :value => 1000 }, :paymentMethod => { :type => 'truemoney' }, :returnUrl => 'my-app://adyen' } # Send the request result = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v18.0.0 // Require the parts of the module you want to use import { Client, CheckoutAPI, Types } from "@adyen/api-library"; // Initialize the client object // For the live environment, additionally include your liveEndpointUrlPrefix. const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"}); // Create the request object(s) const amount: Types.checkout.Amount = { currency: "THB", value: 1000 }; const storedPaymentMethodDetails: Types.checkout.StoredPaymentMethodDetails = { type: Types.checkout.StoredPaymentMethodDetails.TypeEnum.Truemoney }; const paymentRequest: Types.checkout.PaymentRequest = { reference: "YOUR_ORDER_NUMBER", amount: amount, merchantAccount: "ADYEN_MERCHANT_ACCOUNT", paymentMethod: storedPaymentMethodDetails, returnUrl: "my-app://adyen" }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` In the [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) response, check the `action` object for the information that you must use to redirect the shopper. **/payments response** ```json { "resultCode":"RedirectShopper", "action":{ "paymentMethodType":"truemoney", "method":"GET", "url":"https://checkoutshopper-test.adyen.com/checkoutshopper/checkoutPaymentRedirect?redirectData=...", "type":"redirect" } } ``` 2. Pass the `action` object to your client app. ## Handle the redirect 1. Use the [Redirect Component](https://docs.adyen.com/online-payments/build-your-integration/sessions-flow/?platform=iOS\&integration=Components#handle-the-redirect) to redirect the shopper to TrueMoney. 2. After the shopper returns to your app, make a POST [/payments/details](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/details) request from your server and provide the `data` from the `didProvide` method from your client app. **/payments/details request** ```bash curl https://checkout-test.adyen.com/v72/payments/details \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -d '{ "details": { "redirectResult": "eyJ0cmFuc1N0YXR1cyI6IlkifQ==" } }' ``` You receive a response containing: * `resultCode`: Use this to present the result to your shopper. * `pspReference`: Our unique identifier for the transaction. **/payments/details response** ```json { "resultCode": "Authorised", "pspReference": "FJM726V375BV9D82" } ``` ## Present the payment result Use the [resultCode](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/details#responses-200-resultCode) that you received in the [/payments/details](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/details) response to present the payment result to your shopper. The `resultCode` values you can receive for TrueMoney are: | resultCode | Description | Action to take | | --------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Authorised** | The payment was successful. | Inform the shopper that the payment has been successful. | | **Cancelled** | The shopper cancelled the payment while on TrueMoney's website. | Ask the shopper whether they want to continue with the order, or ask them to select a different payment method. | | **Error** | There was an error when the payment was being processed. | Inform the shopper that there was an error processing their payment. The response contains a `refusalReason`, indicating the cause of the error. | | **Pending** or **Received** | The shopper has completed the payment but the final result is not yet known. | Inform the shopper that you have received their order, and are waiting for the payment to be completed. To know the final result of the payment, wait for the **AUTHORISATION** webhook. | | **Refused** | The payment was refused by the TrueMoney. | Ask the shopper to try the payment again using a different payment method. | []()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 TrueMoney are: | eventCode | success field | Description | Action to take | | ----------------- | ------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------- | | **AUTHORISATION** | **false** | The transaction failed. | Cancel the order and inform the shopper that the payment failed. | | **AUTHORISATION** | **true** | The shopper successfully completed the payment. | Inform the shopper that the payment has been successful and proceed with the order. | | **OFFER\_CLOSED** | **true** | The shopper did not complete the payment. | Cancel the order and inform the shopper that the payment timed out. | ## Recurring payments TrueMoney supports recurring transactions. To make recurring transactions, you need to: 1. [Create a shopper token](https://docs.adyen.com/payment-methods/truemoney/ios-component#create-a-token). 2. [Use the token to make future payments for the shopper](https://docs.adyen.com/payment-methods/truemoney/ios-component#make-payment-with-token). ### Create a token To create a token, include in your [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request: * `storePaymentMethod`: **true** * [shopperReference](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-shopperReference): Your unique identifier for the shopper. This triggers the [recurring flow](https://docs.adyen.com/payment-methods/truemoney/api-only#recurring-payments), where the shopper logs in to their TrueMoney account, and then confirms the recurring transaction. For the recurring flow to be completed, always make the [/payments/details](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/details) request, otherwise the payment method will not be stored. When the payment has been settled, you receive a [recurring.token.created](https://docs.adyen.com/api-explorer/Tokenization-webhooks/latest/post/recurring.token.created) [webhook](https://docs.adyen.com/development-resources/webhooks) containing: * `type`: **recurring.token.created** * `shopperReference`: your unique identifier for the shopper. * `eventId`: the `pspReference` of the initial payment. * `storedPaymentMethodId`: the token that you need to make recurring payments for this shopper. Make sure that your server is able to receive the [Recurring tokens life cycle events](https://docs.adyen.com/development-resources/webhooks/webhook-types/#other-webhooks) webhook. You can [set up this webhook in your Customer Area](https://docs.adyen.com/development-resources/webhooks/#set-up-webhooks-in-your-customer-area). ### Make a payment with a token To make a payment with the token, include in your [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request: * `paymentMethod.storedPaymentMethodId`: The `storedPaymentMethodId` from the [recurring.token.created](https://docs.adyen.com/api-explorer/Tokenization-webhooks/latest/post/recurring.token.created) webhook or from `additionalData.tokenization.storedPaymentMethodId` if you are retrieving the token synchronously. You can also get this value using the [/listRecurringDetails](https://docs.adyen.com/api-explorer/Recurring/latest/post/listRecurringDetails) endpoint. * `shopperReference`: The unique shopper identifier that you specified when creating the token. * `shopperInteraction`: **ContAuth** * `recurringProcessingModel`: Use **Subscription** for a series of transactions following a fixed time interval or **UnscheduledCardOnFile** for contracts with non-fixed time interval. #### curl ```bash curl https://checkout-test.adyen.com/v68/payments \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -d '{ "amount":{ "value":1000, "currency":"THB" }, "paymentMethod":{ "type":"truemoney", "storedPaymentMethodId":"7219687191761347" }, "reference":"YOUR_ORDER_NUMBER", "merchantAccount":"ADYEN_MERCHANT_ACCOUNT", "shopperReference":"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j", "shopperInteraction":"ContAuth", "recurringProcessingModel": "Subscription" }' ``` #### Java ```java // Adyen Java API Library v27.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.checkout.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.checkout.*; // For the live environment, additionally include your liveEndpointUrlPrefix. Client client = new Client("ADYEN_API_KEY", Environment.TEST); // Create the request object(s) Amount amount = new Amount() .currency("THB") .value(1000L); StoredPaymentMethodDetails storedPaymentMethodDetails = new StoredPaymentMethodDetails() .storedPaymentMethodId("7219687191761347") .type(StoredPaymentMethodDetails.TypeEnum.TRUEMONEY); PaymentRequest paymentRequest = new PaymentRequest() .reference("YOUR_ORDER_NUMBER") .amount(amount) .merchantAccount("ADYEN_MERCHANT_ACCOUNT") .recurringProcessingModel(PaymentRequest.RecurringProcessingModelEnum.SUBSCRIPTION) .paymentMethod(new CheckoutPaymentMethod(storedPaymentMethodDetails)) .shopperInteraction(PaymentRequest.ShopperInteractionEnum.CONTAUTH) .shopperReference("YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j"); // Send the request PaymentsApi service = new PaymentsApi(client); PaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey("UUID")); ``` #### PHP ```php // Adyen PHP API Library v19.0.0 use Adyen\Client; use Adyen\Environment; use Adyen\Model\Checkout\Amount; use Adyen\Model\Checkout\CheckoutPaymentMethod; use Adyen\Model\Checkout\PaymentRequest; use Adyen\Service\Checkout\PaymentsApi; $client = new Client(); $client->setXApiKey("ADYEN_API_KEY"); // For the live environment, additionally include your liveEndpointUrlPrefix. $client->setEnvironment(Environment::TEST); // Create the request object(s) $amount = new Amount(); $amount ->setCurrency("THB") ->setValue(1000); $checkoutPaymentMethod = new CheckoutPaymentMethod(); $checkoutPaymentMethod ->setStoredPaymentMethodId("7219687191761347") ->setType("truemoney"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setReference("YOUR_ORDER_NUMBER") ->setAmount($amount) ->setMerchantAccount("ADYEN_MERCHANT_ACCOUNT") ->setRecurringProcessingModel("Subscription") ->setPaymentMethod($checkoutPaymentMethod) ->setShopperInteraction("ContAuth") ->setShopperReference("YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j"); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->payments($paymentRequest, $requestOptions); ``` #### C\# ```cs // Adyen .net API Library v17.0.0 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Checkout; using Adyen.Service.Checkout; // For the live environment, additionally include your liveEndpointUrlPrefix. var config = new Config() { XApiKey = "ADYEN_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) Amount amount = new Amount { Currency = "THB", Value = 1000 }; StoredPaymentMethodDetails storedPaymentMethodDetails = new StoredPaymentMethodDetails { StoredPaymentMethodId = "7219687191761347", Type = StoredPaymentMethodDetails.TypeEnum.Truemoney }; PaymentRequest paymentRequest = new PaymentRequest { Reference = "YOUR_ORDER_NUMBER", Amount = amount, MerchantAccount = "ADYEN_MERCHANT_ACCOUNT", RecurringProcessingModel = PaymentRequest.RecurringProcessingModelEnum.Subscription, PaymentMethod = new CheckoutPaymentMethod(storedPaymentMethodDetails), ShopperInteraction = PaymentRequest.ShopperInteractionEnum.ContAuth, ShopperReference = "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j" }; // Send the request var service = new PaymentsService(client); var response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"}); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v18.0.0 // Require the parts of the module you want to use const { Client, CheckoutAPI } = require('@adyen/api-library'); // Initialize the client object // For the live environment, additionally include your liveEndpointUrlPrefix. const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"}); // Create the request object(s) const paymentRequest = { amount: { value: 1000, currency: "THB" }, paymentMethod: { type: "truemoney", storedPaymentMethodId: "7219687191761347" }, reference: "YOUR_ORDER_NUMBER", merchantAccount: "ADYEN_MERCHANT_ACCOUNT", shopperReference: "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j", shopperInteraction: "ContAuth", recurringProcessingModel: "Subscription" } // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v10.4.0 import ( "context" "github.com/adyen/adyen-go-api-library/v9/src/common" "github.com/adyen/adyen-go-api-library/v9/src/adyen" "github.com/adyen/adyen-go-api-library/v9/src/checkout" ) // For the live environment, additionally include your liveEndpointUrlPrefix. client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) amount := checkout.Amount{ Currency: "THB", Value: 1000, } storedPaymentMethodDetails := checkout.StoredPaymentMethodDetails{ StoredPaymentMethodId: common.PtrString("7219687191761347"), Type: common.PtrString("truemoney"), } paymentRequest := checkout.PaymentRequest{ Reference: "YOUR_ORDER_NUMBER", Amount: amount, MerchantAccount: "ADYEN_MERCHANT_ACCOUNT", RecurringProcessingModel: common.PtrString("Subscription"), PaymentMethod: checkout.StoredPaymentMethodDetailsAsCheckoutPaymentMethod(&storedPaymentMethodDetails), ShopperInteraction: common.PtrString("ContAuth"), ShopperReference: common.PtrString("YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j"), } // Send the request service := client.Checkout() req := service.PaymentsApi.PaymentsInput().IdempotencyKey("UUID").PaymentRequest(paymentRequest) res, httpRes, err := service.PaymentsApi.Payments(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v12.5.1 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" # For the live environment, additionally include your liveEndpointUrlPrefix. adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "amount": { "value": 1000, "currency": "THB" }, "paymentMethod": { "type": "Truemoney", "storedPaymentMethodId": "7219687191761347" }, "reference": "YOUR_ORDER_NUMBER", "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "shopperReference": "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j", "shopperInteraction": "ContAuth", "recurringProcessingModel": "Subscription" } # Send the request result = adyen.checkout.payments_api.payments(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v9.1.0 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'YOUR_X_API_KEY' adyen.env = :test # Set to "live" for live environment request_body = { :amount => { :value => 1000, :currency => 'THB' }, :paymentMethod => { :type => 'truemoney', :storedPaymentMethodId => '7219687191761347' }, :reference => 'YOUR_ORDER_NUMBER', :merchantAccount => 'YOUR_MERCHANT_ACCOUNT', :shopperReference => 'YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j', :shopperInteraction => 'ContAuth', :recurringProcessingModel => 'Subscription' } result = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v18.0.0 // Require the parts of the module you want to use import { Client, CheckoutAPI, Types } from "@adyen/api-library"; // Initialize the client object // For the live environment, additionally include your liveEndpointUrlPrefix. const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"}); // Create the request object(s) const amount: Types.checkout.Amount = { currency: "THB", value: 1000 }; const storedPaymentMethodDetails: Types.checkout.StoredPaymentMethodDetails = { storedPaymentMethodId: "7219687191761347", type: Types.checkout.StoredPaymentMethodDetails.TypeEnum.Truemoney }; const paymentRequest: Types.checkout.PaymentRequest = { reference: "YOUR_ORDER_NUMBER", amount: amount, merchantAccount: "ADYEN_MERCHANT_ACCOUNT", recurringProcessingModel: Types.checkout.PaymentRequest.RecurringProcessingModelEnum.Subscription, paymentMethod: storedPaymentMethodDetails, shopperInteraction: Types.checkout.PaymentRequest.ShopperInteractionEnum.ContAuth, shopperReference: "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j" }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` ## Test and go live To test successful TrueMoney live payments, you need to use a real mobile number registered with a [TrueMoney account](https://www.truemoney.com). If you are encountering issues with testing TrueMoney payments, contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other). Check the status of TrueMoney test payments in your [Customer Area](https://ca-test.adyen.com/) > **Payments** > **Payment list**. Before you can accept live TrueMoney payments, you need to submit a request for TrueMoney in your [live Customer Area](https://ca-live.adyen.com/). ## See also * [iOS Components integration guide](https://docs.adyen.com/online-payments/build-your-integration/sessions-flow?platform=iOS\&integration=Components) * [Webhooks](https://docs.adyen.com/development-resources/webhooks) * [API Explorer](https://docs.adyen.com/api-explorer/Checkout/latest/overview)