> For a complete page index, fetch https://docs.transak.com/llms.txt

# Get Accounts

GET https://api-gateway-stg.transak.com/api/v2/payment-instrument/status

Get Connected Accounts for authenticated users

Reference: https://docs.transak.com/api/whitelabel/payments/headless-ach-pull/get-accounts

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: whitelabel-api
  version: 1.0.0
paths:
  /api/v2/payment-instrument/status:
    get:
      operationId: get-accounts
      summary: Get Accounts
      description: Get Connected Accounts for authenticated users
      tags:
        - headlessAchPull
      parameters:
        - name: paymentInstrumentId
          in: query
          description: >-
            Payment instrument identifier. Always `pm_ach_pull` for the Headless
            ACH Pull flow.
          required: true
          schema:
            type: string
        - name: x-user-ip
          in: header
          description: >-
            End user's originating IP. More details
            [here](/guides/mandatory-security-changes#user-ip-header-in-apis)
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: >-
            Your Partner API key. You can find this in the [Partner
            Dashboard](https://docs.transak.com/guides/how-to-create-partner-dashboard-account#open-the-developers-section).
          required: true
          schema:
            type: string
        - name: authorization
          in: header
          description: >-
            Authorization token is the accessToken received from the API -`
            api/v2/auth/verify`


            Note: This is not applicable for [Auth Reliance
            Flows](/features/auth-reliance)
          required: false
          schema:
            type: string
        - name: x-access-token
          in: header
          description: >-
            Your Partner Access Token. Please refer
            [here](/guides/how-to-create-partner-access-token) for a tutorial on
            generating your access token.


            Note: This is applicable only for [Auth Reliance
            Flows](/features/auth-reliance)
          required: false
          schema:
            type: string
        - name: x-user-identifier
          in: header
          description: >-
            The authenticated user's email address.


            Note: This is applicable only for [Auth Reliance
            Flows](/features/auth-reliance).
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/headlessAchPull:PaymentInstrumentStatusResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/headlessAchPull:ApiErrorBody'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/headlessAchPull:ApiErrorBody'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/headlessAchPull:ApiErrorBody'
servers:
  - url: https://api-gateway-stg.transak.com
    description: Staging
components:
  schemas:
    headlessAchPull:BankAccountDetails:
      type: object
      properties:
        paymentIdentifierId:
          type: string
          description: Unique identifier for the linked bank account.
        bankName:
          type: string
          description: Name of the linked bank.
        accountName:
          type: string
          description: Name of the linked bank account.
        isDefault:
          type: boolean
          description: Whether this is the user's default bank account.
      title: BankAccountDetails
    headlessAchPull:AchPullPaymentInstrument:
      type: object
      properties:
        bankAccounts:
          type: array
          items:
            $ref: '#/components/schemas/headlessAchPull:BankAccountDetails'
          description: Bank accounts linked by the user for ACH Pull.
        isAchMFAVerified:
          type: boolean
          description: Whether the user has completed mobile OTP verification for ACH Pull.
        isAchBlocked:
          type: boolean
          description: Whether ACH Pull is blocked for the user.
      title: AchPullPaymentInstrument
    headlessAchPull:PaymentInstrumentStatusResponseDataPaymentInstruments:
      type: object
      properties:
        pm_ach_pull:
          $ref: '#/components/schemas/headlessAchPull:AchPullPaymentInstrument'
      title: PaymentInstrumentStatusResponseDataPaymentInstruments
    headlessAchPull:PaymentInstrumentStatusResponseData:
      type: object
      properties:
        paymentInstruments:
          $ref: >-
            #/components/schemas/headlessAchPull:PaymentInstrumentStatusResponseDataPaymentInstruments
      title: PaymentInstrumentStatusResponseData
    headlessAchPull:PaymentInstrumentStatusResponse:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/headlessAchPull:PaymentInstrumentStatusResponseData
      required:
        - data
      title: PaymentInstrumentStatusResponse
    headlessAchPull:ApiErrorBodyError:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        errorCode:
          type: integer
          description: Machine-readable error code for client handling.
      required:
        - statusCode
        - message
      title: ApiErrorBodyError
    headlessAchPull:ApiErrorBody:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/headlessAchPull:ApiErrorBodyError'
      required:
        - error
      title: ApiErrorBody

```

## Examples

### With Connected Bank



**Response**

```json
{
  "data": {
    "paymentInstruments": {
      "pm_ach_pull": {
        "bankAccounts": [
          {
            "paymentIdentifierId": "1797651",
            "bankName": "Aerosync Bank (MFA)",
            "accountName": "Aerosync Checking",
            "isDefault": true
          }
        ],
        "isAchMFAVerified": true,
        "isAchBlocked": false
      }
    }
  }
}
```

**SDK Code**

```python With Connected Bank
import requests

url = "https://api-gateway-stg.transak.com/api/v2/payment-instrument/status"

querystring = {"paymentInstrumentId":"pm_ach_pull"}

headers = {
    "x-api-key": "",
    "x-user-ip": ""
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript With Connected Bank
const url = 'https://api-gateway-stg.transak.com/api/v2/payment-instrument/status?paymentInstrumentId=pm_ach_pull';
const options = {method: 'GET', headers: {'x-api-key': '', 'x-user-ip': ''}};

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

```go With Connected Bank
package main

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

func main() {

	url := "https://api-gateway-stg.transak.com/api/v2/payment-instrument/status?paymentInstrumentId=pm_ach_pull"

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

	req.Header.Add("x-api-key", "")
	req.Header.Add("x-user-ip", "")

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

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

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

}
```

```ruby With Connected Bank
require 'uri'
require 'net/http'

url = URI("https://api-gateway-stg.transak.com/api/v2/payment-instrument/status?paymentInstrumentId=pm_ach_pull")

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

request = Net::HTTP::Get.new(url)
request["x-api-key"] = ''
request["x-user-ip"] = ''

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

```java With Connected Bank
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-gateway-stg.transak.com/api/v2/payment-instrument/status?paymentInstrumentId=pm_ach_pull")
  .header("x-api-key", "")
  .header("x-user-ip", "")
  .asString();
```

```php With Connected Bank
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-gateway-stg.transak.com/api/v2/payment-instrument/status?paymentInstrumentId=pm_ach_pull', [
  'headers' => [
    'x-api-key' => '',
    'x-user-ip' => '',
  ],
]);

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

```csharp With Connected Bank
using RestSharp;

var client = new RestClient("https://api-gateway-stg.transak.com/api/v2/payment-instrument/status?paymentInstrumentId=pm_ach_pull");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "");
request.AddHeader("x-user-ip", "");
IRestResponse response = client.Execute(request);
```

```swift With Connected Bank
import Foundation

let headers = [
  "x-api-key": "",
  "x-user-ip": ""
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway-stg.transak.com/api/v2/payment-instrument/status?paymentInstrumentId=pm_ach_pull")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
```

### Without Connected Bank



**Response**

```json
{
  "data": {
    "paymentInstruments": {
      "pm_ach_pull": {
        "bankAccounts": [],
        "isAchMFAVerified": false,
        "isAchBlocked": false
      }
    }
  }
}
```

**SDK Code**

```python Without Connected Bank
import requests

url = "https://api-gateway-stg.transak.com/api/v2/payment-instrument/status"

querystring = {"paymentInstrumentId":"pm_ach_pull"}

headers = {
    "x-api-key": "",
    "x-user-ip": ""
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Without Connected Bank
const url = 'https://api-gateway-stg.transak.com/api/v2/payment-instrument/status?paymentInstrumentId=pm_ach_pull';
const options = {method: 'GET', headers: {'x-api-key': '', 'x-user-ip': ''}};

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

```go Without Connected Bank
package main

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

func main() {

	url := "https://api-gateway-stg.transak.com/api/v2/payment-instrument/status?paymentInstrumentId=pm_ach_pull"

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

	req.Header.Add("x-api-key", "")
	req.Header.Add("x-user-ip", "")

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

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

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

}
```

```ruby Without Connected Bank
require 'uri'
require 'net/http'

url = URI("https://api-gateway-stg.transak.com/api/v2/payment-instrument/status?paymentInstrumentId=pm_ach_pull")

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

request = Net::HTTP::Get.new(url)
request["x-api-key"] = ''
request["x-user-ip"] = ''

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

```java Without Connected Bank
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-gateway-stg.transak.com/api/v2/payment-instrument/status?paymentInstrumentId=pm_ach_pull")
  .header("x-api-key", "")
  .header("x-user-ip", "")
  .asString();
```

```php Without Connected Bank
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-gateway-stg.transak.com/api/v2/payment-instrument/status?paymentInstrumentId=pm_ach_pull', [
  'headers' => [
    'x-api-key' => '',
    'x-user-ip' => '',
  ],
]);

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

```csharp Without Connected Bank
using RestSharp;

var client = new RestClient("https://api-gateway-stg.transak.com/api/v2/payment-instrument/status?paymentInstrumentId=pm_ach_pull");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "");
request.AddHeader("x-user-ip", "");
IRestResponse response = client.Execute(request);
```

```swift Without Connected Bank
import Foundation

let headers = [
  "x-api-key": "",
  "x-user-ip": ""
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway-stg.transak.com/api/v2/payment-instrument/status?paymentInstrumentId=pm_ach_pull")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
```