GraphQL Admin API Reference

Welcome to the Blink Admin API reference!

Contact

Galoy developer community

https://chat.galoy.io/

API Endpoints
https://admin-api.staging.galoy.io/graphql

Queries

accountDetailsByAccountId

Response

Returns an AuditedAccount!

Arguments
Name Description
accountId - ID!

Example

Query
query accountDetailsByAccountId($accountId: ID!) {
  accountDetailsByAccountId(accountId: $accountId) {
    createdAt
    id
    level
    merchants {
      ...MerchantFragment
    }
    owner {
      ...AuditedUserFragment
    }
    status
    username
    wallets {
      ...WalletFragment
    }
  }
}
Variables
{"accountId": "4"}
Response
{
  "data": {
    "accountDetailsByAccountId": {
      "createdAt": 1592577642,
      "id": 4,
      "level": "ONE",
      "merchants": [Merchant],
      "owner": AuditedUser,
      "status": "ACTIVE",
      "username": Username,
      "wallets": [Wallet]
    }
  }
}

accountDetailsByEmail

Response

Returns an AuditedAccount!

Arguments
Name Description
email - EmailAddress!

Example

Query
query accountDetailsByEmail($email: EmailAddress!) {
  accountDetailsByEmail(email: $email) {
    createdAt
    id
    level
    merchants {
      ...MerchantFragment
    }
    owner {
      ...AuditedUserFragment
    }
    status
    username
    wallets {
      ...WalletFragment
    }
  }
}
Variables
{"email": "test@test.com"}
Response
{
  "data": {
    "accountDetailsByEmail": {
      "createdAt": 1592577642,
      "id": "4",
      "level": "ONE",
      "merchants": [Merchant],
      "owner": AuditedUser,
      "status": "ACTIVE",
      "username": Username,
      "wallets": [Wallet]
    }
  }
}

accountDetailsByUserId

Response

Returns an AuditedAccount!

Arguments
Name Description
userId - ID!

Example

Query
query accountDetailsByUserId($userId: ID!) {
  accountDetailsByUserId(userId: $userId) {
    createdAt
    id
    level
    merchants {
      ...MerchantFragment
    }
    owner {
      ...AuditedUserFragment
    }
    status
    username
    wallets {
      ...WalletFragment
    }
  }
}
Variables
{"userId": "4"}
Response
{
  "data": {
    "accountDetailsByUserId": {
      "createdAt": 1592577642,
      "id": 4,
      "level": "ONE",
      "merchants": [Merchant],
      "owner": AuditedUser,
      "status": "ACTIVE",
      "username": Username,
      "wallets": [Wallet]
    }
  }
}

accountDetailsByUserPhone

Response

Returns an AuditedAccount!

Arguments
Name Description
phone - Phone!

Example

Query
query accountDetailsByUserPhone($phone: Phone!) {
  accountDetailsByUserPhone(phone: $phone) {
    createdAt
    id
    level
    merchants {
      ...MerchantFragment
    }
    owner {
      ...AuditedUserFragment
    }
    status
    username
    wallets {
      ...WalletFragment
    }
  }
}
Variables
{"phone": Phone}
Response
{
  "data": {
    "accountDetailsByUserPhone": {
      "createdAt": 1592577642,
      "id": 4,
      "level": "ONE",
      "merchants": [Merchant],
      "owner": AuditedUser,
      "status": "ACTIVE",
      "username": Username,
      "wallets": [Wallet]
    }
  }
}

accountDetailsByUsername

Response

Returns an AuditedAccount!

Arguments
Name Description
username - Username!

Example

Query
query accountDetailsByUsername($username: Username!) {
  accountDetailsByUsername(username: $username) {
    createdAt
    id
    level
    merchants {
      ...MerchantFragment
    }
    owner {
      ...AuditedUserFragment
    }
    status
    username
    wallets {
      ...WalletFragment
    }
  }
}
Variables
{"username": Username}
Response
{
  "data": {
    "accountDetailsByUsername": {
      "createdAt": 1592577642,
      "id": 4,
      "level": "ONE",
      "merchants": [Merchant],
      "owner": AuditedUser,
      "status": "ACTIVE",
      "username": Username,
      "wallets": [Wallet]
    }
  }
}

allLevels

Response

Returns [AccountLevel!]!

Example

Query
query allLevels {
  allLevels
}
Response
{"data": {"allLevels": ["ONE"]}}

filteredUserCount

Response

Returns an Int!

Arguments
Name Description
phoneCountryCodesFilter - [CountryCode!]
userIdsFilter - [ID!]

Example

Query
query filteredUserCount(
  $phoneCountryCodesFilter: [CountryCode!],
  $userIdsFilter: [ID!]
) {
  filteredUserCount(
    phoneCountryCodesFilter: $phoneCountryCodesFilter,
    userIdsFilter: $userIdsFilter
  )
}
Variables
{
  "phoneCountryCodesFilter": ["US"],
  "userIdsFilter": [4]
}
Response
{"data": {"filteredUserCount": 123}}

lightningInvoice

Response

Returns a LightningInvoice!

Arguments
Name Description
hash - PaymentHash!

Example

