Skip to main content

Merchants & Providers

These queries return information about the authenticated merchant and the transaction providers configured for that merchant account.


merchantApi

Return the authenticated merchant's profile. Useful for verifying credentials and retrieving the merchant's public ID.

query GetMerchant {
merchantApi {
id
name
publicId
createdAt
updatedAt
}
}

Arguments

None. The merchant is determined from the accrupay-api-secret header.

Return shape

FieldTypeDescription
idStringAccruPay merchant UUID
nameStringMerchant display name
publicIdStringPublic-facing merchant identifier — used by the React SDK to initialize the checkout component
createdAtDateTimeISOAccount creation timestamp
updatedAtDateTimeISOLast update timestamp

merchantApiTransactionProviders

List all transaction providers configured for the authenticated merchant.

query ListProviders($status: MERCHANT_TRANSACTION_PROVIDER_STATUS, $take: Int) {
merchantApiTransactionProviders(status: $status, take: $take) {
edges {
node {
id
provider
providerCode
status
createdAt
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
totalCount
}
}

Arguments

ArgumentTypeDescription
idStringFilter by provider record UUID
providerTRANSACTION_PROVIDERFilter by provider enum
statusMERCHANT_TRANSACTION_PROVIDER_STATUSFilter by ENABLED / DISABLED
take / skipIntOffset pagination
first / after, last / beforeInt / ConnectionCursorCursor pagination
sorting[SortingFieldSchema!]Sort order

Return shapeMerchantTransactionProviderPaginationConnection (edges { node }, pageInfo, totalCount). Each node:

FieldTypeDescription
idIDAccruPay provider record UUID — use this as merchantTransactionProviderId in mutations
providerTRANSACTION_PROVIDERProvider enum identifier (e.g. NUVEI, STRIPE)
providerCodeStringProvider's own reference code
statusMERCHANT_TRANSACTION_PROVIDER_STATUSENABLED or DISABLED
merchantIdStringOwning merchant ID
applicationIdString | nullProvider application ID, when applicable
createdAtDateTimeISOProvider record creation timestamp
updatedAtDateTimeISOLast update timestamp

merchantApiTransactionProvider

Fetch a single transaction provider record by ID.

query GetProvider($merchantTransactionProviderId: String!) {
merchantApiTransactionProvider(
merchantTransactionProviderId: $merchantTransactionProviderId
) {
id
provider
providerCode
status
createdAt
updatedAt
}
}

Arguments

ArgumentTypeRequiredDescription
merchantTransactionProviderIdStringYesAccruPay provider record UUID

Return shape

FieldTypeDescription
idIDProvider record UUID
providerTRANSACTION_PROVIDERProvider enum
providerCodeStringProvider's own reference code
statusMERCHANT_TRANSACTION_PROVIDER_STATUSENABLED or DISABLED
merchantIdStringOwning merchant ID
applicationIdString | nullProvider application ID, when applicable
createdAtDateTimeISOCreation timestamp
updatedAtDateTimeISOLast update timestamp

Provider IDs vs provider enums

Most mutations accept either merchantTransactionProviderId or transactionProvider to specify which provider to route through.

OptionWhen to use
merchantTransactionProviderIdYou have multiple providers of the same type, or you want to be explicit about which configured record to use
transactionProviderYou have exactly one provider of that type; AccruPay resolves the record automatically

If both are provided, they are combined (AND): they must resolve to the same connected provider account, otherwise the request fails with a provider-not-found error. If neither is provided, the mutation fails with a provider-selection AppError key in extensions.code. See Errors.