Skip to main content

NeoBankService Actions

16 actions registered.

NameDeprecated
attachAutorampQuote
createAutoramp
getAutoramp
getAutorampQuote
getAutorampQuoteForAutoramp
getAutoramps
getCustomerAbilities
getCustomerByExternalId
getDepositInstructions
getMicrodeposits
getMoonpayCustomerId
getPixDepositInstructions
getWalletRegistrationStatus
listAutorampTransactions
registerPixAddress
registerSelfHostedWallet

NeoBankService:attachAutorampQuote​

Package: @metamask/ramps-controller

Attaches a signed quote to an autoramp via neobank-proxy POST /neobank/autoramps/{autoramp_id}/quotes.

Parameters:

NameDescription
autorampIdAutoramp id.
bodyQuote attachment payload (forwarded as-is).
optionsOptional idempotency key.

Returns: Parsed proxy JSON response.

Handler signature:

(autorampId: string, body: Record<string, unknown>, options?: NeoBankRequestOptions) => Promise<Json>

NeoBankService:createAutoramp​

Package: @metamask/ramps-controller

Creates an autoramp from a signed quote via neobank-proxy POST /neobank/autoramps (MoonPay POST /api/autoramps).

Parameters:

NameDescription
bodyCreateAutoramp / signed-quote payload (forwarded as-is).
optionsOptional idempotency key.

Returns: Remote snapshot for controller apply/refresh.

Handler signature:

(body: Record<string, unknown>, options?: NeoBankRequestOptions) => Promise<AutorampRemoteSnapshot>

NeoBankService:getAutoramp​

Package: @metamask/ramps-controller

Fetches an autoramp account via neobank-proxy GET /neobank/autoramps/{autoramp_id} (MoonPay GET /api/autoramps/{autoramp_id}).

Parameters:

NameDescription
autorampIdMoonPay / Ramp API autoramp id.

Returns: Remote snapshot for controller apply/refresh.

Handler signature:

(autorampId: string) => Promise<AutorampRemoteSnapshot>

NeoBankService:getAutorampQuote​

Package: @metamask/ramps-controller

Fetches an autoramp quote via neobank-proxy GET /neobank/autoramps/quote.

Parameters:

NameDescription
queryQuote query params (forwarded as-is).

Returns: Parsed proxy JSON response.

Handler signature:

(query?: NeoBankQueryParams) => Promise<Json>

NeoBankService:getAutorampQuoteForAutoramp​

Package: @metamask/ramps-controller

Fetches a quote for an existing autoramp via neobank-proxy GET /neobank/autoramps/{autoramp_id}/quote.

Parameters:

NameDescription
autorampIdAutoramp id.
queryQuote query params (forwarded as-is).

Returns: Parsed proxy JSON response.

Handler signature:

(autorampId: string, query?: NeoBankQueryParams) => Promise<Json>

NeoBankService:getAutoramps​

Package: @metamask/ramps-controller

Fetches autoramp accounts, following MoonPay cursor pages until the list is complete.

Pass customerId to scope the list to one MoonPay customer. Omitting it asks the proxy for the partner-wide list. Each request uses MoonPay's maximum page_size.

Parameters:

NameDescription
paramsOptional filters.
params.customerIdMoonPay customer id.

Returns: Remote snapshots for every page.

Handler signature:

(params?: {
customerId?: string;
}) => Promise<AutorampRemoteSnapshot[]>

NeoBankService:getCustomerAbilities​

Package: @metamask/ramps-controller

Reads the customer's rail abilities via neobank-proxy GET /neobank/customers/{customer_id}/abilities (MoonPay GET /api/customers/{id}/abilities).

MoonPay rejects an autoramp create with a 422 when the rail it needs is not Active, even for an Active customer. The customer id is resolved the same way as in getMicrodeposits. Any non-2xx response, including a 404 when there is no customer yet, throws an HttpError.

Returns: MoonPay customer abilities, unmodified.

Handler signature:

() => Promise<NeoBankCustomerAbilities>

NeoBankService:getCustomerByExternalId​

Package: @metamask/ramps-controller

Fetches a customer by partner external id via neobank-proxy GET /neobank/customers/{external_id}/external.

Parameters:

NameDescription
externalIdPartner-assigned external customer id.

Returns: Parsed proxy JSON response.

Handler signature:

(externalId: string) => Promise<Json>