Query
query lightningInvoice($hash: PaymentHash!) {
  lightningInvoice(hash: $hash) {
    confirmedAt
    createdAt
    description
    expiresAt
    isSettled
    received
    request
    secretPreImage
  }
}
Variables
{"hash": PaymentHash}
Response
{
  "data": {
    "lightningInvoice": {
      "confirmedAt": 1592577642,
      "createdAt": 1592577642,
      "description": "xyz789",
      "expiresAt": 1592577642,
      "isSettled": true,
      "received": SatAmount,
      "request": LnPaymentRequest,
      "secretPreImage": LnPaymentPreImage
    }
  }
}

lightningPayment

Response

Returns a LightningPayment!

Arguments
Name Description
hash - PaymentHash!

Example

Query
query lightningPayment($hash: PaymentHash!) {
  lightningPayment(hash: $hash) {
    amount
    confirmedAt
    createdAt
    destination
    request
    revealedPreImage
    roundedUpFee
    status
  }
}
Variables
{"hash": PaymentHash}
Response
{
  "data": {
    "lightningPayment": {
      "amount": SatAmount,
      "confirmedAt": 1592577642,
      "createdAt": 1592577642,
      "destination": LnPubkey,
      "request": LnPaymentRequest,
      "revealedPreImage": LnPaymentPreImage,
      "roundedUpFee": SatAmount,
      "status": "FAILED"
    }
  }
}

merchantsPendingApproval

Response

Returns [Merchant!]!

Example

Query
query merchantsPendingApproval {
  merchantsPendingApproval {
    coordinates {
      ...CoordinatesFragment
    }
    createdAt
    id
    title
    username
    validated
  }
}
Response
{
  "data": {
    "merchantsPendingApproval": [
      {
        "coordinates": Coordinates,
        "createdAt": 1592577642,
        "id": 4,
        "title": "xyz789",
        "username": Username,
        "validated": false
      }
    ]
  }
}

transactionById

Response

Returns a Transaction

Arguments
Name Description
id - ID!

Example

Query
query transactionById($id: ID!) {
  transactionById(id: $id) {
    createdAt
    direction
    externalId
    id
    initiationVia {
      ... on InitiationViaIntraLedger {
        ...InitiationViaIntraLedgerFragment
      }
      ... on InitiationViaLn {
        ...InitiationViaLnFragment
      }
      ... on InitiationViaOnChain {
        ...InitiationViaOnChainFragment
      }
    }
    memo
    settlementAmount
    settlementCurrency
    settlementDisplayAmount
    settlementDisplayCurrency
    settlementDisplayFee
    settlementFee
    settlementPrice {
      ...PriceOfOneSettlementMinorUnitInDisplayMinorUnitFragment
    }
    settlementVia {
      ... on SettlementViaIntraLedger {
        ...SettlementViaIntraLedgerFragment
      }
      ... on SettlementViaLn {
        ...SettlementViaLnFragment
      }
      ... on SettlementViaOnChain {
        ...SettlementViaOnChainFragment
      }
    }
    status
  }
}
Variables
{"id": "4"}
Response
{
  "data": {
    "transactionById": {
      "createdAt": 1592577642,
      "direction": "RECEIVE",
      "externalId": TxExternalId,
      "id": 4,
      "initiationVia": InitiationViaIntraLedger,
      "memo": Memo,
      "settlementAmount": SignedAmount,
      "settlementCurrency": "BTC",
      "settlementDisplayAmount": SignedDisplayMajorAmount,
      "settlementDisplayCurrency": DisplayCurrency,
      "settlementDisplayFee": SignedDisplayMajorAmount,
      "settlementFee": SignedAmount,
      "settlementPrice": PriceOfOneSettlementMinorUnitInDisplayMinorUnit,
      "settlementVia": SettlementViaIntraLedger,
      "status": "FAILURE"
    }
  }
}

transactionsByHash

Response

Returns [Transaction]

Arguments
Name Description
hash - PaymentHash!

Example

Query
query transactionsByHash($hash: PaymentHash!) {
  transactionsByHash(hash: $hash) {
    createdAt
    direction
    externalId
    id
    initiationVia {
      ... on InitiationViaIntraLedger {
        ...InitiationViaIntraLedgerFragment
      }
      ... on InitiationViaLn {
        ...InitiationViaLnFragment
      }
      ... on InitiationViaOnChain {
        ...InitiationViaOnChainFragment
      }
    }
    memo
    settlementAmount
    settlementCurrency
    settlementDisplayAmount
    settlementDisplayCurrency
    settlementDisplayFee
    settlementFee
    settlementPrice {
      ...PriceOfOneSettlementMinorUnitInDisplayMinorUnitFragment
    }
    settlementVia {
      ... on SettlementViaIntraLedger {
        ...SettlementViaIntraLedgerFragment
      }
      ... on SettlementViaLn {
        ...SettlementViaLnFragment
      }
      ... on SettlementViaOnChain {
        ...SettlementViaOnChainFragment
      }
    }
    status
  }
}
Variables
{"hash": PaymentHash}
Response
{
  "data": {
    "transactionsByHash": [
      {
        "createdAt": 1592577642,
        "direction": "RECEIVE",
        "externalId": TxExternalId,
        "id": "4",
        "initiationVia": InitiationViaIntraLedger,
        "memo": Memo,
        "settlementAmount": SignedAmount,
        "settlementCurrency": "BTC",
        "settlementDisplayAmount": SignedDisplayMajorAmount,
        "settlementDisplayCurrency": DisplayCurrency,
        "settlementDisplayFee": SignedDisplayMajorAmount,
        "settlementFee": SignedAmount,
        "settlementPrice": PriceOfOneSettlementMinorUnitInDisplayMinorUnit,
        "settlementVia": SettlementViaIntraLedger,
        "status": "FAILURE"
      }
    ]
  }
}

