> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidoc-v1.maniscloud.com/llms.txt.
> For full documentation content, see https://apidoc-v1.maniscloud.com/llms-full.txt.

# Create payin request

POST https://api/v1/payins
Content-Type: application/json

This API initiates a new **PayIn** transaction through a specified Payment Service Provider (PSP). It supports various pay-in types such as **Direct Payin** or **Virtual Account**.

**Request Body:**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `requestId` | string | Yes | A unique request ID specified by the client in the request. |
| `pspId` | string | No | Identifier of the Payment Service Provider (e.g., `nium`, `finmo`). If not provided, auto psp selection will choose the best suited psp based on routing rule |
| `amount` | number | Yes | Amount to be received via PayIn. |
| `currency` | string | Yes | Currency of the transaction (e.g., SGD). |
| `country` | string | Yes | Country code (ISO 3166-1 alpha-2) where the transaction originates (e.g., SG). |
| `paymentType` | string | Yes | Type of PayIn transaction. Supported values: `QR_PAYMENT,` `VIRTUAL_ACCOUNT`. |
| `manisPaymentMethodName` | string | Yes | Name of the Manis payment method (different with psp's payinMethodName), will be used to search for payinMethod |
| `paymentFlow` | string | Yes | Name of the Manis payment flow, will be used to search for payinMethod |
| `virtualAcountId` | string | Required when creating payin with type `VIRTUAL_ACCOUNT` on Finmo | Identifier of virtual account |
| customerId | string | Required when creating payin with type `VIRTUAL_ACCOUNT` on Nium | Unique identifier in Manis of the customer making the PayIn. |

Reference: https://apidoc-v1.maniscloud.com/manis-unified-api-v-1-0/payin/create-payin-request

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /api/v1/payins:
    post:
      operationId: create-payin-request
      summary: Create payin request
      description: >-
        This API initiates a new **PayIn** transaction through a specified
        Payment Service Provider (PSP). It supports various pay-in types such as
        **Direct Payin** or **Virtual Account**.


        **Request Body:**


        | Field | Type | Required | Description |

        | --- | --- | --- | --- |

        | `requestId` | string | Yes | A unique request ID specified by the
        client in the request. |

        | `pspId` | string | No | Identifier of the Payment Service Provider
        (e.g., `nium`, `finmo`). If not provided, auto psp selection will choose
        the best suited psp based on routing rule |

        | `amount` | number | Yes | Amount to be received via PayIn. |

        | `currency` | string | Yes | Currency of the transaction (e.g., SGD). |

        | `country` | string | Yes | Country code (ISO 3166-1 alpha-2) where the
        transaction originates (e.g., SG). |

        | `paymentType` | string | Yes | Type of PayIn transaction. Supported
        values: `QR_PAYMENT,` `VIRTUAL_ACCOUNT`. |

        | `manisPaymentMethodName` | string | Yes | Name of the Manis payment
        method (different with psp's payinMethodName), will be used to search
        for payinMethod |

        | `paymentFlow` | string | Yes | Name of the Manis payment flow, will be
        used to search for payinMethod |

        | `virtualAcountId` | string | Required when creating payin with type
        `VIRTUAL_ACCOUNT` on Finmo | Identifier of virtual account |

        | customerId | string | Required when creating payin with type
        `VIRTUAL_ACCOUNT` on Nium | Unique identifier in Manis of the customer
        making the PayIn. |
      tags:
        - subpackage_payin
      parameters:
        - name: x-secret
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payin_Create payin request_Response_200'
      requestBody:
        content:
          application/json:
            schema:
              type: string
servers:
  - url: https:/
components:
  schemas:
    ApiV1PayinsPostResponsesContentApplicationJsonSchemaPayCodeBankInfo:
      type: object
      properties:
        bankName:
          type: string
        bankAddress:
          type: string
        bankCountry:
          type: string
        accountNumber:
          type: string
      required:
        - bankName
        - bankAddress
        - bankCountry
        - accountNumber
      title: ApiV1PayinsPostResponsesContentApplicationJsonSchemaPayCodeBankInfo
    ApiV1PayinsPostResponsesContentApplicationJsonSchemaPayCodeRoutingInfoItems:
      type: object
      properties:
        routingCode:
          type: string
        routingValue:
          type: string
      required:
        - routingCode
        - routingValue
      title: >-
        ApiV1PayinsPostResponsesContentApplicationJsonSchemaPayCodeRoutingInfoItems
    ApiV1PayinsPostResponsesContentApplicationJsonSchemaPayCode:
      type: object
      properties:
        bankInfo:
          $ref: >-
            #/components/schemas/ApiV1PayinsPostResponsesContentApplicationJsonSchemaPayCodeBankInfo
        routingInfo:
          type: array
          items:
            $ref: >-
              #/components/schemas/ApiV1PayinsPostResponsesContentApplicationJsonSchemaPayCodeRoutingInfoItems
      required:
        - bankInfo
        - routingInfo
      title: ApiV1PayinsPostResponsesContentApplicationJsonSchemaPayCode
    ApiV1PayinsPostResponsesContentApplicationJsonSchemaTransaction:
      type: object
      properties:
        pspId:
          type: string
        amount:
          type: integer
        currency:
          type: string
        createdAt:
          type: string
          format: date-time
        createdBy:
          type: string
        requestId:
          type: string
          format: uuid
        updatedAt:
          type: string
          format: date-time
        updatedBy:
          type: string
        customerId:
          type: string
        merchantId:
          type: string
        webhookUrl:
          type: string
          format: uri
        paymentType:
          type: string
        pspTransactionId:
          type: string
        manisTransactionId:
          type: string
        manisTransactionStatus:
          type: string
      required:
        - pspId
        - amount
        - currency
        - createdAt
        - createdBy
        - requestId
        - updatedAt
        - updatedBy
        - customerId
        - merchantId
        - webhookUrl
        - paymentType
        - pspTransactionId
        - manisTransactionId
        - manisTransactionStatus
      title: ApiV1PayinsPostResponsesContentApplicationJsonSchemaTransaction
    Payin_Create payin request_Response_200:
      type: object
      properties:
        payCode:
          $ref: >-
            #/components/schemas/ApiV1PayinsPostResponsesContentApplicationJsonSchemaPayCode
        createdAt:
          type: string
          format: date-time
        createdBy:
          type: string
        updatedAt:
          type: string
          format: date-time
        updatedBy:
          type: string
        pspPayinId:
          type: string
        transaction:
          $ref: >-
            #/components/schemas/ApiV1PayinsPostResponsesContentApplicationJsonSchemaTransaction
        pspPayinMethod:
          type: string
        manisTransactionId:
          type: string
      required:
        - payCode
        - createdAt
        - createdBy
        - updatedAt
        - updatedBy
        - pspPayinId
        - transaction
        - pspPayinMethod
        - manisTransactionId
      title: Payin_Create payin request_Response_200

```

## SDK Code Examples

```python Create Nium payin request
import requests

url = "https://https/api/v1/payins"

headers = {
    "x-secret": "{{FINMO_MERCHANT_SECRET}}",
    "Content-Type": "application/json"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Create Nium payin request
const url = 'https://https/api/v1/payins';
const options = {
  method: 'POST',
  headers: {'x-secret': '{{FINMO_MERCHANT_SECRET}}', 'Content-Type': 'application/json'},
  body: undefined
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Create Nium payin request
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://https/api/v1/payins"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("x-secret", "{{FINMO_MERCHANT_SECRET}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Create Nium payin request
require 'uri'
require 'net/http'

url = URI("https://https/api/v1/payins")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-secret"] = '{{FINMO_MERCHANT_SECRET}}'
request["Content-Type"] = 'application/json'

response = http.request(request)
puts response.read_body
```

```java Create Nium payin request
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://https/api/v1/payins")
  .header("x-secret", "{{FINMO_MERCHANT_SECRET}}")
  .header("Content-Type", "application/json")
  .asString();
```

```php Create Nium payin request
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://https/api/v1/payins', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-secret' => '{{FINMO_MERCHANT_SECRET}}',
  ],
]);

echo $response->getBody();
```

```csharp Create Nium payin request
using RestSharp;

var client = new RestClient("https://https/api/v1/payins");
var request = new RestRequest(Method.POST);
request.AddHeader("x-secret", "{{FINMO_MERCHANT_SECRET}}");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Create Nium payin request
import Foundation

let headers = [
  "x-secret": "{{FINMO_MERCHANT_SECRET}}",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://https/api/v1/payins")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

```python Finmo: Create VA_PAYIN request
import requests

url = "https://https/api/v1/payins"

headers = {
    "x-secret": "{{FINMO_MERCHANT_SECRET}}",
    "Content-Type": "application/json"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Finmo: Create VA_PAYIN request
const url = 'https://https/api/v1/payins';
const options = {
  method: 'POST',
  headers: {'x-secret': '{{FINMO_MERCHANT_SECRET}}', 'Content-Type': 'application/json'},
  body: undefined
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Finmo: Create VA_PAYIN request
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://https/api/v1/payins"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("x-secret", "{{FINMO_MERCHANT_SECRET}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Finmo: Create VA_PAYIN request
require 'uri'
require 'net/http'

url = URI("https://https/api/v1/payins")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-secret"] = '{{FINMO_MERCHANT_SECRET}}'
request["Content-Type"] = 'application/json'

response = http.request(request)
puts response.read_body
```

```java Finmo: Create VA_PAYIN request
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://https/api/v1/payins")
  .header("x-secret", "{{FINMO_MERCHANT_SECRET}}")
  .header("Content-Type", "application/json")
  .asString();
```

```php Finmo: Create VA_PAYIN request
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://https/api/v1/payins', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-secret' => '{{FINMO_MERCHANT_SECRET}}',
  ],
]);

echo $response->getBody();
```

```csharp Finmo: Create VA_PAYIN request
using RestSharp;

var client = new RestClient("https://https/api/v1/payins");
var request = new RestRequest(Method.POST);
request.AddHeader("x-secret", "{{FINMO_MERCHANT_SECRET}}");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Finmo: Create VA_PAYIN request
import Foundation

let headers = [
  "x-secret": "{{FINMO_MERCHANT_SECRET}}",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://https/api/v1/payins")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

```python Finmo: Create QR_PAYMENT request
import requests

url = "https://https/api/v1/payins"

headers = {
    "x-secret": "{{FINMO_MERCHANT_SECRET}}",
    "Content-Type": "application/json"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Finmo: Create QR_PAYMENT request
const url = 'https://https/api/v1/payins';
const options = {
  method: 'POST',
  headers: {'x-secret': '{{FINMO_MERCHANT_SECRET}}', 'Content-Type': 'application/json'},
  body: undefined
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Finmo: Create QR_PAYMENT request
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://https/api/v1/payins"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("x-secret", "{{FINMO_MERCHANT_SECRET}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Finmo: Create QR_PAYMENT request
require 'uri'
require 'net/http'

url = URI("https://https/api/v1/payins")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-secret"] = '{{FINMO_MERCHANT_SECRET}}'
request["Content-Type"] = 'application/json'

response = http.request(request)
puts response.read_body
```

```java Finmo: Create QR_PAYMENT request
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://https/api/v1/payins")
  .header("x-secret", "{{FINMO_MERCHANT_SECRET}}")
  .header("Content-Type", "application/json")
  .asString();
```

```php Finmo: Create QR_PAYMENT request
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://https/api/v1/payins', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-secret' => '{{FINMO_MERCHANT_SECRET}}',
  ],
]);

echo $response->getBody();
```

```csharp Finmo: Create QR_PAYMENT request
using RestSharp;

var client = new RestClient("https://https/api/v1/payins");
var request = new RestRequest(Method.POST);
request.AddHeader("x-secret", "{{FINMO_MERCHANT_SECRET}}");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Finmo: Create QR_PAYMENT request
import Foundation

let headers = [
  "x-secret": "{{FINMO_MERCHANT_SECRET}}",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://https/api/v1/payins")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

```python Payin_Create payin request_example
import requests

url = "https://https/api/v1/payins"

payload = "{
    \"requestId\": \"{{$randomUUID}}\", //required
    \"pspId\": \"{{pspId}}\", //optional, if not provided will trigger pspSelection logic
    \"amount\": 2, //required
    \"currency\": \"AUD\", //required
    \"country\": \"AU\",  //required
    \"manisPaymentMethodName\": \"Swift\", //required
    \"paymentFlow\": \"MANUAL\", //required
    \"paymentType\": \"MASTER_GLOBAL_ACCOUNT\", //required
    \"customerId\": \"cus-01k0vcb1c1bqvsqyvvwxmes2qt\", //optional
    \"virtualAccountId\": \"\" //optional
}"
headers = {
    "x-secret": "{{FINMO_MERCHANT_SECRET}}",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Payin_Create payin request_example
const url = 'https://https/api/v1/payins';
const options = {
  method: 'POST',
  headers: {'x-secret': '{{FINMO_MERCHANT_SECRET}}', 'Content-Type': 'application/json'},
  body: '"{\n    \"requestId\": \"{{$randomUUID}}\", //required\n    \"pspId\": \"{{pspId}}\", //optional, if not provided will trigger pspSelection logic\n    \"amount\": 2, //required\n    \"currency\": \"AUD\", //required\n    \"country\": \"AU\",  //required\n    \"manisPaymentMethodName\": \"Swift\", //required\n    \"paymentFlow\": \"MANUAL\", //required\n    \"paymentType\": \"MASTER_GLOBAL_ACCOUNT\", //required\n    \"customerId\": \"cus-01k0vcb1c1bqvsqyvvwxmes2qt\", //optional\n    \"virtualAccountId\": \"\" //optional\n}"'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Payin_Create payin request_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://https/api/v1/payins"

	payload := strings.NewReader("\"{\\n    \\\"requestId\\\": \\\"{{$randomUUID}}\\\", //required\\n    \\\"pspId\\\": \\\"{{pspId}}\\\", //optional, if not provided will trigger pspSelection logic\\n    \\\"amount\\\": 2, //required\\n    \\\"currency\\\": \\\"AUD\\\", //required\\n    \\\"country\\\": \\\"AU\\\",  //required\\n    \\\"manisPaymentMethodName\\\": \\\"Swift\\\", //required\\n    \\\"paymentFlow\\\": \\\"MANUAL\\\", //required\\n    \\\"paymentType\\\": \\\"MASTER_GLOBAL_ACCOUNT\\\", //required\\n    \\\"customerId\\\": \\\"cus-01k0vcb1c1bqvsqyvvwxmes2qt\\\", //optional\\n    \\\"virtualAccountId\\\": \\\"\\\" //optional\\n}\"")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-secret", "{{FINMO_MERCHANT_SECRET}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Payin_Create payin request_example
require 'uri'
require 'net/http'

url = URI("https://https/api/v1/payins")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-secret"] = '{{FINMO_MERCHANT_SECRET}}'
request["Content-Type"] = 'application/json'
request.body = "\"{\\n    \\\"requestId\\\": \\\"{{$randomUUID}}\\\", //required\\n    \\\"pspId\\\": \\\"{{pspId}}\\\", //optional, if not provided will trigger pspSelection logic\\n    \\\"amount\\\": 2, //required\\n    \\\"currency\\\": \\\"AUD\\\", //required\\n    \\\"country\\\": \\\"AU\\\",  //required\\n    \\\"manisPaymentMethodName\\\": \\\"Swift\\\", //required\\n    \\\"paymentFlow\\\": \\\"MANUAL\\\", //required\\n    \\\"paymentType\\\": \\\"MASTER_GLOBAL_ACCOUNT\\\", //required\\n    \\\"customerId\\\": \\\"cus-01k0vcb1c1bqvsqyvvwxmes2qt\\\", //optional\\n    \\\"virtualAccountId\\\": \\\"\\\" //optional\\n}\""

response = http.request(request)
puts response.read_body
```

```java Payin_Create payin request_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://https/api/v1/payins")
  .header("x-secret", "{{FINMO_MERCHANT_SECRET}}")
  .header("Content-Type", "application/json")
  .body("\"{\\n    \\\"requestId\\\": \\\"{{$randomUUID}}\\\", //required\\n    \\\"pspId\\\": \\\"{{pspId}}\\\", //optional, if not provided will trigger pspSelection logic\\n    \\\"amount\\\": 2, //required\\n    \\\"currency\\\": \\\"AUD\\\", //required\\n    \\\"country\\\": \\\"AU\\\",  //required\\n    \\\"manisPaymentMethodName\\\": \\\"Swift\\\", //required\\n    \\\"paymentFlow\\\": \\\"MANUAL\\\", //required\\n    \\\"paymentType\\\": \\\"MASTER_GLOBAL_ACCOUNT\\\", //required\\n    \\\"customerId\\\": \\\"cus-01k0vcb1c1bqvsqyvvwxmes2qt\\\", //optional\\n    \\\"virtualAccountId\\\": \\\"\\\" //optional\\n}\"")
  .asString();
```

```php Payin_Create payin request_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://https/api/v1/payins', [
  'body' => '"{\\n    \\"requestId\\": \\"{{$randomUUID}}\\", //required\\n    \\"pspId\\": \\"{{pspId}}\\", //optional, if not provided will trigger pspSelection logic\\n    \\"amount\\": 2, //required\\n    \\"currency\\": \\"AUD\\", //required\\n    \\"country\\": \\"AU\\",  //required\\n    \\"manisPaymentMethodName\\": \\"Swift\\", //required\\n    \\"paymentFlow\\": \\"MANUAL\\", //required\\n    \\"paymentType\\": \\"MASTER_GLOBAL_ACCOUNT\\", //required\\n    \\"customerId\\": \\"cus-01k0vcb1c1bqvsqyvvwxmes2qt\\", //optional\\n    \\"virtualAccountId\\": \\"\\" //optional\\n}"',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-secret' => '{{FINMO_MERCHANT_SECRET}}',
  ],
]);

echo $response->getBody();
```

```csharp Payin_Create payin request_example
using RestSharp;

var client = new RestClient("https://https/api/v1/payins");
var request = new RestRequest(Method.POST);
request.AddHeader("x-secret", "{{FINMO_MERCHANT_SECRET}}");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "\"{\\n    \\\"requestId\\\": \\\"{{$randomUUID}}\\\", //required\\n    \\\"pspId\\\": \\\"{{pspId}}\\\", //optional, if not provided will trigger pspSelection logic\\n    \\\"amount\\\": 2, //required\\n    \\\"currency\\\": \\\"AUD\\\", //required\\n    \\\"country\\\": \\\"AU\\\",  //required\\n    \\\"manisPaymentMethodName\\\": \\\"Swift\\\", //required\\n    \\\"paymentFlow\\\": \\\"MANUAL\\\", //required\\n    \\\"paymentType\\\": \\\"MASTER_GLOBAL_ACCOUNT\\\", //required\\n    \\\"customerId\\\": \\\"cus-01k0vcb1c1bqvsqyvvwxmes2qt\\\", //optional\\n    \\\"virtualAccountId\\\": \\\"\\\" //optional\\n}\"", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Payin_Create payin request_example
import Foundation

let headers = [
  "x-secret": "{{FINMO_MERCHANT_SECRET}}",
  "Content-Type": "application/json"
]
let parameters = "{
    \"requestId\": \"{{$randomUUID}}\", //required
    \"pspId\": \"{{pspId}}\", //optional, if not provided will trigger pspSelection logic
    \"amount\": 2, //required
    \"currency\": \"AUD\", //required
    \"country\": \"AU\",  //required
    \"manisPaymentMethodName\": \"Swift\", //required
    \"paymentFlow\": \"MANUAL\", //required
    \"paymentType\": \"MASTER_GLOBAL_ACCOUNT\", //required
    \"customerId\": \"cus-01k0vcb1c1bqvsqyvvwxmes2qt\", //optional
    \"virtualAccountId\": \"\" //optional
}" as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://https/api/v1/payins")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```