> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.mangopay.com/api-reference/google-pay/create-google-pay-payin/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mangopay.com/_mcp/server. # Create a Google Pay PayIn POST https://api.sandbox.mangopay.com/v2.01/{ClientId}/payins/payment-methods/googlepay Content-Type: application/json Create a Google Pay PayIn Reference: https://docs.mangopay.com/api-reference/google-pay/create-google-pay-payin ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. If your platform is using a [proxy](/guides/sca/proxy-management) to take SCA-triggering action on behalf of users, you also need to integrate [mTLS authentication](/guides/sca/platform) and use the `api-mtls` base URL. ## Servers - `https://api.sandbox.mangopay.com` (Sandbox, default) - `https://api.mangopay.com` (Production) - `https://api-mtls.sandbox.mangopay.com` (mTLS Sandbox) - `https://api-mtls.mangopay.com` (mTLS Production) ## Request ### Path parameters - `ClientId` (string, required) — Platform's API account identifier, associated with the API key. ### Body (application/json) This endpoint expects a CreateAGooglePayPayInRequest. - `AuthorId` (string, required) — The unique identifier of the user at the source of the transaction. - `CreditedWalletId` (string, required) — The unique identifier of the credited wallet. - `DebitedFunds` (CreateAGooglePayPayInRequestDebitedFunds, required) — Information about the debited funds. - `Fees` (CreateAGooglePayPayInRequestFees, required) — Information about the fees. - `IpAddress` (string, required) — The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. - `SecureModeReturnURL` (string, required) — Max. length: 255 characters The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`). - `BrowserInfo` (BrowserInfo, required) — Information about the browser used by the end user (author) to perform the payment. - `PaymentData` (string, required) — The data returned by Google Pay containing information about the payment. - `FlowDescriptor` (FlowDescriptorRequest, optional) — Information about the Owner beneficiaries targeted by the pay-in and its subsequent transfers, who must all be KYC/KYB verified when the pay-in request is made ([read more](/guides/payin-beneficiaries)). If the `FlowDescriptor.Beneficiaries` is sent in the API request, then: - The transaction's `CreditedWalletId` holder is disregarded in KYC/KYB checks. - **ALL** `UserId` values in the array must be one of: - `OWNER` whose `KYCLevel` is `REGULAR` - `PLATFORM` The pay-in `Status` becomes `FAILED` with `ResultCode` [002951](/errors/codes/002951) if at least one `FlowDescriptor.Beneficiaries.UserId` is: - `PAYER` - `OWNER` whose `KYCLevel` is `LIGHT` If the `FlowDescriptor.Beneficiaries` is not sent in the API request, then the `CreditedWalletId` holder is subject to KYC/KYB checks. This property is optional for backwards compatibility but is recommended for all pay-in flows, even when the `CreditedWalletId` holder is a `PAYER` or the same value as one of the `FlowDescriptor.Beneficiaries`. - `StatementDescriptor` (string, optional) — Max. length: 22 characters; only alphanumeric and spaces Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. - `Tag` (string, optional) — Max. length: 255 characters Custom data that you can add to this object, such as unique identifiers in your system. To store multiple values, you can serialize them into a single string, for example a JSON object: `"{\"id_1\":AB123,\"id_2\":DE456}"`. - `SecureMode` (string, optional) — **Allowed values:** `DEFAULT`, `FORCE`, `NO_CHOICE` **Default value:** `DEFAULT` The mode applied for the 3DS2 protocol for CB, Visa, and Mastercard. The options are: - `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer. - `FORCE` – Requests SCA. - `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA. - `Billing` (Billing_DefaultsShippingUser_Request, optional) — **Default values:** `FirstName`, `LastName`, and `Address` information of the `Shipping` object if sent, otherwise of the `AuthorId` (if address values present). Information about the billing address. - `Shipping` (Shipping_DefaultsBillingUser_Request, optional) — **Default values:** `FirstName`, `LastName`, and `Address` information of the `Billing` object if sent, otherwise of the `AuthorId` (if address values present). Information about the shipping address. - `ProfilingAttemptReference` (string, optional) — The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information. ## Response ### 200 Success - `Id` (string, optional) — Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details) The unique identifier of the object. - `Tag` (string, optional) — Max. length: 255 characters Custom data that you can add to this object, such as unique identifiers in your system. To store multiple values, you can serialize them into a single string, for example a JSON object: `"{\"id_1\":AB123,\"id_2\":DE456}"`. - `CreationDate` (integer, optional) — Unix timestamp (UTC) of the date and time the object was created. - `AuthorId` (string, optional) — The unique identifier of the user at the source of the transaction. - `FlowDescriptor` (FlowDescriptorResponse, optional) — Information about the Owner beneficiaries targeted by the pay-in and its subsequent transfers, who must all be KYC/KYB verified when the pay-in request is made ([read more](/guides/payin-beneficiaries)). If the `FlowDescriptor.Beneficiaries` is sent in the API request, then: - The transaction's `CreditedWalletId` holder is disregarded in KYC/KYB checks. - **ALL** `UserId` values in the array must be one of: - `OWNER` whose `KYCLevel` is `REGULAR` - `PLATFORM` The pay-in `Status` becomes `FAILED` with `ResultCode` [002951](/errors/codes/002951) if at least one `FlowDescriptor.Beneficiaries.UserId` is: - `PAYER` - `OWNER` whose `KYCLevel` is `LIGHT` If the `FlowDescriptor.Beneficiaries` is not sent in the API request, then the `CreditedWalletId` holder is subject to KYC/KYB checks. This property is optional for backwards compatibility but is recommended for all pay-in flows, even when the `CreditedWalletId` holder is a `PAYER` or the same value as one of the `FlowDescriptor.Beneficiaries`. - `DebitedFunds` (GooglePayPayInResponseDebitedFunds, optional) — Information about the debited funds. - `CreditedFunds` (GooglePayPayInResponseCreditedFunds, optional) — Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). - `Fees` (GooglePayPayInResponseFees, optional) — Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). - `Status` (string, optional) — **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the transaction. - `ResultCode` (string, optional) — The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes. - `ResultMessage` (string, optional) — The explanation of the result code. - `ExecutionDate` (integer, optional) — Unix timestamp (UTC) of the date and time the status changed to `SUCCEEDED`, indicating that the transaction occurred. The statuses `CREATED` and `FAILED` return an `ExecutionDate` of `null`. - `Type` (string, optional) — **Returned values:** `PAYIN`, `TRANSFER`, `CONVERSION`, `PAYOUT` The type of the transaction. - `Nature` (string, optional) — **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the transaction, providing more information about the context in which the transaction occurred: - `REGULAR` – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. - `REPUDIATION` – Automatic withdrawal of funds from the platform's repudiation wallet as part of the dispute process (when the user has requested a chargeback). - `REFUND` – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). - `SETTLEMENT` – Transfer made to the repudiation wallet by the platform to settle a lost dispute. - `CreditedWalletId` (string, optional) — The unique identifier of the credited wallet. - `PaymentType` (string, optional) — **Returned values:** `GOOGLE_PAY` The payment type of the pay-in. - `ExecutionType` (string, optional) — **Returned values:** `DIRECT` The execution type of the pay-in. - `StatementDescriptor` (string, optional) — Max. length: 22 characters; only alphanumeric and spaces Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details. - `SecureModeNeeded` (boolean, optional) — Whether or not the `SecureMode` was used. - `Billing` (Billing_DefaultsShippingUser_Response, optional) — **Default values:** `FirstName`, `LastName`, and `Address` information of the `Shipping` object if sent, otherwise of the `AuthorId` (if address values present). Information about the billing address. - `Shipping` (Shipping_DefaultsBillingUser_Response, optional) — **Default values:** `FirstName`, `LastName`, and `Address` information of the `Billing` object if sent, otherwise of the `AuthorId` (if address values present). Information about the shipping address. - `BrowserInfo` (BrowserInfo, optional) — Information about the browser used by the end user (author) to perform the payment. - `IpAddress` (string, optional) — The IP address of the end user initiating the transaction, in IPV4 or IPV6 format. - `CardInfo` (CardInfo, optional) — Information about the card used for the transaction. If the information or data is not available, `null` is returned. - `AuthenticationResult` (AuthenticationResult, optional) — Information about the authentication result, based on the request made by Mangopay and the decision of the issuer regarding the type of authentication to be enforced (if applicable). ## Types ### CreateAGooglePayPayInRequestDebitedFunds Information about the debited funds. - `Currency` (string, required) — **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the amount. - `Amount` (integer, required) — The amount of the currency in its minor unit. For example, EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`. ### CreateAGooglePayPayInRequestFees Information about the fees. - `Currency` (string, optional) — **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the amount. - `Amount` (integer, optional) — The amount of the currency in its minor unit. For example, EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`. ### BrowserInfo Information about the browser used by the end user (author) to perform the payment. - `AcceptHeader` (string, required) — The exact content of the HTTP accept headers as sent to the platform from the end user's browser. - `JavaEnabled` (boolean, required) — Whether or not the end user's browser has the ability to execute Java. - `Language` (string, required) — Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`) The language of the browser. - `ColorDepth` (integer, required) — The value representing the depth of the screen's color palette for displaying images, in bits per pixel. - `ScreenHeight` (integer, required) — The height of the screen in pixels. - `ScreenWidth` (integer, required) — The width of the screen in pixels. - `TimeZoneOffset` (integer, required) — The difference in minutes between the browser's timezone and UTC. - `UserAgent` (string, required) — The exact content of the HTTP User-Agent header. - `JavascriptEnabled` (boolean, required) — Whether or not the end user's browser has the ability to execute JavaScript. ### FlowDescriptorRequest Information about the Owner beneficiaries targeted by the pay-in and its subsequent transfers, who must all be KYC/KYB verified when the pay-in request is made ([read more](/guides/payin-beneficiaries)). If the `FlowDescriptor.Beneficiaries` is sent in the API request, then: - The transaction's `CreditedWalletId` holder is disregarded in KYC/KYB checks. - **ALL** `UserId` values in the array must be one of: - `OWNER` whose `KYCLevel` is `REGULAR` - `PLATFORM` The pay-in `Status` becomes `FAILED` with `ResultCode` [002951](/errors/codes/002951) if at least one `FlowDescriptor.Beneficiaries.UserId` is: - `PAYER` - `OWNER` whose `KYCLevel` is `LIGHT` If the `FlowDescriptor.Beneficiaries` is not sent in the API request, then the `CreditedWalletId` holder is subject to KYC/KYB checks. This property is optional for backwards compatibility but is recommended for all pay-in flows, even when the `CreditedWalletId` holder is a `PAYER` or the same value as one of the `FlowDescriptor.Beneficiaries`. - `Beneficiaries` (list of FlowDescriptorRequestBeneficiariesItems, optional, nullable) — Max. length: 5 items The list of up to 5 Natural or Legal Users declared as beneficiaries of the pay-in and its subsequent transfers, who must all be KYC/KYB verified when the pay-in request is made. The pay-in also fails if the `Beneficiaries` array contains nulled objects or invalid `UserId` values. ### Billing_DefaultsShippingUser_Request **Default values:** `FirstName`, `LastName`, and `Address` information of the `Shipping` object if sent, otherwise of the `AuthorId` (if address values present). Information about the billing address. - `FirstName` (string, optional) — The first name of the user. - `LastName` (string, optional) — The last name of the user. - `Address` (Address_SubPropsRequired, optional) — The postal address. ### Shipping_DefaultsBillingUser_Request **Default values:** `FirstName`, `LastName`, and `Address` information of the `Billing` object if sent, otherwise of the `AuthorId` (if address values present). Information about the shipping address. - `FirstName` (string, optional) — The first name of the user. - `LastName` (string, optional) — The last name of the user. - `Address` (Address_SubPropsRequired, optional) — The postal address. ### FlowDescriptorResponse Information about the Owner beneficiaries targeted by the pay-in and its subsequent transfers, who must all be KYC/KYB verified when the pay-in request is made ([read more](/guides/payin-beneficiaries)). If the `FlowDescriptor.Beneficiaries` is sent in the API request, then: - The transaction's `CreditedWalletId` holder is disregarded in KYC/KYB checks. - **ALL** `UserId` values in the array must be one of: - `OWNER` whose `KYCLevel` is `REGULAR` - `PLATFORM` The pay-in `Status` becomes `FAILED` with `ResultCode` [002951](/errors/codes/002951) if at least one `FlowDescriptor.Beneficiaries.UserId` is: - `PAYER` - `OWNER` whose `KYCLevel` is `LIGHT` If the `FlowDescriptor.Beneficiaries` is not sent in the API request, then the `CreditedWalletId` holder is subject to KYC/KYB checks. This property is optional for backwards compatibility but is recommended for all pay-in flows, even when the `CreditedWalletId` holder is a `PAYER` or the same value as one of the `FlowDescriptor.Beneficiaries`. - `FlowId` (string, optional) — Unique identifier of the payment flow, used by Mangopay for internal purposes. - `Beneficiaries` (list of FlowDescriptorResponseBeneficiariesItems, optional, nullable) — Max. length: 5 items The list of up to 5 Natural or Legal Users declared as beneficiaries of the pay-in, who must all be KYC/KYB verified when the pay-in request is made. The pay-in also fails if the `Beneficiaries` array contains nulled objects or invalid `UserId` values. ### GooglePayPayInResponseDebitedFunds Information about the debited funds. - `Currency` (string, optional) — **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the amount. - `Amount` (integer, optional) — The amount of the currency in its minor unit. For example, EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`. ### GooglePayPayInResponseCreditedFunds Information about the credited funds (`CreditedFunds` = `DebitedFunds` - `Fees`). - `Currency` (string, optional) — **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the amount. - `Amount` (integer, optional) — The amount of the currency in its minor unit. For example, EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`. ### GooglePayPayInResponseFees Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet). - `Currency` (string, optional) — **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the amount. - `Amount` (integer, optional) — The amount of the currency in its minor unit. For example, EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`. ### Billing_DefaultsShippingUser_Response **Default values:** `FirstName`, `LastName`, and `Address` information of the `Shipping` object if sent, otherwise of the `AuthorId` (if address values present). Information about the billing address. - `FirstName` (string, optional) — The first name of the user. - `LastName` (string, optional) — The last name of the user. - `Address` (Address, optional) — The postal address. ### Shipping_DefaultsBillingUser_Response **Default values:** `FirstName`, `LastName`, and `Address` information of the `Billing` object if sent, otherwise of the `AuthorId` (if address values present). Information about the shipping address. - `FirstName` (string, optional) — The first name of the user. - `LastName` (string, optional) — The last name of the user. - `Address` (Address_SubPropsRequired, optional) — The postal address. ### CardInfo Information about the card used for the transaction. If the information or data is not available, `null` is returned. - `BIN` (string, optional) — The bank identification number (BIN) of the card. - `IssuingBank` (string, optional) — The name of the bank that issued the card. - `IssuerCountryCode` (string, optional) — The country code of the card issuer. - `Type` (string, optional) — The type of card (for example, `CREDIT` or `DEBIT`). - `SubType` (string, optional, nullable) — The sub-type of the card, if available. - `Brand` (string, optional) — The card brand (for example, `VISA` or `MASTERCARD`). ### AuthenticationResult Information about the authentication result, based on the request made by Mangopay and the decision of the issuer regarding the type of authentication to be enforced (if applicable). - `AuthenticationType` (string, optional, nullable) — **Returned values:** `CHALLENGE`, `FRICTIONLESS`, `DIRECT_AUTHORIZATION` The type of authentication: - `CHALLENGE` – The issuer requested SCA to be enforced (for example, using 3DS). - `FRICTIONLESS` – The transaction was exempted from SCA because an exemption was granted by the issuer. - `DIRECT_AUTHORIZATION` – The transaction was sent to the issuer for authorization without any frictionless or challenge (for example, if SCA doesn't apply). A `null` value typically indicates that authentication was not requested (for example, because the request failed before being sent) or a decision was not received. A `null` value typically indicates that authentication was not requested (for example, because the request failed before being sent) or a decision was not received. ### FlowDescriptorRequestBeneficiariesItems - `UserId` (string, optional) — The unique identifier of the Natural User or Legal User declared as a beneficiary of the pay-in. ### Address_SubPropsRequired The postal address. - `AddressLine1` (string, required) — The first line of the address. - `City` (string, required) — The city of the address. - `PostalCode` (string, required) — The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. - `Country` (string, required) — Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats)) The country of the address. - `AddressLine2` (string, optional) — The second line of the address. - `Region` (string, optional) — Required if `Country` is US, CA, or MX. The region of the address. ### FlowDescriptorResponseBeneficiariesItems - `UserId` (string, optional) — The unique identifier of the Natural User or Legal User declared as a beneficiary of the pay-in. ### Address The postal address. - `AddressLine1` (string, optional) — The first line of the address. - `AddressLine2` (string, optional) — The second line of the address. - `City` (string, optional) — The city of the address. - `Region` (string, optional) — Required if `Country` is US, CA, or MX. The region of the address. - `PostalCode` (string, optional) — The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces. - `Country` (string, optional) — Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats)) The country of the address. ## Examples ### Succeeded (3DS not required) **Request** ```json { "body": { "AuthorId": "6697855", "Billing": { "Address": { "AddressLine1": "The Oasis", "AddressLine2": "Rue des Plantes", "City": "Paris", "Country": "FR", "PostalCode": "75001", "Region": "Ile de France" }, "FirstName": "Arthur", "LastName": "Doe" }, "BrowserInfo": { "AcceptHeader": "application/json,text/javascript,*/*;q=0.01<", "ColorDepth": 32, "JavaEnabled": true, "JavascriptEnabled": true, "Language": "fr", "ScreenHeight": 667, "ScreenWidth": 375, "TimeZoneOffset": "-120", "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148" }, "CreditedWalletId": "6697856", "DebitedFunds": { "Amount": 1000, "Currency": "EUR" }, "Fees": { "Amount": 0, "Currency": "EUR" }, "FlowDescriptor": { "Beneficiaries": [ { "UserId": "user_m_02APAYTWSDYXHXN1FRTKX9WMA2" } ] }, "IpAddress": "159.180.248.187", "PaymentData": "{\"signature\":\"MEUCIQDc49/Bw1lTk8ok2fUe4UT2q955C01N2av40WJ28pMt0QIgBxiXHZbccHuqEQHyNJJw8SM337fxd8A3kJFqhsf4pHo\\u003d\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8bX5bzBELcoJ1pPhEHtTIhpZQsRgVIMtRf9R5yRyC9c9WH8bvgxIx40qH4aQ+btVM/rwKuDE8cs+dERH2gjUjw\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1688804022772\\\"}\",\"signatures\":[\"MEUCIF2OifAlN5PG+isU+xxX8/OU5MTk81hBulSmp9bu8caDAiEAkdRqb8uo4CUx4kMiA317A1b+5BxRUc/8+QMyc9Ikjfg\\u003d\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"tsTuUpytOkm8ENo1PpyzsHk6jxGDus/sSNQwqZeoPNw/NMQX2LJxJ6OTS4Yt+iNM7v4iuFC0eUWiy58xCQHKANeO/y66GJWMaDjPW2FBqBksb1WHXxP5KmgglACSqXtOMmjuYxVT6MeO4EfdsT4vGHRP0adP+Lkfj1tfjM1K0HyRWbLcwU9YXU0j83wV3PW28oxdFY5F4DC+Bhk7J5bZhIf5jymRXy3sR0kDoE/Qi4fUIdvgoHzi6MvppxCaEgwCygvfxu+vddP/7dshnL9+OFaDpoAp6is8I4UYbscNHkLosfBPwyUtndLMkDfNKUJ3yus92KSfbcK0iif3kXSMmV6ZrN873S7f27bsCsHhAlywOFpACorBNO8FzX/ediCsSi+n5kWOxe9oewGOeME2RNTsoy8an23be8yTek3YKajIhJRFW/9OtVnNmKOqwgw0F8nPFTjuSVPZbkinYS46Tr+KjOcr5aznEElkmk6OWgX1xSVkHZPpoW8XZdhB6Vs/5eWP6URncDZYN2EWtpWuz1+CAVKEjD95gcQGvzhmlPB0duiV76psDik8ojf2B6QfPJxV\\\",\\\"ephemeralPublicKey\\\":\\\"BJ0QIVwltj1vH2NAmYgUYBRrNymcOtTTP3QJnSc+enFGigIhNS87PZyA0PZ4iT/tifOqBj6barpJMwSQeO3nbJ0\\\\u003d\\\",\\\"tag\\\":\\\"R0iTOk4bogyVkf0STTvdiFq4kebJS7GN5/zxoBuCNNs\\\\u003d\\\"}\"}", "ReturnURL": "http://example.com", "SecureMode": "DEFAULT", "SecureModeReturnURL": "http://example.com", "Shipping": { "Address": { "AddressLine1": "The Oasis", "AddressLine2": "Rue des Plantes", "City": "Paris", "Country": "FR", "PostalCode": "2345", "Region": "Ile de France" }, "FirstName": "John", "LastName": "Doe" }, "StatementDescriptor": "Statement", "Tag": "Google Pay PayIn" } } ``` **Response** ```json { "Id": "wt_7607f14c-2929-431c-a989-ea4f48352ead", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1706097560, "AuthorId": "213407540", "FlowDescriptor": { "FlowId": "flow_wt_97448e0a-5bc6-4b83-ac29-cdfcadf60a08", "Beneficiaries": [ { "UserId": "user_m_02APAYTWSDYXHXN1FRTKX9WMA2" } ] }, "DebitedFunds": { "Currency": "EUR", "Amount": 100 }, "CreditedFunds": { "Currency": "EUR", "Amount": 100 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "SUCCEEDED", "ResultCode": "000000", "ResultMessage": "Success", "ExecutionDate": 1706097562, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "213407543", "PaymentType": "GOOGLE_PAY", "ExecutionType": "DIRECT", "StatementDescriptor": "Mangopay", "SecureModeNeeded": false, "BrowserInfo": { "AcceptHeader": "application/json,text/javascript,*/*;q=0.01<", "JavaEnabled": true, "Language": "fr", "ColorDepth": 32, "ScreenHeight": 667, "ScreenWidth": 375, "TimeZoneOffset": -120, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "ddcd:543d:1cd4:a9e4:7a29:6cd1:93b6:772d", "CardInfo": { "BIN": "555555", "IssuingBank": "CIAGROUP", "IssuerCountryCode": "BR", "Type": "DEBIT", "SubType": "PREPAID", "Brand": "MASTERCARD" }, "AuthenticationResult": { "AuthenticationType": "FRICTIONLESS" }, "CreditedUserId": "213407540", "SecureMode": "DEFAULT", "SecureModeRedirectURL": null, "SecureModeReturnURL": "http://example.com", "SecurityInfo": null } ``` **SDK Code** ```python Succeeded (3DS not required) from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, GooglepayPayIn from mangopay.utils import BrowserInfo, Money natural_user = NaturalUser.get('210513027') google_pay_payin = GooglepayPayIn( author_id = natural_user.id, credited_wallet_id = '210514820', debited_funds = Money(amount=200, currency='EUR'), fees = Money(amount=50, currency='EUR'), ip_addres = '159.180.248.187', secure_mode_return_url = 'https://docs.mangopay.com/please-ignore', browser_info = BrowserInfo( user_agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', screen_width = 375, screen_height = 667, color_depth = 32, language = 'EN', accept_header = 'application/json,text/javascript,*/*;q=0.01<', timezone_offset = '-120', java_enabled = True, javascript_enabled = True ), payment_data = '{\"signature\":\"your-payment-data"}\"}', tag = 'Created using Mangopay Python SDK' ) create_google_pay_payin = google_pay_payin.save() pprint(create_google_pay_payin) ``` ```java Succeeded (3DS not required) import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.PayInExecutionType; import com.mangopay.core.enumerations.PayInPaymentType; import com.mangopay.entities.PayIn; import com.mangopay.entities.subentities.BrowserInfo; import com.mangopay.entities.subentities.PayInExecutionDetailsDirect; import com.mangopay.entities.subentities.PayInPaymentDetailsGooglePayV2; public class CreateGooglePayPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var walletId = "wlt_m_01HTHTXEF4BJCTKMXNWMSZ6KP5"; String paymentData = "{\"signature\":\"MEUCIEMVk9qrfoJ/ku5qvHCZuv9zPC1QVH6NMMrkZ6wLmt8FAiEAjNduo5gvMGE4KgTeTIuwevdvxJdkQP03ru9lp/5rKhk\\u003d\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEC1gn5CSvw/UxS9+PCVhgPWNTMGxTBUHpenGNWirrNlmi5bJts3FO92DjcUQmLaCmM1hQwtZ9KCzkc0SGh99X4A\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1694758343052\\\"}\",\"signatures\":[\"MEUCIG+oaBGEl63CqCy+C7OwQCFvr/K9cSYWtQ/ku2UejCTKAiEAnhJ1LXd+JMMvueEorp0Kha922H9wRMR6tPvnGIZ6cM4\\u003d\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"HmCQdP5BOdsv33ACkGyYJYKFHEnxRbe+TTaTI79tJm/v8NP4XH5Iim9H/a1jj2OmZTgQDklZ6pv1v6XNjKkkaEMPW1MZbtZ2P8GcwAWRKKJx8W4ZmDexb564GP8EvLw4dGzlYE8L5nY7khunPZKAfioQGmNSTIBpB1MLRtgArGA9T/w3EcjU1+gdGAce7NpcZeVIrIX4tNLL5TlpGdAHRU5XNlA/q0HcuvKpmgCfpnSJKu1xPO8Xzoa7C7toX6GmmGlkdhH0Y+vK+mKFpI02uGItSPR64vaZYFD7qPMzXOsp7KjyGw1Tr6fx0Qrmc3CeDcZ3Dzc/WVbM0jw1gMz/gjnZ7KILoqMNxcEz1h8rkLp7FHjCNlls0i6VYNINWWl1PMqHTDBsTsHVdYJlAqycoBJTssHy44ASBIF8epBw3oAydhFV4ZkeLPX/x+QlrS+IEi3af8xj//nhtZ5CwwW5IOuMF0sqAa0PcRVpgw9BrQSXNprymtatS3qtwRrL0LHJsIii+xSI5XY4dfy6Z6j1QCvWriCwfbS9TasvbMb6dbh0S6sS5XBHd5wp/FtHfYBAh9iK08DQ8uKcKfnZx4zmvU5TsSTTbrj/SEFJiJ3rBegIweEpYM3m1QifErNAVhBIpm67tg\\\\u003d\\\\u003d\\\",\\\"ephemeralPublicKey\\\":\\\"BCr5xXtNJMkCYutxBQi8sQBHllG4RcSrxalvi0bf23Jwvyr46OwNGfMe45518pxNzPC8yPUXrGTbKXoQeJR16Ew\\\\u003d\\\",\\\"tag\\\":\\\"5W+s9OGQTFEojaZ5K3ynKuUVninxOVep9pkmqI/+ed4\\\\u003d\\\"}\"}"; PayInPaymentDetailsGooglePayV2 paymentDetails = new PayInPaymentDetailsGooglePayV2(); paymentDetails.setIpAddress("127.0.0.1"); paymentDetails.setBrowserInfo(new BrowserInfo()); paymentDetails.getBrowserInfo().setAcceptHeader("text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8"); paymentDetails.getBrowserInfo().setJavaEnabled(true); paymentDetails.getBrowserInfo().setLanguage("EN"); paymentDetails.getBrowserInfo().setColorDepth(4); paymentDetails.getBrowserInfo().setScreenHeight(1800); paymentDetails.getBrowserInfo().setScreenWidth(400); paymentDetails.getBrowserInfo().setTimeZoneOffset("60"); paymentDetails.getBrowserInfo().setUserAgent("Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"); paymentDetails.getBrowserInfo().setJavascriptEnabled(true); paymentDetails.setPaymentData(paymentData); PayInExecutionDetailsDirect executionDetails = new PayInExecutionDetailsDirect(); executionDetails.setSecureModeReturnUrl("https://docs.mangopay.com/please-ignore"); PayIn googlePayIn = new PayIn(); googlePayIn.setAuthorId(userId); googlePayIn.setCreditedWalletId(walletId); googlePayIn.setDebitedFunds(new Money(CurrencyIso.EUR, 1000)); googlePayIn.setFees(new Money(CurrencyIso.EUR, 0)); googlePayIn.setPaymentType(PayInPaymentType.GOOGLEPAY); googlePayIn.setExecutionType(PayInExecutionType.DIRECT); googlePayIn.setPaymentDetails(paymentDetails); googlePayIn.setExecutionDetails(executionDetails); googlePayIn.setTag("Created using the Mangopay Java SDK"); PayIn createGooglePayPayIn = mangopay.getPayInApi().create(googlePayIn); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createGooglePayPayIn); System.out.println(prettyJson); } } ``` ```csharp Succeeded (3DS not required) using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var returnUrl = "https://www.mangopay.com/docs/please-ignore/"; var secureModeReturnUrl = "https://www.mangopay.com/docs/please-ignore/"; var paymentData = "{\"signature\":\"MEUCIQDc49/Bw1lTk8ok2fUe4UT2q955C01N2av40WJ28pMt0QIgBxiXHZbccHuqEQHyNJJw8SM337fxd8A3kJFqhsf4pHo\\u003d\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8bX5bzBELcoJ1pPhEHtTIhpZQsRgVIMtRf9R5yRyC9c9WH8bvgxIx40qH4aQ+btVM/rwKuDE8cs+dERH2gjUjw\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1688804022772\\\"}\",\"signatures\":[\"MEUCIF2OifAlN5PG+isU+xxX8/OU5MTk81hBulSmp9bu8caDAiEAkdRqb8uo4CUx4kMiA317A1b+5BxRUc/8+QMyc9Ikjfg\\u003d\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"tsTuUpytOkm8ENo1PpyzsHk6jxGDus/sSNQwqZeoPNw/NMQX2LJxJ6OTS4Yt+iNM7v4iuFC0eUWiy58xCQHKANeO/y66GJWMaDjPW2FBqBksb1WHXxP5KmgglACSqXtOMmjuYxVT6MeO4EfdsT4vGHRP0adP+Lkfj1tfjM1K0HyRWbLcwU9YXU0j83wV3PW28oxdFY5F4DC+Bhk7J5bZhIf5jymRXy3sR0kDoE/Qi4fUIdvgoHzi6MvppxCaEgwCygvfxu+vddP/7dshnL9+OFaDpoAp6is8I4UYbscNHkLosfBPwyUtndLMkDfNKUJ3yus92KSfbcK0iif3kXSMmV6ZrN873S7f27bsCsHhAlywOFpACorBNO8FzX/ediCsSi+n5kWOxe9oewGOeME2RNTsoy8an23be8yTek3YKajIhJRFW/9OtVnNmKOqwgw0F8nPFTjuSVPZbkinYS46Tr+KjOcr5aznEElkmk6OWgX1xSVkHZPpoW8XZdhB6Vs/5eWP6URncDZYN2EWtpWuz1+CAVKEjD95gcQGvzhmlPB0duiV76psDik8ojf2B6QfPJxV\\\",\\\"ephemeralPublicKey\\\":\\\"BJ0QIVwltj1vH2NAmYgUYBRrNymcOtTTP3QJnSc+enFGigIhNS87PZyA0PZ4iT/tifOqBj6barpJMwSQeO3nbJ0\\\\u003d\\\",\\\"tag\\\":\\\"R0iTOk4bogyVkf0STTvdiFq4kebJS7GN5/zxoBuCNNs\\\\u003d\\\"}\"}"; var ipAddress = "2001:0620:0000:0000:0211:24FF:FE80:C12C"; var browserInfo = new BrowserInfo { AcceptHeader = "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", JavaEnabled = true, Language = "FR-FR", ColorDepth = 4, ScreenHeight = 1800, ScreenWidth = 400, JavascriptEnabled = true, TimeZoneOffset = "+60", UserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148" }; var billing = new Billing { FirstName = "Joe", LastName = "Blogs", Address = new Address { AddressLine1 = "1 MangoPay Street", AddressLine2 = "The Loop", City = "Paris", Region = "Ile de France", PostalCode = "75001", Country = CountryIso.FR } }; var shipping = new Shipping { FirstName = "Joe", LastName = "Blogs", Address = new Address { AddressLine1 = "1 MangoPay Street", AddressLine2 = "The Loop", City = "Paris", Region = "Ile de France", PostalCode = "75001", Country = CountryIso.FR } }; var payIn = new PayInGooglePayDirectPostDTO(userId, new Money { Amount = 2000, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, walletId, returnUrl, secureModeReturnUrl, ipAddress, browserInfo, paymentData, SecureMode.DEFAULT, billing, shipping, "MGP") { Tag = "Created using the Mangopay .NET SDK" }; var createGooglePayPayIn = await api.PayIns.CreateGooglePayDirectV2Async(payIn); string prettyPrint = JsonConvert.SerializeObject(createGooglePayPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` ### Created (3DS required) **Request** ```json { "body": { "AuthorId": "6697855", "Billing": { "Address": { "AddressLine1": "The Oasis", "AddressLine2": "Rue des Plantes", "City": "Paris", "Country": "FR", "PostalCode": "75001", "Region": "Ile de France" }, "FirstName": "Arthur", "LastName": "Doe" }, "BrowserInfo": { "AcceptHeader": "application/json,text/javascript,*/*;q=0.01<", "ColorDepth": 32, "JavaEnabled": true, "JavascriptEnabled": true, "Language": "fr", "ScreenHeight": 667, "ScreenWidth": 375, "TimeZoneOffset": "-120", "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148" }, "CreditedWalletId": "6697856", "DebitedFunds": { "Amount": 1000, "Currency": "EUR" }, "Fees": { "Amount": 0, "Currency": "EUR" }, "FlowDescriptor": { "Beneficiaries": [ { "UserId": "user_m_02APAYTWSDYXHXN1FRTKX9WMA2" } ] }, "IpAddress": "159.180.248.187", "PaymentData": "{\"signature\":\"MEUCIQDc49/Bw1lTk8ok2fUe4UT2q955C01N2av40WJ28pMt0QIgBxiXHZbccHuqEQHyNJJw8SM337fxd8A3kJFqhsf4pHo\\u003d\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8bX5bzBELcoJ1pPhEHtTIhpZQsRgVIMtRf9R5yRyC9c9WH8bvgxIx40qH4aQ+btVM/rwKuDE8cs+dERH2gjUjw\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1688804022772\\\"}\",\"signatures\":[\"MEUCIF2OifAlN5PG+isU+xxX8/OU5MTk81hBulSmp9bu8caDAiEAkdRqb8uo4CUx4kMiA317A1b+5BxRUc/8+QMyc9Ikjfg\\u003d\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"tsTuUpytOkm8ENo1PpyzsHk6jxGDus/sSNQwqZeoPNw/NMQX2LJxJ6OTS4Yt+iNM7v4iuFC0eUWiy58xCQHKANeO/y66GJWMaDjPW2FBqBksb1WHXxP5KmgglACSqXtOMmjuYxVT6MeO4EfdsT4vGHRP0adP+Lkfj1tfjM1K0HyRWbLcwU9YXU0j83wV3PW28oxdFY5F4DC+Bhk7J5bZhIf5jymRXy3sR0kDoE/Qi4fUIdvgoHzi6MvppxCaEgwCygvfxu+vddP/7dshnL9+OFaDpoAp6is8I4UYbscNHkLosfBPwyUtndLMkDfNKUJ3yus92KSfbcK0iif3kXSMmV6ZrN873S7f27bsCsHhAlywOFpACorBNO8FzX/ediCsSi+n5kWOxe9oewGOeME2RNTsoy8an23be8yTek3YKajIhJRFW/9OtVnNmKOqwgw0F8nPFTjuSVPZbkinYS46Tr+KjOcr5aznEElkmk6OWgX1xSVkHZPpoW8XZdhB6Vs/5eWP6URncDZYN2EWtpWuz1+CAVKEjD95gcQGvzhmlPB0duiV76psDik8ojf2B6QfPJxV\\\",\\\"ephemeralPublicKey\\\":\\\"BJ0QIVwltj1vH2NAmYgUYBRrNymcOtTTP3QJnSc+enFGigIhNS87PZyA0PZ4iT/tifOqBj6barpJMwSQeO3nbJ0\\\\u003d\\\",\\\"tag\\\":\\\"R0iTOk4bogyVkf0STTvdiFq4kebJS7GN5/zxoBuCNNs\\\\u003d\\\"}\"}", "ReturnURL": "http://example.com", "SecureMode": "DEFAULT", "SecureModeReturnURL": "http://example.com", "Shipping": { "Address": { "AddressLine1": "The Oasis", "AddressLine2": "Rue des Plantes", "City": "Paris", "Country": "FR", "PostalCode": "2345", "Region": "Ile de France" }, "FirstName": "John", "LastName": "Doe" }, "StatementDescriptor": "Statement", "Tag": "Google Pay PayIn" } } ``` **Response** ```json { "Id": "wt_794a782f-f6b1-4ba5-8adb-b8004323b31e", "Tag": "Created using the Mangopay API Postman collection", "CreationDate": 1706097653, "AuthorId": "213407540", "FlowDescriptor": { "FlowId": "flow_wt_97448e0a-5bc6-4b83-ac29-cdfcadf60a08", "Beneficiaries": [ { "UserId": "user_m_02APAYTWSDYXHXN1FRTKX9WMA2" } ] }, "DebitedFunds": { "Currency": "EUR", "Amount": 100 }, "CreditedFunds": { "Currency": "EUR", "Amount": 100 }, "Fees": { "Currency": "EUR", "Amount": 0 }, "Status": "CREATED", "ResultCode": null, "ResultMessage": null, "ExecutionDate": null, "Type": "PAYIN", "Nature": "REGULAR", "CreditedWalletId": "213407543", "PaymentType": "GOOGLE_PAY", "ExecutionType": "DIRECT", "StatementDescriptor": "Mangopay", "SecureModeNeeded": true, "BrowserInfo": { "AcceptHeader": "application/json,text/javascript,*/*;q=0.01<", "JavaEnabled": true, "Language": "fr", "ColorDepth": 32, "ScreenHeight": 667, "ScreenWidth": 375, "TimeZoneOffset": -120, "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", "JavascriptEnabled": true }, "IpAddress": "7579:9817:dac3:76c8:23d4:2fcd:94a3:b5be", "CardInfo": { "BIN": "411111", "IssuingBank": "JPMORGAN CHASE BANK, N.A.", "IssuerCountryCode": "US", "Type": "CREDIT", "SubType": null, "Brand": "VISA" }, "AuthenticationResult": { "AuthenticationType": "CHALLENGE" }, "CreditedUserId": "213407540", "SecureMode": "DEFAULT", "SecureModeRedirectURL": "https://api.sandbox.whenthen.co/payment-gateway/monext/3ds/challenge/3a01e913-64d2-4724-a6f9-64ddc3a08d8a/794a782f-f6b1-4ba5-8adb-b8004323b31e", "SecureModeReturnURL": "http://example.com", "SecurityInfo": null } ``` **SDK Code** ```python Created (3DS required) from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, GooglepayPayIn from mangopay.utils import BrowserInfo, Money natural_user = NaturalUser.get('210513027') google_pay_payin = GooglepayPayIn( author_id = natural_user.id, credited_wallet_id = '210514820', debited_funds = Money(amount=200, currency='EUR'), fees = Money(amount=50, currency='EUR'), ip_addres = '159.180.248.187', secure_mode_return_url = 'https://docs.mangopay.com/please-ignore', browser_info = BrowserInfo( user_agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', screen_width = 375, screen_height = 667, color_depth = 32, language = 'EN', accept_header = 'application/json,text/javascript,*/*;q=0.01<', timezone_offset = '-120', java_enabled = True, javascript_enabled = True ), payment_data = '{\"signature\":\"your-payment-data"}\"}', tag = 'Created using Mangopay Python SDK' ) create_google_pay_payin = google_pay_payin.save() pprint(create_google_pay_payin) ``` ```java Created (3DS required) import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.core.enumerations.PayInExecutionType; import com.mangopay.core.enumerations.PayInPaymentType; import com.mangopay.entities.PayIn; import com.mangopay.entities.subentities.BrowserInfo; import com.mangopay.entities.subentities.PayInExecutionDetailsDirect; import com.mangopay.entities.subentities.PayInPaymentDetailsGooglePayV2; public class CreateGooglePayPayIn { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT"; var walletId = "wlt_m_01HTHTXEF4BJCTKMXNWMSZ6KP5"; String paymentData = "{\"signature\":\"MEUCIEMVk9qrfoJ/ku5qvHCZuv9zPC1QVH6NMMrkZ6wLmt8FAiEAjNduo5gvMGE4KgTeTIuwevdvxJdkQP03ru9lp/5rKhk\\u003d\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEC1gn5CSvw/UxS9+PCVhgPWNTMGxTBUHpenGNWirrNlmi5bJts3FO92DjcUQmLaCmM1hQwtZ9KCzkc0SGh99X4A\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1694758343052\\\"}\",\"signatures\":[\"MEUCIG+oaBGEl63CqCy+C7OwQCFvr/K9cSYWtQ/ku2UejCTKAiEAnhJ1LXd+JMMvueEorp0Kha922H9wRMR6tPvnGIZ6cM4\\u003d\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"HmCQdP5BOdsv33ACkGyYJYKFHEnxRbe+TTaTI79tJm/v8NP4XH5Iim9H/a1jj2OmZTgQDklZ6pv1v6XNjKkkaEMPW1MZbtZ2P8GcwAWRKKJx8W4ZmDexb564GP8EvLw4dGzlYE8L5nY7khunPZKAfioQGmNSTIBpB1MLRtgArGA9T/w3EcjU1+gdGAce7NpcZeVIrIX4tNLL5TlpGdAHRU5XNlA/q0HcuvKpmgCfpnSJKu1xPO8Xzoa7C7toX6GmmGlkdhH0Y+vK+mKFpI02uGItSPR64vaZYFD7qPMzXOsp7KjyGw1Tr6fx0Qrmc3CeDcZ3Dzc/WVbM0jw1gMz/gjnZ7KILoqMNxcEz1h8rkLp7FHjCNlls0i6VYNINWWl1PMqHTDBsTsHVdYJlAqycoBJTssHy44ASBIF8epBw3oAydhFV4ZkeLPX/x+QlrS+IEi3af8xj//nhtZ5CwwW5IOuMF0sqAa0PcRVpgw9BrQSXNprymtatS3qtwRrL0LHJsIii+xSI5XY4dfy6Z6j1QCvWriCwfbS9TasvbMb6dbh0S6sS5XBHd5wp/FtHfYBAh9iK08DQ8uKcKfnZx4zmvU5TsSTTbrj/SEFJiJ3rBegIweEpYM3m1QifErNAVhBIpm67tg\\\\u003d\\\\u003d\\\",\\\"ephemeralPublicKey\\\":\\\"BCr5xXtNJMkCYutxBQi8sQBHllG4RcSrxalvi0bf23Jwvyr46OwNGfMe45518pxNzPC8yPUXrGTbKXoQeJR16Ew\\\\u003d\\\",\\\"tag\\\":\\\"5W+s9OGQTFEojaZ5K3ynKuUVninxOVep9pkmqI/+ed4\\\\u003d\\\"}\"}"; PayInPaymentDetailsGooglePayV2 paymentDetails = new PayInPaymentDetailsGooglePayV2(); paymentDetails.setIpAddress("127.0.0.1"); paymentDetails.setBrowserInfo(new BrowserInfo()); paymentDetails.getBrowserInfo().setAcceptHeader("text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8"); paymentDetails.getBrowserInfo().setJavaEnabled(true); paymentDetails.getBrowserInfo().setLanguage("EN"); paymentDetails.getBrowserInfo().setColorDepth(4); paymentDetails.getBrowserInfo().setScreenHeight(1800); paymentDetails.getBrowserInfo().setScreenWidth(400); paymentDetails.getBrowserInfo().setTimeZoneOffset("60"); paymentDetails.getBrowserInfo().setUserAgent("Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"); paymentDetails.getBrowserInfo().setJavascriptEnabled(true); paymentDetails.setPaymentData(paymentData); PayInExecutionDetailsDirect executionDetails = new PayInExecutionDetailsDirect(); executionDetails.setSecureModeReturnUrl("https://docs.mangopay.com/please-ignore"); PayIn googlePayIn = new PayIn(); googlePayIn.setAuthorId(userId); googlePayIn.setCreditedWalletId(walletId); googlePayIn.setDebitedFunds(new Money(CurrencyIso.EUR, 1000)); googlePayIn.setFees(new Money(CurrencyIso.EUR, 0)); googlePayIn.setPaymentType(PayInPaymentType.GOOGLEPAY); googlePayIn.setExecutionType(PayInExecutionType.DIRECT); googlePayIn.setPaymentDetails(paymentDetails); googlePayIn.setExecutionDetails(executionDetails); googlePayIn.setTag("Created using the Mangopay Java SDK"); PayIn createGooglePayPayIn = mangopay.getPayInApi().create(googlePayIn); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(createGooglePayPayIn); System.out.println(prettyJson); } } ``` ```csharp Created (3DS required) using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; using MangoPay.SDK.Entities; using MangoPay.SDK.Entities.POST; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3"; var returnUrl = "https://www.mangopay.com/docs/please-ignore/"; var secureModeReturnUrl = "https://www.mangopay.com/docs/please-ignore/"; var paymentData = "{\"signature\":\"MEUCIQDc49/Bw1lTk8ok2fUe4UT2q955C01N2av40WJ28pMt0QIgBxiXHZbccHuqEQHyNJJw8SM337fxd8A3kJFqhsf4pHo\\u003d\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8bX5bzBELcoJ1pPhEHtTIhpZQsRgVIMtRf9R5yRyC9c9WH8bvgxIx40qH4aQ+btVM/rwKuDE8cs+dERH2gjUjw\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1688804022772\\\"}\",\"signatures\":[\"MEUCIF2OifAlN5PG+isU+xxX8/OU5MTk81hBulSmp9bu8caDAiEAkdRqb8uo4CUx4kMiA317A1b+5BxRUc/8+QMyc9Ikjfg\\u003d\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"tsTuUpytOkm8ENo1PpyzsHk6jxGDus/sSNQwqZeoPNw/NMQX2LJxJ6OTS4Yt+iNM7v4iuFC0eUWiy58xCQHKANeO/y66GJWMaDjPW2FBqBksb1WHXxP5KmgglACSqXtOMmjuYxVT6MeO4EfdsT4vGHRP0adP+Lkfj1tfjM1K0HyRWbLcwU9YXU0j83wV3PW28oxdFY5F4DC+Bhk7J5bZhIf5jymRXy3sR0kDoE/Qi4fUIdvgoHzi6MvppxCaEgwCygvfxu+vddP/7dshnL9+OFaDpoAp6is8I4UYbscNHkLosfBPwyUtndLMkDfNKUJ3yus92KSfbcK0iif3kXSMmV6ZrN873S7f27bsCsHhAlywOFpACorBNO8FzX/ediCsSi+n5kWOxe9oewGOeME2RNTsoy8an23be8yTek3YKajIhJRFW/9OtVnNmKOqwgw0F8nPFTjuSVPZbkinYS46Tr+KjOcr5aznEElkmk6OWgX1xSVkHZPpoW8XZdhB6Vs/5eWP6URncDZYN2EWtpWuz1+CAVKEjD95gcQGvzhmlPB0duiV76psDik8ojf2B6QfPJxV\\\",\\\"ephemeralPublicKey\\\":\\\"BJ0QIVwltj1vH2NAmYgUYBRrNymcOtTTP3QJnSc+enFGigIhNS87PZyA0PZ4iT/tifOqBj6barpJMwSQeO3nbJ0\\\\u003d\\\",\\\"tag\\\":\\\"R0iTOk4bogyVkf0STTvdiFq4kebJS7GN5/zxoBuCNNs\\\\u003d\\\"}\"}"; var ipAddress = "2001:0620:0000:0000:0211:24FF:FE80:C12C"; var browserInfo = new BrowserInfo { AcceptHeader = "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8", JavaEnabled = true, Language = "FR-FR", ColorDepth = 4, ScreenHeight = 1800, ScreenWidth = 400, JavascriptEnabled = true, TimeZoneOffset = "+60", UserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148" }; var billing = new Billing { FirstName = "Joe", LastName = "Blogs", Address = new Address { AddressLine1 = "1 MangoPay Street", AddressLine2 = "The Loop", City = "Paris", Region = "Ile de France", PostalCode = "75001", Country = CountryIso.FR } }; var shipping = new Shipping { FirstName = "Joe", LastName = "Blogs", Address = new Address { AddressLine1 = "1 MangoPay Street", AddressLine2 = "The Loop", City = "Paris", Region = "Ile de France", PostalCode = "75001", Country = CountryIso.FR } }; var payIn = new PayInGooglePayDirectPostDTO(userId, new Money { Amount = 2000, Currency = CurrencyIso.EUR }, new Money { Amount = 0, Currency = CurrencyIso.EUR }, walletId, returnUrl, secureModeReturnUrl, ipAddress, browserInfo, paymentData, SecureMode.DEFAULT, billing, shipping, "MGP") { Tag = "Created using the Mangopay .NET SDK" }; var createGooglePayPayIn = await api.PayIns.CreateGooglePayDirectV2Async(payIn); string prettyPrint = JsonConvert.SerializeObject(createGooglePayPayIn, Formatting.Indented); Console.WriteLine(prettyPrint); } } ```