transactionsByPaymentRequest

Response

Returns [Transaction]

Arguments
Name Description
paymentRequest - LnPaymentRequest!

Example

Query
query transactionsByPaymentRequest($paymentRequest: LnPaymentRequest!) {
  transactionsByPaymentRequest(paymentRequest: $paymentRequest) {
    createdAt
    direction
    externalId
    id
    initiationVia {
      ... on InitiationViaIntraLedger {
        ...InitiationViaIntraLedgerFragment
      }
      ... on InitiationViaLn {
        ...InitiationViaLnFragment
      }
      ... on InitiationViaOnChain {
        ...InitiationViaOnChainFragment
      }
    }
    memo
    settlementAmount
    settlementCurrency
    settlementDisplayAmount
    settlementDisplayCurrency
    settlementDisplayFee
    settlementFee
    settlementPrice {
      ...PriceOfOneSettlementMinorUnitInDisplayMinorUnitFragment
    }
    settlementVia {
      ... on SettlementViaIntraLedger {
        ...SettlementViaIntraLedgerFragment
      }
      ... on SettlementViaLn {
        ...SettlementViaLnFragment
      }
      ... on SettlementViaOnChain {
        ...SettlementViaOnChainFragment
      }
    }
    status
  }
}
Variables
{"paymentRequest": LnPaymentRequest}
Response
{
  "data": {
    "transactionsByPaymentRequest": [
      {
        "createdAt": 1592577642,
        "direction": "RECEIVE",
        "externalId": TxExternalId,
        "id": 4,
        "initiationVia": InitiationViaIntraLedger,
        "memo": Memo,
        "settlementAmount": SignedAmount,
        "settlementCurrency": "BTC",
        "settlementDisplayAmount": SignedDisplayMajorAmount,
        "settlementDisplayCurrency": DisplayCurrency,
        "settlementDisplayFee": SignedDisplayMajorAmount,
        "settlementFee": SignedAmount,
        "settlementPrice": PriceOfOneSettlementMinorUnitInDisplayMinorUnit,
        "settlementVia": SettlementViaIntraLedger,
        "status": "FAILURE"
      }
    ]
  }
}

wallet

Response

Returns a Wallet!

Arguments
Name Description
walletId - WalletId!

Example

Query
query wallet($walletId: WalletId!) {
  wallet(walletId: $walletId) {
    accountId
    balance
    id
    invoiceByPaymentHash {
      ...InvoiceFragment
    }
    invoices {
      ...InvoiceConnectionFragment
    }
    pendingIncomingBalance
    pendingIncomingTransactions {
      ...TransactionFragment
    }
    pendingIncomingTransactionsByAddress {
      ...TransactionFragment
    }
    transactionById {
      ...TransactionFragment
    }
    transactions {
      ...TransactionConnectionFragment
    }
    transactionsByAddress {
      ...TransactionConnectionFragment
    }
    transactionsByPaymentHash {
      ...TransactionFragment
    }
    transactionsByPaymentRequest {
      ...TransactionFragment
    }
    walletCurrency
  }
}
Variables
{"walletId": WalletId}
Response
{
  "data": {
    "wallet": {
      "accountId": 4,
      "balance": SignedAmount,
      "id": "4",
      "invoiceByPaymentHash": Invoice,
      "invoices": InvoiceConnection,
      "pendingIncomingBalance": SignedAmount,
      "pendingIncomingTransactions": [Transaction],
      "pendingIncomingTransactionsByAddress": [
        Transaction
      ],
      "transactionById": Transaction,
      "transactions": TransactionConnection,
      "transactionsByAddress": TransactionConnection,
      "transactionsByPaymentHash": [Transaction],
      "transactionsByPaymentRequest": [Transaction],
      "walletCurrency": "BTC"
    }
  }
}

Mutations

accountUpdateLevel

Response

Returns an AccountDetailPayload!

Arguments
Name Description
input - AccountUpdateLevelInput!

Example

Query
mutation accountUpdateLevel($input: AccountUpdateLevelInput!) {
  accountUpdateLevel(input: $input) {
    accountDetails {
      ...AuditedAccountFragment
    }
    errors {
      ...ErrorFragment
    }
  }
}
Variables
{"input": AccountUpdateLevelInput}
Response
{
  "data": {
    "accountUpdateLevel": {
      "accountDetails": AuditedAccount,
      "errors": [Error]
    }
  }
}

accountUpdateStatus

Response

Returns an AccountDetailPayload!

Arguments
Name Description
input - AccountUpdateStatusInput!

Example

Query
mutation accountUpdateStatus($input: AccountUpdateStatusInput!) {
  accountUpdateStatus(input: $input) {
    accountDetails {
      ...AuditedAccountFragment
    }
    errors {
      ...ErrorFragment
    }
  }
}
Variables
{"input": AccountUpdateStatusInput}
Response
{
  "data": {
    "accountUpdateStatus": {
      "accountDetails": AuditedAccount,
      "errors": [Error]
    }
  }
}

marketingNotificationTrigger

Response

Returns a SuccessPayload!

Arguments
Name Description
input - MarketingNotificationTriggerInput!

Example

