Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .stainless/stainless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,7 @@ openapi:
- "$.components.schemas.PaymentPolygonWalletInfo.allOf[0]"
- "$.components.schemas.PaymentBaseWalletInfo.allOf[0]"
- "$.components.schemas.PaymentEthereumWalletInfo.allOf[0]"
- "$.components.schemas.PaymentEmbeddedWalletInfo.allOf[0]"
keys: [ "$ref" ]

# ── Remove $ref to BaseExternalAccountInfo from external account variants ──
Expand Down
37 changes: 36 additions & 1 deletion mintlify/openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 36 additions & 1 deletion openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions openapi/components/schemas/common/PaymentAccountType.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ enum:
- POLYGON_WALLET
- BASE_WALLET
- ETHEREUM_WALLET
- EMBEDDED_WALLET
description: Type of payment account or wallet
example: USD_ACCOUNT
23 changes: 23 additions & 0 deletions openapi/components/schemas/common/PaymentEmbeddedWalletInfo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
title: Embedded Wallet
allOf:
- $ref: ./BasePaymentAccountInfo.yaml
- type: object
required:
- accountType
- payloadToSign
properties:
accountType:
type: string
enum:
- EMBEDDED_WALLET
description: Discriminator value identifying this as Embedded Wallet payment instructions.
payloadToSign:
type: string
description: >-
JSON-encoded transaction signing payload that must be signed, as-is
(byte-for-byte, without re-serialization), with the session private
key of a verified authentication credential on the source Embedded
Wallet. The resulting signature is base64-encoded and passed as the
`Grid-Wallet-Signature` header on `POST /quotes/{quoteId}/execute`
to authorize the outbound transfer from the wallet.
example: '{"type":"ACTIVITY_TYPE_SIGN_TRANSACTION_V2","timestampMs":"1746736509954","organizationId":"org_abc123","parameters":{"signWith":"wallet_abc123def456","unsignedTransaction":"ea69b4bf05f775209f26ff0a34a05569180f7936579d5c4af9377ae550194f72","type":"TRANSACTION_TYPE_ETHEREUM"},"generateAppProofs":true}'
2 changes: 2 additions & 0 deletions openapi/components/schemas/common/PaymentInstructions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ properties:
- $ref: ../common/PaymentPolygonWalletInfo.yaml
- $ref: ../common/PaymentBaseWalletInfo.yaml
- $ref: ../common/PaymentEthereumWalletInfo.yaml
- $ref: ../common/PaymentEmbeddedWalletInfo.yaml
discriminator:
propertyName: accountType
mapping:
Expand Down Expand Up @@ -103,3 +104,4 @@ properties:
HTG_ACCOUNT: ../common/PaymentHtgAccountInfo.yaml
JMD_ACCOUNT: ../common/PaymentJmdAccountInfo.yaml
PKR_ACCOUNT: ../common/PaymentPkrAccountInfo.yaml
EMBEDDED_WALLET: ../common/PaymentEmbeddedWalletInfo.yaml
7 changes: 7 additions & 0 deletions openapi/components/schemas/quotes/QuoteRequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ properties:

This can only be used for quotes with a `source` which is either an internal account,
or has direct pull functionality (e.g. ACH pull with an external account).

Not supported when the `source` is an internal account of type
`EMBEDDED_WALLET`: those transfers require a `Grid-Wallet-Signature`
over the `payloadToSign` returned in the quote response, which is not
available in a combined create-and-execute call. Create the quote
first with `immediatelyExecute: false` and then call
`POST /quotes/{quoteId}/execute` with the signature header.
example: false
description:
type: string
Expand Down
27 changes: 24 additions & 3 deletions openapi/paths/quotes/quotes_{quoteId}_execute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ post:
This endpoint can only be used for quotes with a `source` which is either an internal account,
or has direct pull functionality (e.g. ACH pull with an external account).
Comment thread
pengying marked this conversation as resolved.

When the quote's `source` is an internal account of type `EMBEDDED_WALLET`,
the request must include a `Grid-Wallet-Signature` header. The signature is
produced by signing the `payloadToSign` value from the quote's
`paymentInstructions[].accountOrWalletInfo` entry with the session private
key of a verified authentication credential on the source Embedded Wallet.

Once executed, the quote cannot be cancelled and the transfer will be processed.
operationId: executeQuote
tags:
Expand All @@ -30,6 +36,19 @@ post:
schema:
type: string
example: <uuid>
- name: Grid-Wallet-Signature
in: header
required: false
description: >-
Signature over the `payloadToSign` returned in the quote's
`paymentInstructions[].accountOrWalletInfo` entry, produced with the
session private key of a verified authentication credential on the
source Embedded Wallet and base64-encoded. Required when the quote's
source is an internal account of type `EMBEDDED_WALLET`; ignored for
other source types.
schema:
type: string
example: MEUCIQDx7k2N0aK4p8f3vR9J6yT5wL1mB0sXnG2hQ4vJ8zYkCgIgZ4rP9dT7eWfU3oM6KjR1qSpNvBwL0tXyA2iG8fH5dE=
responses:
'200':
description: >
Expand All @@ -47,7 +66,11 @@ post:
schema:
$ref: ../../components/schemas/errors/Error400.yaml
'401':
description: Unauthorized
description: >-
Unauthorized. Also returned when the quote's source is an internal
account of type `EMBEDDED_WALLET` and the provided
`Grid-Wallet-Signature` header is missing, malformed, or does not
match the quote's `payloadToSign`.
content:
application/json:
schema:
Expand All @@ -70,5 +93,3 @@ post:
application/json:
schema:
$ref: ../../components/schemas/errors/Error500.yaml


Loading