NeoBankService:getDepositInstructions​

Package: @metamask/ramps-controller

Loads deposit details for an autoramp, whichever rail it has.

Calls GET /neobank/autoramps/{id} and reads the PIX rail, or else a US bank rail (ACH, Wire, RTP, or FedNow), or else the SEPA rail. SEPA details also carry the autoramp's inbound_payment_reference as paymentReference when MoonPay uses pay-by-reference, and is_third_party as isThirdParty when the response has one. Returns null until MoonPay has attached a supported rail. MoonPay only verifies the rail at Approved, so callers should not show these details before then.

Parameters:

NameDescription
autorampIdMoonPay autoramp id.

Returns: Deposit details discriminated by type, or null.

Handler signature:

(autorampId: string) => Promise<AutorampDepositInstructions | null>

NeoBankService:getMicrodeposits​

Package: @metamask/ramps-controller

Lists the customer's bank-link microdeposits via neobank-proxy GET /neobank/customers/{customer_id}/microdeposits (MoonPay GET /api/customers/{id}/microdeposits).

The customer id is resolved through getMoonpayCustomerId at most once per service instance; concurrent callers share the in-flight lookup and a failed lookup is retried by the next call. A 404 (from the customer lookup or the list) means there is no customer or no deposits yet and resolves []. Any other non-2xx response throws an HttpError. The customer lookup is a single attempt: it does not go through the retry policy.

Returns: MoonPay microdeposits, unmodified.

Handler signature:

() => Promise<NeoBankMicrodeposit[]>

NeoBankService:getMoonpayCustomerId​

Package: @metamask/ramps-controller

Resolves Iron's internal customer id via neobank-proxy customer lookup, using the MetaMask canonical profile id as the partner external_id.

Returns: Iron's internal customer id.

Handler signature:

() => Promise<string>

NeoBankService:getPixDepositInstructions​

Package: @metamask/ramps-controller

Loads PIX deposit instructions for an autoramp.

Calls GET /neobank/autoramps/{id} and reads the type: Pix rail (br_code, instruction, optional pix_key). Returns null until MoonPay has attached deposit rails (typically once the autoramp is Approved).

Parameters:

NameDescription
autorampIdMoonPay autoramp id.

Returns: PIX instructions, or null when the rail is not ready.

Handler signature:

(autorampId: string) => Promise<PixDepositInstructions | null>

NeoBankService:getWalletRegistrationStatus​

Package: @metamask/ramps-controller

Checks whether a Monad Money Account address is already registered for the given Iron customer.

Parameters:

NameDescription
paramsCustomer id and address to check.
params.customerIdIron / MoonPay customer UUID.
params.addressMoney Account address.

Returns: Active, disabled, or absent registration status.

Handler signature:

({ customerId, address, }: GetWalletRegistrationStatusParams) => Promise<RegistrationStatus>

NeoBankService:listAutorampTransactions​

Package: @metamask/ramps-controller

Lists the newest page of transactions for one autoramp via GET /neobank/autoramp-transactions?autoramp_id=&sort_order=desc.

This is the first page only, not the full history. Poll status (Completed, Failed, …). The deprecated state field is ignored.

Parameters:

NameDescription
autorampIdMoonPay autoramp id.
optionsOptional page size. Omitted requests use the API default.
options.pageSizepage_size query value. Callers that diff status pass 50.

Returns: Transaction summaries from the newest page.

Handler signature:

(autorampId: string, options?: {
pageSize?: number;
}) => Promise<AutorampTransactionSummary[]>

NeoBankService:registerPixAddress​

Package: @metamask/ramps-controller

Registers a Pix address via neobank-proxy POST /neobank/addresses/pix. Body is forwarded as opaque JSON (MoonPay address schema).

Parameters:

NameDescription
bodyPix address registration payload.
optionsOptional idempotency key.

Returns: Parsed proxy JSON response.

Handler signature:

(body: Record<string, unknown>, options?: NeoBankRequestOptions) => Promise<Json>

NeoBankService:registerSelfHostedWallet​

Package: @metamask/ramps-controller

Submits a signed Monad Money Account ownership proof via neobank-proxy POST /neobank/addresses/crypto/selfhosted.

Parameters:

NameDescription
paramsSigned ownership proof.

Returns: Registered wallet record.

Handler signature:

(params: RegisterSelfHostedWalletParams) => Promise<RegistrationOutcome>