Query
mutation marketingNotificationTrigger($input: MarketingNotificationTriggerInput!) {
  marketingNotificationTrigger(input: $input) {
    errors {
      ...ErrorFragment
    }
    success
  }
}
Variables
{"input": MarketingNotificationTriggerInput}
Response
{
  "data": {
    "marketingNotificationTrigger": {
      "errors": [Error],
      "success": true
    }
  }
}

merchantMapDelete

Response

Returns a MerchantPayload!

Arguments
Name Description
input - MerchantMapDeleteInput!

Example

Query
mutation merchantMapDelete($input: MerchantMapDeleteInput!) {
  merchantMapDelete(input: $input) {
    errors {
      ...ErrorFragment
    }
    merchant {
      ...MerchantFragment
    }
  }
}
Variables
{"input": MerchantMapDeleteInput}
Response
{
  "data": {
    "merchantMapDelete": {
      "errors": [Error],
      "merchant": Merchant
    }
  }
}

merchantMapValidate

Response

Returns a MerchantPayload!

Arguments
Name Description
input - MerchantMapValidateInput!

Example

Query
mutation merchantMapValidate($input: MerchantMapValidateInput!) {
  merchantMapValidate(input: $input) {
    errors {
      ...ErrorFragment
    }
    merchant {
      ...MerchantFragment
    }
  }
}
Variables
{"input": MerchantMapValidateInput}
Response
{
  "data": {
    "merchantMapValidate": {
      "errors": [Error],
      "merchant": Merchant
    }
  }
}

userUpdatePhone

Response

Returns an AccountDetailPayload!

Arguments
Name Description
input - UserUpdatePhoneInput!

Example

Query
mutation userUpdatePhone($input: UserUpdatePhoneInput!) {
  userUpdatePhone(input: $input) {
    accountDetails {
      ...AuditedAccountFragment
    }
    errors {
      ...ErrorFragment
    }
  }
}
Variables
{"input": UserUpdatePhoneInput}
Response
{
  "data": {
    "userUpdatePhone": {
      "accountDetails": AuditedAccount,
      "errors": [Error]
    }
  }
}

Types

AccountDetailPayload

Fields
Field Name Description
accountDetails - AuditedAccount
errors - [Error!]!
Example
{
  "accountDetails": AuditedAccount,
  "errors": [Error]
}

AccountId

Description

Unique identifier of an account

Example
AccountId

AccountLevel

Values
Enum Value Description

ONE

TWO

ZERO

Example
"ONE"

AccountStatus

Values
Enum Value Description

ACTIVE

CLOSED

LOCKED

NEW

PENDING

Example
"ACTIVE"

AccountUpdateLevelInput

Fields
Input Field Description
accountId - AccountId!
level - AccountLevel!
Example
{"accountId": AccountId, "level": "ONE"}

AccountUpdateStatusInput

Fields
Input Field Description
accountId - AccountId!
comment - String
status - AccountStatus!
Example
{
  "accountId": AccountId,
  "comment": "xyz789",
  "status": "ACTIVE"
}

AuditedAccount

Description

Accounts are core to the Galoy architecture. they have users, and own wallets

Fields
Field Name Description
createdAt - Timestamp!
id - ID!
level - AccountLevel!
merchants - [Merchant!]!
owner - AuditedUser!
status - AccountStatus!
username - Username
wallets - [Wallet!]!
Example
{
  "createdAt": 1592577642,
  "id": 4,
  "level": "ONE",
  "merchants": [Merchant],
  "owner": AuditedUser,
  "status": "ACTIVE",
  "username": Username,
  "wallets": [Wallet]
}

AuditedUser

Fields
Field Name Description
createdAt - Timestamp!
email - Email Email address
id - ID!
language - Language!
phone - Phone
Example
{
  "createdAt": 1592577642,
  "email": Email,
  "id": "4",
  "language": Language,
  "phone": Phone
}

BTCWallet

Description

A wallet belonging to an account which contains a BTC balance and a list of transactions.

Fields
Field Name Description
accountId - ID!
balance - SignedAmount! A balance stored in BTC.
id - ID!
invoiceByPaymentHash - Invoice!
Arguments
paymentHash - PaymentHash!
invoices - InvoiceConnection A list of all invoices associated with walletIds optionally passed.
Arguments
after - String

Returns the items in the list that come after the specified cursor.

before - String

Returns the items in the list that come before the specified cursor.

first - Int

Returns the first n items from the list.

last - Int

Returns the last n items from the list.

pendingIncomingBalance - SignedAmount! An unconfirmed incoming onchain balance.
pendingIncomingTransactions - [Transaction!]!
pendingIncomingTransactionsByAddress - [Transaction!]!
Arguments
address - OnChainAddress!

Returns the items that include this address.

transactionById - Transaction!
Arguments
transactionId - ID!
transactions - TransactionConnection A list of BTC transactions associated with this wallet.
Arguments
after - String

Returns the items in the list that come after the specified cursor.

before - String

Returns the items in the list that come before the specified cursor.

first - Int

Returns the first n items from the list.

last - Int

Returns the last n items from the list.

transactionsByAddress - TransactionConnection
Arguments
address - OnChainAddress!

Returns the items that include this address.

after - String

Returns the items in the list that come after the specified cursor.

before - String

Returns the items in the list that come before the specified cursor.

first - Int

Returns the first n items from the list.

last - Int

Returns the last n items from the list.

