Listing Inbound Billing Transfers by API
This guide shows how to use the AWS Organizations API to list inbound billing responsibility transfers for both direct and indirect relationships.
Overview
Billing transfer allows a management account to manage and pay for the consolidated bill of another organization. When you accept billing transfer invitations, you can use the
ListInboundResponsibilityTransfers API to view all transfers where your organization manages billing for other organizations.Key Concepts:
- Inbound billing: Transfers that allow you to manage and pay for another organization's consolidated bill
- Direct relationship: A billing transfer directly to your organization (chain length 1)
- Indirect relationship: A billing transfer through an intermediary organization (chain length 2)
Prerequisites
Before using these APIs, ensure you have:
- AWS CLI installed and configured
- IAM permissions for the management account:
-
organizations:ListInboundResponsibilityTransfers
List All Inbound Transfers
Use the
list-inbound-responsibility-transfers command to retrieve all inbound billing transfers:aws organizations list-inbound-responsibility-transfers \ --type BILLING \ --region us-east-1⚠️ AWS Organizations is a global service hosted in US East (N. Virginia). Always use--region us-east-1for these API calls.
Example Response
{ "ResponsibilityTransfers": [ { "Arn": "arn:aws:organizations::111111111111:transfer/o-exampleorg/billing/inbound/rt-abc12345", "Name": "Partner A Transfer", "Id": "rt-abc12345", "Type": "BILLING", "Status": "ACCEPTED", "Source": { "ManagementAccountId": "222222222222" }, "Target": { "ManagementAccountId": "111111111111" }, "StartTimestamp": "2025-06-30T20:00:00-04:00" }, { "Arn": "arn:aws:organizations::111111111111:transfer/o-exampleorg/billing/inbound/rt-xyz78901", "Name": "Partner B Transfer", "Id": "rt-xyz78901", "Type": "BILLING", "Status": "EXPIRED", "Target": { "ManagementAccountId": "111111111111" }, "StartTimestamp": "2025-09-30T20:00:00-04:00" } ], "NextToken": "eyJ..."}The
Source field is only present for transfers that were accepted. For transfers with status EXPIRED , CANCELED , or DECLINED , the Source field is not returned.⚠️ The list API returns onlyManagementAccountIdfor Source and Target. To retrieveManagementAccountEmail, use the DescribeResponsibilityTransfer API.
Pagination for Large Result Sets
When you have many transfers, use pagination to retrieve all results:
# First requestaws organizations list-inbound-responsibility-transfers \ --type BILLING \ --max-results 20 \ --region us-east-1
# Subsequent requests using NextToken from previous responseaws organizations list-inbound-responsibility-transfers \ --type BILLING \ --max-results 20 \ --next-token "YOUR_NEXT_TOKEN_HERE" \ --region us-east-1⚠️ Always check theNextTokenresponse parameter. Continue making requests untilNextTokenreturns null, even if you receive an empty result set.
Understanding Direct vs Indirect Relationships
Direct Relationships (Chain Length 1)
A direct relationship is when an organization transfers billing responsibility directly to your organization:
Organization A (source) → Your Organization (target)To list direct relationships, call the API without the
--id parameter:aws organizations list-inbound-responsibility-transfers \ --type BILLING \ --region us-east-1Indirect Relationships (Chain Length 2)
An indirect relationship occurs when your organization manages billing for an intermediary, who in turn manages billing for another organization:
Organization C (source) → Organization B (target/source) → Your Organization (target)To list indirect relationships, use the
--id parameter with a direct transfer ID:# Step 1: List your direct inbound transfersaws organizations list-inbound-responsibility-transfers \ --type BILLING \ --region us-east-1
# Step 2: Use a direct transfer ID to retrieve its indirect relationshipsaws organizations list-inbound-responsibility-transfers \ --type BILLING \ --id rt-abc12345 \ --region us-east-1This returns all transfers where the source organization of the specified transfer (
rt-abc12345 ) is itself receiving billing transfers from other organizations.⚠️ The aggregate inbound transfers quota (1,000) applies to all relationships combined—both direct and indirect. Monitor your total count to avoid exceeding this limit.
Common Use Cases
⚠️ The--queryparameter only filters results from the current page. For accurate results across all transfers, you must paginate through all pages. See Using AWS CLI pagination options for more details.
List All Active Direct Transfers
Use this script to paginate through all direct relationships:
#!/bin/bash
NEXT_TOKEN=""while true; do if [ -z "$NEXT_TOKEN" ]; then RESPONSE=$(aws organizations list-inbound-responsibility-transfers \ --type BILLING --region us-east-1 --output json) else RESPONSE=$(aws organizations list-inbound-responsibility-transfers \ --type BILLING --region us-east-1 \ --next-token "$NEXT_TOKEN" --output json) fi
echo "$RESPONSE" | jq -r '.ResponsibilityTransfers[] | select(.Status == "ACCEPTED") | "DIRECT: \(.Id) | \(.Name) | \(.Source.ManagementAccountId)"'
NEXT_TOKEN=$(echo "$RESPONSE" | jq -r '.NextToken // empty') [ -z "$NEXT_TOKEN" ] && breakdoneList Indirect Transfers for a Direct Transfer
Use the transfer ID from the direct relationships to find indirect relationships:
#!/bin/bash
DIRECT_ID="rt-abc12345"NEXT_TOKEN=""
while true; do if [ -z "$NEXT_TOKEN" ]; then RESPONSE=$(aws organizations list-inbound-responsibility-transfers \ --type BILLING --id "$DIRECT_ID" --region us-east-1 --output json) else RESPONSE=$(aws organizations list-inbound-responsibility-transfers \ --type BILLING --id "$DIRECT_ID" --region us-east-1 \ --next-token "$NEXT_TOKEN" --output json) fi
echo "$RESPONSE" | jq -r '.ResponsibilityTransfers[] | select(.Status == "ACCEPTED") | "INDIRECT: \(.Id) | \(.Name) | \(.Source.ManagementAccountId)"'
NEXT_TOKEN=$(echo "$RESPONSE" | jq -r '.NextToken // empty') [ -z "$NEXT_TOKEN" ] && breakdoneQuick Queries (First Page Only)
For quick checks on small datasets, these one-liners work on the first page of results:
# Filter by status (first page only)aws organizations list-inbound-responsibility-transfers \ --type BILLING \ --region us-east-1 \ --query 'ResponsibilityTransfers[?Status==`ACCEPTED`]'
# Count transfers (first page only)aws organizations list-inbound-responsibility-transfers \ --type BILLING \ --region us-east-1 \ --query 'length(ResponsibilityTransfers)'
# Export to CSV format (first page only)aws organizations list-inbound-responsibility-transfers \ --type BILLING \ --region us-east-1 \ --query 'ResponsibilityTransfers[].[Id,Name,Source.ManagementAccountId,StartTimestamp]' \ --output text | tr '\t' ','Required IAM Permissions
Add the following permissions to your IAM policy:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "organizations:ListInboundResponsibilityTransfers", "Resource": "*" } ]}Additional Resources
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article