Lookup an account
client.Embed.Accounts.Get(ctx, accountID, query) (*AccountV1, error)
GET/v1/accounts/{account_id}
Retrieves the details of an account that has previously been created. Supply the unique account ID that was returned from your previous request, and Straddle will return the corresponding account information.
Lookup an account
package main
import (
"context"
"fmt"
"github.com/straddleio/straddle-go"
"github.com/straddleio/straddle-go/option"
)
func main() {
client := straddle.NewClient(
option.WithAPIKey("My API Key"),
)
accountV1, err := client.Embed.Accounts.Get(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
straddle.EmbedAccountGetParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", accountV1.Data)
}
{
"data": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"access_level": "standard",
"organization_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"status": "created",
"status_detail": {
"code": "code",
"message": "message",
"reason": "unverified",
"source": "watchtower"
},
"type": "business",
"business_profile": {
"name": "name",
"website": "https://example.com",
"address": {
"city": "city",
"line1": "line1",
"postal_code": "21029-1360",
"state": "SE",
"country": "country",
"line2": "line2"
},
"description": "description",
"industry": {
"category": "category",
"mcc": "mcc",
"sector": "sector"
},
"legal_name": "legal_name",
"phone": "+46991022",
"support_channels": {
"email": "dev@stainless.com",
"phone": "+46991022",
"url": "https://example.com"
},
"tax_id": "210297980",
"use_case": "use_case"
},
"capabilities": {
"consent_types": {
"internet": {
"capability_status": "active"
},
"signed_agreement": {
"capability_status": "active"
}
},
"customer_types": {
"businesses": {
"capability_status": "active"
},
"individuals": {
"capability_status": "active"
}
},
"payment_types": {
"charges": {
"capability_status": "active"
},
"payouts": {
"capability_status": "active"
}
}
},
"created_at": "2019-12-27T18:11:19.117Z",
"external_id": "external_id",
"metadata": {
"foo": "string"
},
"settings": {
"charges": {
"daily_amount": 0,
"funding_time": "immediate",
"linked_bank_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"max_amount": 0,
"monthly_amount": 0,
"monthly_count": 0
},
"payouts": {
"daily_amount": 0,
"funding_time": "immediate",
"linked_bank_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"max_amount": 0,
"monthly_amount": 0,
"monthly_count": 0
}
},
"terms_of_service": {
"accepted_date": "2019-12-27T18:11:19.117Z",
"agreement_type": "embedded",
"agreement_url": "agreement_url",
"accepted_ip": "accepted_ip",
"accepted_user_agent": "accepted_user_agent"
},
"updated_at": "2019-12-27T18:11:19.117Z"
},
"meta": {
"api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"api_request_timestamp": "2019-12-27T18:11:19.117Z"
},
"response_type": "object"
}Returns Examples
{
"data": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"access_level": "standard",
"organization_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"status": "created",
"status_detail": {
"code": "code",
"message": "message",
"reason": "unverified",
"source": "watchtower"
},
"type": "business",
"business_profile": {
"name": "name",
"website": "https://example.com",
"address": {
"city": "city",
"line1": "line1",
"postal_code": "21029-1360",
"state": "SE",
"country": "country",
"line2": "line2"
},
"description": "description",
"industry": {
"category": "category",
"mcc": "mcc",
"sector": "sector"
},
"legal_name": "legal_name",
"phone": "+46991022",
"support_channels": {
"email": "dev@stainless.com",
"phone": "+46991022",
"url": "https://example.com"
},
"tax_id": "210297980",
"use_case": "use_case"
},
"capabilities": {
"consent_types": {
"internet": {
"capability_status": "active"
},
"signed_agreement": {
"capability_status": "active"
}
},
"customer_types": {
"businesses": {
"capability_status": "active"
},
"individuals": {
"capability_status": "active"
}
},
"payment_types": {
"charges": {
"capability_status": "active"
},
"payouts": {
"capability_status": "active"
}
}
},
"created_at": "2019-12-27T18:11:19.117Z",
"external_id": "external_id",
"metadata": {
"foo": "string"
},
"settings": {
"charges": {
"daily_amount": 0,
"funding_time": "immediate",
"linked_bank_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"max_amount": 0,
"monthly_amount": 0,
"monthly_count": 0
},
"payouts": {
"daily_amount": 0,
"funding_time": "immediate",
"linked_bank_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"max_amount": 0,
"monthly_amount": 0,
"monthly_count": 0
}
},
"terms_of_service": {
"accepted_date": "2019-12-27T18:11:19.117Z",
"agreement_type": "embedded",
"agreement_url": "agreement_url",
"accepted_ip": "accepted_ip",
"accepted_user_agent": "accepted_user_agent"
},
"updated_at": "2019-12-27T18:11:19.117Z"
},
"meta": {
"api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"api_request_timestamp": "2019-12-27T18:11:19.117Z"
},
"response_type": "object"
}