transactionsByPaymentHash - [Transaction!]!
Arguments
paymentHash - PaymentHash!
transactionsByPaymentRequest - [Transaction!]!
Arguments
paymentRequest - LnPaymentRequest!
walletCurrency - WalletCurrency!
Example
{
  "accountId": "4",
  "balance": SignedAmount,
  "id": 4,
  "invoiceByPaymentHash": Invoice,
  "invoices": InvoiceConnection,
  "pendingIncomingBalance": SignedAmount,
  "pendingIncomingTransactions": [Transaction],
  "pendingIncomingTransactionsByAddress": [Transaction],
  "transactionById": Transaction,
  "transactions": TransactionConnection,
  "transactionsByAddress": TransactionConnection,
  "transactionsByPaymentHash": [Transaction],
  "transactionsByPaymentRequest": [Transaction],
  "walletCurrency": "BTC"
}

Boolean

Description

The Boolean scalar type represents true or false.

Example
true

Coordinates

Fields
Field Name Description
latitude - Float!
longitude - Float!
Example
{"latitude": 987.65, "longitude": 123.45}

CountryCode

Description

A CCA2 country code (ex US, FR, etc)

Example
"US"

DeepLinkAction

Values
Enum Value Description

SET_DEFAULT_ACCOUNT_MODAL

SET_LN_ADDRESS_MODAL

UPGRADE_ACCOUNT_MODAL

Example
"SET_DEFAULT_ACCOUNT_MODAL"

DeepLinkScreen

Values
Enum Value Description

CHAT

CIRCLES

CONVERT

EARN

HOME

MAP

PEOPLE

PRICE

RECEIVE

SCAN_QR

SETTINGS

SETTINGS_2FA

SETTINGS_ACCOUNT

SETTINGS_DEFAULT_ACCOUNT

SETTINGS_DISPLAY_CURRENCY

SETTINGS_EMAIL

SETTINGS_LANGUAGE

SETTINGS_NOTIFICATIONS

SETTINGS_SECURITY

SETTINGS_THEME

SETTINGS_TX_LIMITS

Example
"CHAT"

DisplayCurrency

Description

Display currency of an account

Example
DisplayCurrency

Email

Fields
Field Name Description
address - EmailAddress
verified - Boolean
Example
{
  "address": "test@test.com",
  "verified": true
}

EmailAddress

Description

Email address

Example
"test@test.com"

Error

Fields
Field Name Description
code - String
message - String!
path - [String]
Possible Types
Error Types

GraphQLApplicationError

Example
{
  "code": "xyz789",
  "message": "abc123",
  "path": ["abc123"]
}

ExternalUrl

Description

Url that will be fetched on events for the account

Example
ExternalUrl

Float

Description

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

Example
123.45

GraphQLApplicationError

Fields
Field Name Description
code - String
message - String!
path - [String]
Example
{
  "code": "xyz789",
  "message": "xyz789",
  "path": ["xyz789"]
}

ID

Description

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Example
"4"

InitiationVia

Example
InitiationViaIntraLedger

InitiationViaIntraLedger

Fields
Field Name Description
counterPartyUsername - Username
counterPartyWalletId - WalletId
Example
{
  "counterPartyUsername": Username,
  "counterPartyWalletId": WalletId
}

InitiationViaLn

Fields
Field Name Description
paymentHash - PaymentHash!
paymentRequest - LnPaymentRequest! Bolt11 invoice
Example
{
  "paymentHash": PaymentHash,
  "paymentRequest": LnPaymentRequest
}

InitiationViaOnChain

Fields
Field Name Description
address - OnChainAddress!
Example
{"address": OnChainAddress}

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Example
987

Invoice

Description

A lightning invoice.

Fields
Field Name Description
createdAt - Timestamp!
externalId - TxExternalId! The unique external id set for the invoice.
paymentHash - PaymentHash! The payment hash of the lightning invoice.
paymentRequest - LnPaymentRequest! The bolt11 invoice to be paid.
paymentSecret - LnPaymentSecret! The payment secret of the lightning invoice. This is not the preimage of the payment hash.
paymentStatus - InvoicePaymentStatus! The payment status of the invoice.
Example
{
  "createdAt": 1592577642,
  "externalId": TxExternalId,
  "paymentHash": PaymentHash,
  "paymentRequest": LnPaymentRequest,
  "paymentSecret": LnPaymentSecret,
  "paymentStatus": "EXPIRED"
}

InvoiceConnection

Description

A connection to a list of items.

Fields
Field Name Description
edges - [InvoiceEdge!] A list of edges.
pageInfo - PageInfo! Information to aid in pagination.
Example
{
  "edges": [InvoiceEdge],
  "pageInfo": PageInfo
}

InvoiceEdge

Description

An edge in a connection.

Fields
Field Name Description
cursor - String! A cursor for use in pagination
node - Invoice! The item at the end of the edge
Example
{
  "cursor": "xyz789",
  "node": Invoice
}

InvoicePaymentStatus

Values
Enum Value Description

EXPIRED

PAID

PENDING

Example
"EXPIRED"

Language

Example
Language

LightningInvoice

Fields
Field Name Description
confirmedAt - Timestamp
createdAt - Timestamp!
description - String!
expiresAt - Timestamp
isSettled - Boolean!
received - SatAmount!
request - LnPaymentRequest
secretPreImage - LnPaymentPreImage!
Example
{
  "confirmedAt": 1592577642,
  "createdAt": 1592577642,
  "description": "xyz789",
  "expiresAt": 1592577642,
  "isSettled": true,
  "received": SatAmount,
  "request": LnPaymentRequest,
  "secretPreImage": LnPaymentPreImage
}

