GraphQL Admin API Reference
Welcome to the Blink Admin API reference!
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
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 |
---|---|
|
|
|
|
|
Example
"ONE"
AccountStatus
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
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
|
|
invoices - InvoiceConnection
|
A list of all invoices associated with walletIds optionally passed. |
pendingIncomingBalance - SignedAmount!
|
An unconfirmed incoming onchain balance. |
pendingIncomingTransactions - [Transaction!]!
|
|
pendingIncomingTransactionsByAddress - [Transaction!]!
|
|
Arguments
|
|
transactionById - Transaction!
|
|
Arguments
|
|
transactions - TransactionConnection
|
A list of BTC transactions associated with this wallet. |
transactionsByAddress - TransactionConnection
|
|
Arguments
|
|
transactionsByPaymentHash - [Transaction!]!
|
|
Arguments
|
|
transactionsByPaymentRequest - [Transaction!]!
|
|
Arguments
|
|
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
CountryCode
Description
A CCA2 country code (ex US, FR, etc)
Example
"US"
DeepLinkAction
Values
Enum Value | Description |
---|---|
|
|
|
|
|
Example
"SET_DEFAULT_ACCOUNT_MODAL"
DeepLinkScreen
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"CHAT"
DisplayCurrency
Description
Display currency of an account
Example
DisplayCurrency
Fields
Field Name | Description |
---|---|
address - EmailAddress
|
|
verified - Boolean
|
Example
{
"address": "test@test.com",
"verified": true
}
EmailAddress
Description
Email address
Example
"test@test.com"
Error
Possible Types
Error Types |
---|
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
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
Types
Union Types |
---|
Example
InitiationViaIntraLedger
InitiationViaIntraLedger
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
InvoicePaymentStatus
Values
Enum Value | Description |
---|---|
|
|
|
|
|
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 |
---|---|
|
|
|
|
|
Example
"FAILED"
LnPubkey
Example
LnPubkey
LocalizedNotificationContentInput
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
NotificationIcon
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
PriceOfOneSettlementMinorUnitInDisplayMinorUnit
Description
Price of 1 sat or 1 usd cent in base/offset. To calculate, use: base / 10^offset
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
Types
Union Types |
---|
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
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 |
---|---|
|
|
|
Example
"RECEIVE"
TxExternalId
Description
An external reference id that can be optionally added for transactions.
Example
TxExternalId
TxStatus
Values
Enum Value | Description |
---|---|
|
|
|
|
|
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
|
|
invoices - InvoiceConnection
|
A list of all invoices associated with walletIds optionally passed. |
pendingIncomingBalance - SignedAmount!
|
An unconfirmed incoming onchain balance. |
pendingIncomingTransactions - [Transaction!]!
|
|
pendingIncomingTransactionsByAddress - [Transaction!]!
|
|
Arguments
|
|
transactionById - Transaction!
|
|
Arguments
|
|
transactions - TransactionConnection
|
|
transactionsByAddress - TransactionConnection
|
|
Arguments
|
|
transactionsByPaymentHash - [Transaction!]!
|
|
Arguments
|
|
transactionsByPaymentRequest - [Transaction!]!
|
|
Arguments
|
|
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
|
|
invoices - InvoiceConnection
|
|
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
|
|
transactionById - Transaction!
|
|
Arguments
|
|
transactions - TransactionConnection
|
Transactions are ordered anti-chronologically, ie: the newest transaction will be first |
transactionsByAddress - TransactionConnection
|
Transactions are ordered anti-chronologically, ie: the newest transaction will be first |
Arguments
|
|
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
|
|
transactionsByPaymentRequest - [Transaction!]!
|
Returns the transactions that include this paymentRequest. |
Arguments
|
|
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"
}
WalletCurrency
Values
Enum Value | Description |
---|---|
|
|
|
Example
"BTC"
WalletId
Description
Unique identifier of a wallet
Example
WalletId