LightningPayment

Fields
Field Name Description
amount - SatAmount
confirmedAt - Timestamp
createdAt - Timestamp
destination - LnPubkey
request - LnPaymentRequest
revealedPreImage - LnPaymentPreImage
roundedUpFee - SatAmount
status - LnPaymentStatus
Example
{
  "amount": SatAmount,
  "confirmedAt": 1592577642,
  "createdAt": 1592577642,
  "destination": LnPubkey,
  "request": LnPaymentRequest,
  "revealedPreImage": LnPaymentPreImage,
  "roundedUpFee": SatAmount,
  "status": "FAILED"
}

LnPaymentPreImage

Example
LnPaymentPreImage

LnPaymentRequest

Description

BOLT11 lightning invoice payment request with the amount included

Example
LnPaymentRequest

LnPaymentSecret

Example
LnPaymentSecret

LnPaymentStatus

Values
Enum Value Description

FAILED

PENDING

SETTLED

Example
"FAILED"

LnPubkey

Example
LnPubkey

LocalizedNotificationContentInput

Fields
Input Field Description
body - String!
language - Language!
title - String!
Example
{
  "body": "xyz789",
  "language": Language,
  "title": "xyz789"
}

MarketingNotificationTriggerInput

Fields
Input Field Description
icon - NotificationIcon
localizedNotificationContents - [LocalizedNotificationContentInput!]!
openDeepLink - OpenDeepLinkInput
openExternalUrl - OpenExternalUrlInput
phoneCountryCodesFilter - [CountryCode!]
shouldAddToBulletin - Boolean!
shouldAddToHistory - Boolean!
shouldSendPush - Boolean!
userIdsFilter - [ID!]
Example
{
  "icon": "ARROW_LEFT",
  "localizedNotificationContents": [
    LocalizedNotificationContentInput
  ],
  "openDeepLink": OpenDeepLinkInput,
  "openExternalUrl": OpenExternalUrlInput,
  "phoneCountryCodesFilter": ["US"],
  "shouldAddToBulletin": true,
  "shouldAddToHistory": false,
  "shouldSendPush": true,
  "userIdsFilter": ["4"]
}

Memo

Description

Text field in a lightning payment transaction

Example
Memo

Merchant

Fields
Field Name Description
coordinates - Coordinates! GPS coordinates for the merchant that can be used to place the related business on a map
createdAt - Timestamp!
id - ID!
title - String!
username - Username! The username of the merchant
validated - Boolean! Whether the merchant has been validated
Example
{
  "coordinates": Coordinates,
  "createdAt": 1592577642,
  "id": "4",
  "title": "xyz789",
  "username": Username,
  "validated": true
}

MerchantMapDeleteInput

Fields
Input Field Description
id - ID!
Example
{"id": 4}

MerchantMapValidateInput

Fields
Input Field Description
id - ID!
Example
{"id": "4"}

MerchantPayload

Fields
Field Name Description
errors - [Error!]!
merchant - Merchant
Example
{
  "errors": [Error],
  "merchant": Merchant
}

NotificationIcon

Values
Enum Value Description

ARROW_LEFT

ARROW_RIGHT

BACKSPACE

BANK

BELL

BITCOIN

BOOK

BTC_BOOK

CARET_DOWN

CARET_LEFT

CARET_RIGHT

CARET_UP

CHECK

CHECK_CIRCLE

CLOSE

CLOSE_CROSS_WITH_BACKGROUND

COINS

COPY_PASTE

DOLLAR

EYE

EYE_SLASH

FILTER

GLOBE

GRAPH

IMAGE

INFO

LIGHTNING

LINK

LOADING

MAGNIFYING_GLASS

MAP

MENU

NOTE

PAYMENT_ERROR

PAYMENT_PENDING

PAYMENT_SUCCESS

PENCIL

PEOPLE

QR_CODE

QUESTION

RANK

RECEIVE

REFRESH

SEND

SETTINGS

SHARE

TRANSFER

USER

VIDEO

WARNING

WARNING_WITH_BACKGROUND

Example
"ARROW_LEFT"

OnChainAddress

Description

An address for an on-chain bitcoin destination

Example
OnChainAddress

OnChainTxHash

Example
OnChainTxHash

OpenDeepLinkInput

Fields
Input Field Description
action - DeepLinkAction
screen - DeepLinkScreen
Example
{"action": "SET_DEFAULT_ACCOUNT_MODAL", "screen": "CHAT"}

OpenExternalUrlInput

Fields
Input Field Description
url - ExternalUrl!
Example
{"url": ExternalUrl}

PageInfo

Description

Information about pagination in a connection.

Fields
Field Name Description
endCursor - String When paginating forwards, the cursor to continue.
hasNextPage - Boolean! When paginating forwards, are there more items?
hasPreviousPage - Boolean! When paginating backwards, are there more items?
startCursor - String When paginating backwards, the cursor to continue.
Example
{
  "endCursor": "xyz789",
  "hasNextPage": false,
  "hasPreviousPage": true,
  "startCursor": "abc123"
}

PaymentHash

Example
PaymentHash

Phone

Description

Phone number which includes country code

Example
Phone

PriceInterface

Fields
Field Name Description
base - SafeInt!
currencyUnit - String! Deprecated due to type renaming
offset - Int!
Possible Types
PriceInterface Types

PriceOfOneSettlementMinorUnitInDisplayMinorUnit

Example
{
  "base": 9007199254740991,
  "currencyUnit": "xyz789",
  "offset": 987
}

PriceOfOneSettlementMinorUnitInDisplayMinorUnit

Description

Price of 1 sat or 1 usd cent in base/offset. To calculate, use: base / 10^offset

Fields
Field Name Description
base - SafeInt!
currencyUnit - String! Deprecated due to type renaming
formattedAmount - String! Deprecated please use base / 10^offset
offset - Int!
Example
{
  "base": 9007199254740991,
  "currencyUnit": "abc123",
  "formattedAmount": "xyz789",
  "offset": 123
}

SafeInt

Description

Non-fractional signed whole numeric value between -(2^53) + 1 and 2^53 - 1

Example
9007199254740991

SatAmount

Description

(Positive) Satoshi amount

Example
SatAmount

SettlementVia

Example
SettlementViaIntraLedger

SettlementViaIntraLedger

Fields
Field Name Description
counterPartyUsername - Username Settlement destination: Could be null if the payee does not have a username
counterPartyWalletId - WalletId
preImage - LnPaymentPreImage
Example
{
  "counterPartyUsername": Username,
  "counterPartyWalletId": WalletId,
  "preImage": LnPaymentPreImage
}

SettlementViaLn

Fields
Field Name Description
paymentSecret - LnPaymentSecret Shifting property to 'preImage' to improve granularity of the LnPaymentSecret type
preImage - LnPaymentPreImage
Example
{
  "paymentSecret": LnPaymentSecret,
  "preImage": LnPaymentPreImage
}

SettlementViaOnChain

Fields
Field Name Description
arrivalInMempoolEstimatedAt - Timestamp
transactionHash - OnChainTxHash
vout - Int
Example
{
  "arrivalInMempoolEstimatedAt": 1592577642,
  "transactionHash": OnChainTxHash,
  "vout": 987
}

SignedAmount

Description

An amount (of a currency) that can be negative (e.g. in a transaction)

Example
SignedAmount

SignedDisplayMajorAmount

Description

A string amount (of a currency) that can be negative (e.g. in a transaction)

Example
SignedDisplayMajorAmount

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Example
"xyz789"

SuccessPayload

Fields
Field Name Description
errors - [Error!]!
success - Boolean
Example
{"errors": [Error], "success": false}

Timestamp

Description

Timestamp field, serialized as Unix time (the number of seconds since the Unix epoch)

Example
1592577642

Transaction

Description

Give details about an individual transaction. Galoy have a smart routing system which is automatically settling intraledger when both the payer and payee use the same wallet therefore it's possible the transactions is being initiated onchain or with lightning but settled intraledger.

Fields
Field Name Description
createdAt - Timestamp!
direction - TxDirection!
externalId - TxExternalId
id - ID!
initiationVia - InitiationVia! From which protocol the payment has been initiated.
memo - Memo
settlementAmount - SignedAmount! Amount of the settlement currency sent or received.
settlementCurrency - WalletCurrency! Wallet currency for transaction.
settlementDisplayAmount - SignedDisplayMajorAmount!
settlementDisplayCurrency - DisplayCurrency!
settlementDisplayFee - SignedDisplayMajorAmount!
settlementFee - SignedAmount!
settlementPrice - PriceOfOneSettlementMinorUnitInDisplayMinorUnit! Price in WALLETCURRENCY/SETTLEMENTUNIT at time of settlement.
settlementVia - SettlementVia! To which protocol the payment has settled on.
status - TxStatus!
Example
{
  "createdAt": 1592577642,
  "direction": "RECEIVE",
  "externalId": TxExternalId,
  "id": 4,
  "initiationVia": InitiationViaIntraLedger,
  "memo": Memo,
  "settlementAmount": SignedAmount,
  "settlementCurrency": "BTC",
  "settlementDisplayAmount": SignedDisplayMajorAmount,
  "settlementDisplayCurrency": DisplayCurrency,
  "settlementDisplayFee": SignedDisplayMajorAmount,
  "settlementFee": SignedAmount,
  "settlementPrice": PriceOfOneSettlementMinorUnitInDisplayMinorUnit,
  "settlementVia": SettlementViaIntraLedger,
  "status": "FAILURE"
}

TransactionConnection

Description

A connection to a list of items.

Fields
Field Name Description
edges - [TransactionEdge!] A list of edges.
pageInfo - PageInfo! Information to aid in pagination.
Example
{
  "edges": [TransactionEdge],
  "pageInfo": PageInfo
}

TransactionEdge

Description

An edge in a connection.

Fields
Field Name Description
cursor - String! A cursor for use in pagination
node - Transaction! The item at the end of the edge
Example
{
  "cursor": "xyz789",
  "node": Transaction
}

TxDirection

Values
Enum Value Description

RECEIVE

SEND

Example
"RECEIVE"

TxExternalId

Description

An external reference id that can be optionally added for transactions.

Example
TxExternalId

TxStatus

Values
Enum Value Description

FAILURE

PENDING

SUCCESS

Example
"FAILURE"

UsdWallet

Description

A wallet belonging to an account which contains a USD balance and a list of transactions.

Fields
Field Name Description
accountId - ID!
balance - SignedAmount!
id - ID!
invoiceByPaymentHash - Invoice!
Arguments
paymentHash - PaymentHash!
invoices - InvoiceConnection A list of all invoices associated with walletIds optionally passed.
Arguments
after - String

Returns the items in the list that come after the specified cursor.

before - String

Returns the items in the list that come before the specified cursor.

first - Int

Returns the first n items from the list.

last - Int

Returns the last n items from the list.

pendingIncomingBalance - SignedAmount! An unconfirmed incoming onchain balance.
pendingIncomingTransactions - [Transaction!]!
pendingIncomingTransactionsByAddress - [Transaction!]!
Arguments
address - OnChainAddress!

Returns the items that include this address.

transactionById - Transaction!
Arguments
transactionId - ID!
transactions - TransactionConnection
Arguments
after - String

Returns the items in the list that come after the specified cursor.

before - String

Returns the items in the list that come before the specified cursor.

first - Int

Returns the first n items from the list.

last - Int

Returns the last n items from the list.

transactionsByAddress - TransactionConnection
Arguments
address - OnChainAddress!

Returns the items that include this address.

after - String

Returns the items in the list that come after the specified cursor.

before - String

Returns the items in the list that come before the specified cursor.

first - Int

Returns the first n items from the list.

last - Int

Returns the last n items from the list.

transactionsByPaymentHash - [Transaction!]!
Arguments
paymentHash - PaymentHash!
transactionsByPaymentRequest - [Transaction!]!
Arguments
paymentRequest - LnPaymentRequest!
walletCurrency - WalletCurrency!
Example
{
  "accountId": 4,
  "balance": SignedAmount,
  "id": "4",
  "invoiceByPaymentHash": Invoice,
  "invoices": InvoiceConnection,
  "pendingIncomingBalance": SignedAmount,
  "pendingIncomingTransactions": [Transaction],
  "pendingIncomingTransactionsByAddress": [Transaction],
  "transactionById": Transaction,
  "transactions": TransactionConnection,
  "transactionsByAddress": TransactionConnection,
  "transactionsByPaymentHash": [Transaction],
  "transactionsByPaymentRequest": [Transaction],
  "walletCurrency": "BTC"
}

UserUpdatePhoneInput

Fields
Input Field Description
accountId - AccountId!
phone - Phone!
Example
{
  "accountId": AccountId,
  "phone": Phone
}

Username

Description

Unique identifier of a user

Example
Username

Wallet

Description

A generic wallet which stores value in one of our supported currencies.

Fields
Field Name Description
accountId - ID!
balance - SignedAmount!
id - ID!
invoiceByPaymentHash - Invoice!
Arguments
paymentHash - PaymentHash!

The lightning invoice with the matching paymentHash belonging to this wallet.

invoices - InvoiceConnection
Arguments
after - String

Returns the items in the list that come after the specified cursor.

before - String

Returns the items in the list that come before the specified cursor.

first - Int

Returns the first n items from the list.

last - Int

Returns the last n items from the list.

pendingIncomingBalance - SignedAmount!
pendingIncomingTransactions - [Transaction!]! Pending incoming OnChain transactions. When transactions are confirmed they will receive a new id and be found in the transactions list. Transactions are ordered anti-chronologically, ie: the newest transaction will be first
pendingIncomingTransactionsByAddress - [Transaction!]! Pending incoming OnChain transactions. When transactions are confirmed they will receive a new id and be found in the transactions list. Transactions are ordered anti-chronologically, ie: the newest transaction will be first
Arguments
address - OnChainAddress!

Returns the items that include this address.

transactionById - Transaction!
Arguments
transactionId - ID!
transactions - TransactionConnection Transactions are ordered anti-chronologically, ie: the newest transaction will be first
Arguments
after - String

Returns the items in the list that come after the specified cursor.

before - String

Returns the items in the list that come before the specified cursor.

first - Int

Returns the first n items from the list.

last - Int

Returns the last n items from the list.

transactionsByAddress - TransactionConnection Transactions are ordered anti-chronologically, ie: the newest transaction will be first
Arguments
address - OnChainAddress!

Returns the items that include this address.

after - String

Returns the items in the list that come after the specified cursor.

before - String

Returns the items in the list that come before the specified cursor.

first - Int

Returns the first n items from the list.

last - Int

Returns the last n items from the list.

transactionsByPaymentHash - [Transaction!]! Returns the transactions that include this paymentHash. This should be a list of size one for a received lightning payment. This can be more that one transaction for a sent lightning payment.
Arguments
paymentHash - PaymentHash!

The payment hash of the lightning invoice paid in this transaction.

transactionsByPaymentRequest - [Transaction!]! Returns the transactions that include this paymentRequest.
Arguments
paymentRequest - LnPaymentRequest!

Lightning invoice paid in this transaction.

walletCurrency - WalletCurrency!
Possible Types
Wallet Types

BTCWallet

UsdWallet

Example
{
  "accountId": "4",
  "balance": SignedAmount,
  "id": 4,
  "invoiceByPaymentHash": Invoice,
  "invoices": InvoiceConnection,
  "pendingIncomingBalance": SignedAmount,
  "pendingIncomingTransactions": [Transaction],
  "pendingIncomingTransactionsByAddress": [Transaction],
  "transactionById": Transaction,
  "transactions": TransactionConnection,
  "transactionsByAddress": TransactionConnection,
  "transactionsByPaymentHash": [Transaction],
  "transactionsByPaymentRequest": [Transaction],
  "walletCurrency": "BTC"
}

WalletCurrency

Values
Enum Value Description

BTC

USD

Example
"BTC"

WalletId

Description

Unique identifier of a wallet

Example
WalletId