From 2950b204395be823f5caa58c4c9c41b830372db4 Mon Sep 17 00:00:00 2001 From: Jarrod Watts Date: Tue, 15 Jul 2025 10:32:14 +1000 Subject: [PATCH 1/8] Add Fiat on ramp section --- abstract-global-wallet/fiat-on-ramp/overview.mdx | 5 +++++ docs.json | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 abstract-global-wallet/fiat-on-ramp/overview.mdx diff --git a/abstract-global-wallet/fiat-on-ramp/overview.mdx b/abstract-global-wallet/fiat-on-ramp/overview.mdx new file mode 100644 index 0000000..db530ea --- /dev/null +++ b/abstract-global-wallet/fiat-on-ramp/overview.mdx @@ -0,0 +1,5 @@ +--- +title: "FIAT On-ramp" +sidebarTitle: "Overview" +description: "Learn about FIAT on-ramp functionality with Abstract Global Wallet" +--- diff --git a/docs.json b/docs.json index 7dfb438..ba917db 100644 --- a/docs.json +++ b/docs.json @@ -198,6 +198,12 @@ "abstract-global-wallet/agw-react/hooks/useRevokeSessions" ] }, + { + "group": "FIAT On-ramp", + "pages": [ + "abstract-global-wallet/fiat-on-ramp/overview" + ] + }, { "group": "Utils", "pages": [ From 712cd193895c2991a5eac7f5a041837b4637f7ed Mon Sep 17 00:00:00 2001 From: Jarrod Watts Date: Tue, 15 Jul 2025 11:56:40 +1000 Subject: [PATCH 2/8] WIP Fiat onramp --- .../fiat-on-ramp/config.mdx | 187 ++++++++++++++++++ .../fiat-on-ramp/currencies.mdx | 114 +++++++++++ .../fiat-on-ramp/overview.mdx | 56 +++++- .../fiat-on-ramp/payment-methods.mdx | 90 +++++++++ abstract-global-wallet/fiat-on-ramp/quote.mdx | 162 +++++++++++++++ .../fiat-on-ramp/transactions.mdx | 150 ++++++++++++++ .../fiat-on-ramp/widget.mdx | 134 +++++++++++++ docs.json | 8 +- 8 files changed, 899 insertions(+), 2 deletions(-) create mode 100644 abstract-global-wallet/fiat-on-ramp/config.mdx create mode 100644 abstract-global-wallet/fiat-on-ramp/currencies.mdx create mode 100644 abstract-global-wallet/fiat-on-ramp/payment-methods.mdx create mode 100644 abstract-global-wallet/fiat-on-ramp/quote.mdx create mode 100644 abstract-global-wallet/fiat-on-ramp/transactions.mdx create mode 100644 abstract-global-wallet/fiat-on-ramp/widget.mdx diff --git a/abstract-global-wallet/fiat-on-ramp/config.mdx b/abstract-global-wallet/fiat-on-ramp/config.mdx new file mode 100644 index 0000000..3b5dab9 --- /dev/null +++ b/abstract-global-wallet/fiat-on-ramp/config.mdx @@ -0,0 +1,187 @@ +--- +title: "/config" +api: "GET https://onramp.staging-portal.abs.xyz/config" +description: "Return a list of countries, purchase limits, and service providers available for onramp." +--- + +## Response + + + Array of supported countries with their regions and default currencies + + + The ISO 3166 2-digit country code + + + The display name for the Country + + + The URL to the Country's flag image + + + The set of supported regions within the Country. If null, then all regions within the Country are supported + + + The alphanumeric code (ISO 3166-2) for the Region + + + The display name for the Region + + + + + The currency code for the default currency of this country + + + + + + Array of purchase limits by currency + + + The currency code + + + The default purchase amount + + + The minimum purchase amount + + + The maximum purchase amount + + + + + + Array of available service providers + + + Service provider identifier + + + Display name of the service provider + + + Current status of the provider + + + Array of service categories + + + Status of each category + + + Provider's website URL + + + Provider's customer support URL + + + Provider logos for different themes + + + Dark theme logo URL + + + Light theme logo URL + + + Dark theme short logo URL + + + Light theme short logo URL + + + + + + + + +```bash cURL +curl -X GET "https://onramp.staging-portal.abs.xyz/config" +``` + +```javascript JavaScript +const response = await fetch('https://onramp.staging-portal.abs.xyz/config'); +const config = await response.json(); +``` + + + + + +```json Response +{ + "countries": [ + { + "countryCode": "CA", + "name": "Canada", + "flagImageUrl": "https://images-country.meld.io/CA/flag.svg", + "regions": [ + { + "regionCode": "CA-AB", + "name": "Alberta" + }, + { + "regionCode": "CA-BC", + "name": "British Columbia" + } + ], + "defaultFiatCurrency": "CAD" + }, + { + "countryCode": "US", + "name": "United States", + "flagImageUrl": "https://images-country.meld.io/US/flag.svg", + "regions": [ + { + "regionCode": "US-CA", + "name": "California" + }, + { + "regionCode": "US-NY", + "name": "New York" + } + ], + "defaultFiatCurrency": "USD" + } + ], + "limits": [ + { + "currencyCode": "CAD", + "defaultAmount": 400, + "minimumAmount": 15.64, + "maximumAmount": 23303.6 + }, + { + "currencyCode": "USD", + "defaultAmount": 300, + "minimumAmount": 9.18, + "maximumAmount": 17094.78 + } + ], + "serviceProviders": [ + { + "serviceProvider": "TRANSAK", + "name": "Transak", + "status": "LIVE", + "categories": ["CRYPTO_ONRAMP"], + "categoryStatuses": { + "CRYPTO_ONRAMP": "LIVE" + }, + "websiteUrl": "https://transak.com", + "customerSupportUrl": "", + "logos": { + "dark": "https://images-serviceprovider.meld.io/TRANSAK/logo_dark.png", + "light": "https://images-serviceprovider.meld.io/TRANSAK/logo_light.png", + "darkShort": "https://images-serviceprovider.meld.io/TRANSAK/short_logo_dark.png", + "lightShort": "https://images-serviceprovider.meld.io/TRANSAK/short_logo_light.png" + } + } + ] +} +``` + + \ No newline at end of file diff --git a/abstract-global-wallet/fiat-on-ramp/currencies.mdx b/abstract-global-wallet/fiat-on-ramp/currencies.mdx new file mode 100644 index 0000000..4f5d1e4 --- /dev/null +++ b/abstract-global-wallet/fiat-on-ramp/currencies.mdx @@ -0,0 +1,114 @@ +--- +title: "/currencies" +api: "GET https://onramp.staging-portal.abs.xyz/currencies" +description: "Return a list of fiat and crypto currencies for the provided country." +--- + +## Query Parameters + + + The ISO 3166 2-digit country code + + +## Response + + + Array of supported fiat currencies + + + The code for this Fiat Currency + + + The display name for this Fiat Currency + + + The URL to this Fiat Currency's symbol image + + + The ASCII symbol for this Fiat Currency + + + + + + Array of supported crypto currencies + + + The code for the Crypto Currency + + + The display name for the Crypto Currency + + + The code for the chain the Crypto Currency is on + + + The display name for the chain the Crypto Currency is on + + + The id for the chain the Crypto Currency is on + + + The contract address of the Crypto Currency + + + The URL to the Crypto Currency's symbol image + + + + + + +```bash cURL +curl -X GET "https://onramp.staging-portal.abs.xyz/currencies?country=US" +``` + +```javascript JavaScript +const response = await fetch('https://onramp.staging-portal.abs.xyz/currencies?country=US'); +const currencies = await response.json(); +``` + + + + + +```json Response +{ + "fiat": [ + { + "currencyCode": "USD", + "name": "US Dollar", + "symbolImageUrl": "https://images-currency.meld.io/fiat/USD/symbol.png", + "symbol": "$" + }, + { + "currencyCode": "EUR", + "name": "Euro", + "symbolImageUrl": "https://images-currency.meld.io/fiat/EUR/symbol.png", + "symbol": "€" + } + ], + "crypto": [ + { + "currencyCode": "ETH_BASE", + "name": "Ethereum", + "chainCode": "BASE", + "chainName": "Base", + "chainId": null, + "contractAddress": null, + "symbolImageUrl": "https://images-currency.meld.io/crypto/ETH_BASE/symbol.png" + }, + { + "currencyCode": "USDC_BASE", + "name": "USD Coin", + "chainCode": "BASE", + "chainName": "Base", + "chainId": null, + "contractAddress": null, + "symbolImageUrl": "https://images-currency.meld.io/crypto/USDC_BASE/symbol.png" + } + ] +} +``` + + \ No newline at end of file diff --git a/abstract-global-wallet/fiat-on-ramp/overview.mdx b/abstract-global-wallet/fiat-on-ramp/overview.mdx index db530ea..67ebd50 100644 --- a/abstract-global-wallet/fiat-on-ramp/overview.mdx +++ b/abstract-global-wallet/fiat-on-ramp/overview.mdx @@ -1,5 +1,59 @@ --- title: "FIAT On-ramp" sidebarTitle: "Overview" -description: "Learn about FIAT on-ramp functionality with Abstract Global Wallet" +description: "Learn how to allow user's to fund their Abstract Global Wallet with FIAT currencies." --- + +To provide a consumer-friendly onboarding experience to non-crypto-native users, +Abstract supports a FIAT on-ramp powered by [Meld](https://www.meld.io/). + +This enables users in over 200 countries to fund their Abstract Global Wallet using their local currency via a credit card, Apple Pay, or Google Pay. + + + + View a demo application that uses AGW and FIAT on-ramp to test the flow. + + + Use our example repo to quickly get started with AGW and FIAT on-ramp. + + + +## How it works + +The FIAT on-ramp works by presenting user’s with a **widget** that prompts the user for their payment details to fulfil a **quote**. The quote determines the amount, address, currency, and other details of the transaction. + +This flow can be broken down into three steps: + + + + To generate a **quote**, information about the user and their desired on-ramp transaction is required; including the user’s country, wallet address, desired amount, etc. (see [/quote](/abstract-global-wallet/fiat-on-ramp/quote) for more details). + + Present users with a form to collect the required information, making use of the below endpoints to localize and validate the user’s input: + + - [/config](/abstract-global-wallet/fiat-on-ramp/config) to get the user’s country and local currency information. + - [/currencies](/abstract-global-wallet/fiat-on-ramp/currencies) to get the available currencies for the user’s country. + - [/payment-methods](/abstract-global-wallet/fiat-on-ramp/payment-methods) to get the available payment methods for the user’s country. + + + + After collecting the required information from the user, call the [/quote endpoint](/abstract-global-wallet/fiat-on-ramp/quote) to get an array of quotes from providers that can fulfill the given request. + + Choose *(or allow the user to choose)* the best quote for your application’s needs. + + + + Provide your selected quote to the [/widget endpoint](/abstract-global-wallet/fiat-on-ramp/widget) to generate a widget URL that can be either opened directly or embedded in your application using an iframe. + + The widget URL presents the user with a form to enter their payment details and complete the transaction. Use the [/transactions endpoint](/abstract-global-wallet/fiat-on-ramp/transactions) to track the status of their order using the session ID returned from the widget. + + + + diff --git a/abstract-global-wallet/fiat-on-ramp/payment-methods.mdx b/abstract-global-wallet/fiat-on-ramp/payment-methods.mdx new file mode 100644 index 0000000..362e1d6 --- /dev/null +++ b/abstract-global-wallet/fiat-on-ramp/payment-methods.mdx @@ -0,0 +1,90 @@ +--- +title: "/payment-methods" +api: "GET https://onramp.staging-portal.abs.xyz/payment-methods" +description: "Return a list of payment methods for the provided country." +--- + +## Query Parameters + + + The ISO 3166 2-digit country code + + +## Response + + + Array of supported payment methods + + + The identifier for the Payment Method + + + The display name for the Payment Method + + + The type of Payment Method (`ACH`, `BANK_TRANSFER`, `CARD`, `LOCAL`, `MOBILE_WALLET`, `SEPA`) + + + Payment method logos for different themes + + + The light logo URL for the Payment Method + + + The dark logo URL for the Payment Method + + + + + + + + +```bash cURL +curl -X GET "https://onramp.staging-portal.abs.xyz/payment-methods?country=US" +``` + +```javascript JavaScript +const response = await fetch('https://onramp.staging-portal.abs.xyz/payment-methods?country=US'); +const paymentMethods = await response.json(); +``` + + + + + +```json Response +{ + "paymentMethods": [ + { + "paymentMethod": "CREDIT_DEBIT_CARD", + "name": "Credit & Debit Card", + "paymentType": "CARD", + "logos": { + "dark": "https://images-paymentMethod.meld.io/CREDIT_DEBIT_CARD/logo_dark.png", + "light": "https://images-paymentMethod.meld.io/CREDIT_DEBIT_CARD/logo_light.png" + } + }, + { + "paymentMethod": "APPLE_PAY", + "name": "Apple Pay", + "paymentType": "MOBILE_WALLET", + "logos": { + "dark": "https://images-paymentMethod.meld.io/APPLE_PAY/logo_dark.png", + "light": "https://images-paymentMethod.meld.io/APPLE_PAY/logo_light.png" + } + }, + { + "paymentMethod": "GOOGLE_PAY", + "name": "Google Pay", + "paymentType": "MOBILE_WALLET", + "logos": { + "dark": "https://images-paymentMethod.meld.io/GOOGLE_PAY/logo_dark.png", + "light": "https://images-paymentMethod.meld.io/GOOGLE_PAY/logo_light.png" + } + } + ] +} +``` + + \ No newline at end of file diff --git a/abstract-global-wallet/fiat-on-ramp/quote.mdx b/abstract-global-wallet/fiat-on-ramp/quote.mdx new file mode 100644 index 0000000..5e58725 --- /dev/null +++ b/abstract-global-wallet/fiat-on-ramp/quote.mdx @@ -0,0 +1,162 @@ +--- +title: "/quote" +api: "GET https://onramp.staging-portal.abs.xyz/quote" +description: "Generate quotes for purchasing cryptocurrency with fiat currency." +--- + +## Query Parameters + + + The ISO 3166 2-digit country code + + + + The code for the Crypto Currency (e.g., "ETH_BASE", "USDC_BASE") + + + + The code for the Fiat Currency (e.g., "USD", "CAD") + + + + The amount (in source currency) to buy + + + + The identifier for the Payment Method + + + + The wallet address for the user making this request (does not have to be AGW) + + +## Response + + + Array of available quotes from different providers + + + Always "CRYPTO_PURCHASE" + + + Amount requested + fees + + + The fiat amount being used to buy crypto, excluding fees + + + The fiat amount exchanged when buying crypto, excluding fees + + + The fiat amount exchanged when selling crypto, excluding fees + + + Three-letter ISO currency code. Must be a supported currency + + + Two-letter country code + + + Total fees for the transaction + + + The network fee applied to a crypto transaction + + + The fee amount charged by the service provider to process the purchase + + + Destination currency amount to be received for this quote + + + Code of currency being quoted + + + The exchange rate at the time the request is sent + + + Payment Method Type used for this quote + + + A numerical score representing the expectation a Customer will convert + + + Service Provider used on this quote + + + The name of the institution or broker used for this quote, if present + + + Indicates if the quote amount is below the provider's low KYC threshold + + + The fee amount charged by the partner to process the purchase + + + The wallet address for the user making this request + + + The deposit address on Base that will receive the crypto and bridge it to Abstract + + + The fee amount charged by Relay for the deposit address + + + + + + +```bash cURL +curl -X GET "https://onramp.staging-portal.abs.xyz/quote?country=US&destinationCurrency=USDC_BASE&sourceCurrency=USD&amount=100&paymentMethod=CREDIT_DEBIT_CARD&walletAddress=0xfc61f1b7701f6765ff548b3bca403cdaa723d260" +``` + +```javascript JavaScript +const params = new URLSearchParams({ + country: 'US', + destinationCurrency: 'USDC_BASE', + sourceCurrency: 'USD', + amount: '100', + paymentMethod: 'CREDIT_DEBIT_CARD', + walletAddress: '0xfc61f1b7701f6765ff548b3bca403cdaa723d260' +}); + +const response = await fetch(`https://onramp.staging-portal.abs.xyz/quote?${params}`); +const quote = await response.json(); +``` + + + + + +```json Response +{ + "quotes": [ + { + "transactionType": "CRYPTO_PURCHASE", + "sourceAmount": 100, + "sourceAmountWithoutFees": 93.3317, + "fiatAmountWithoutFees": 93.3317, + "destinationAmountWithoutFees": null, + "sourceCurrencyCode": "USD", + "countryCode": "US", + "totalFee": 6.68, + "networkFee": null, + "transactionFee": 5.5, + "destinationAmount": 68.017348, + "destinationCurrencyCode": "USDC_BASE", + "exchangeRate": 1.468, + "paymentMethodType": "CREDIT_DEBIT_CARD", + "customerScore": 20, + "serviceProvider": "TRANSAK", + "institutionName": null, + "lowKyc": null, + "partnerFee": 1, + "walletAddress": "0xfc61f1b7701f6765ff548b3bca403cdaa723d260", + "toAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", + "relayFee": 0.18 + } + ] +} +``` + + \ No newline at end of file diff --git a/abstract-global-wallet/fiat-on-ramp/transactions.mdx b/abstract-global-wallet/fiat-on-ramp/transactions.mdx new file mode 100644 index 0000000..7924622 --- /dev/null +++ b/abstract-global-wallet/fiat-on-ramp/transactions.mdx @@ -0,0 +1,150 @@ +--- +title: "/transactions" +api: "GET https://onramp.staging-portal.abs.xyz/transactions" +description: "Get transaction status and history." +--- + +Retrieve transaction status for onramp purchases. Use `/transactions/status` for a single transaction or `/transactions` for multiple transactions. + +## Endpoints + +### Get Single Transaction Status + +**GET** `/transactions/status` + +Get the status of a single transaction using the session ID. + +#### Query Parameters + + + The session ID from the widget redirect URL query parameters + + +### Get Multiple Transactions + +**GET** `/transactions` + +Get all transactions for a user or app. + +#### Query Parameters + + + The wallet address to get transactions for + + + + The name of the app to get transactions for + + + + You must provide either `walletAddress` or `referrer` (or both) to filter transactions. + + +## Response + +The response format varies depending on the endpoint used. Both endpoints return transaction objects with status information. + + + Current status of the transaction (e.g., "PENDING", "COMPLETED", "FAILED") + + + + Transaction amount in source currency + + + + Source currency code + + + + Amount received in destination currency + + + + Destination currency code + + + + Blockchain transaction hash (when available) + + + + Transaction creation timestamp + + + + Last update timestamp + + + + +```bash Single Transaction Status +curl -X GET "https://onramp.staging-portal.abs.xyz/transactions/status?sessionId=WePzm7gRdUgis7VHQjMYYL" +``` + +```bash Multiple Transactions by Wallet +curl -X GET "https://onramp.staging-portal.abs.xyz/transactions?walletAddress=0xfc61f1b7701f6765ff548b3bca403cdaa723d260" +``` + +```bash Multiple Transactions by App +curl -X GET "https://onramp.staging-portal.abs.xyz/transactions?referrer=MyApp" +``` + +```javascript Single Transaction Status +const response = await fetch( + 'https://onramp.staging-portal.abs.xyz/transactions/status?sessionId=WePzm7gRdUgis7VHQjMYYL' +); +const transaction = await response.json(); +``` + +```javascript Multiple Transactions +const response = await fetch( + 'https://onramp.staging-portal.abs.xyz/transactions?walletAddress=0xfc61f1b7701f6765ff548b3bca403cdaa723d260' +); +const transactions = await response.json(); +``` + + + + + +```json Single Transaction Response +{ + "sessionId": "WePzm7gRdUgis7VHQjMYYL", + "status": "COMPLETED", + "amount": 100, + "currency": "USD", + "destinationAmount": 68.017348, + "destinationCurrency": "USDC_BASE", + "transactionHash": "0x1234567890abcdef...", + "walletAddress": "0xfc61f1b7701f6765ff548b3bca403cdaa723d260", + "serviceProvider": "TRANSAK", + "createdAt": "2024-01-15T10:30:00Z", + "updatedAt": "2024-01-15T10:35:00Z" +} +``` + +```json Multiple Transactions Response +{ + "transactions": [ + { + "sessionId": "WePzm7gRdUgis7VHQjMYYL", + "status": "COMPLETED", + "amount": 100, + "currency": "USD", + "destinationAmount": 68.017348, + "destinationCurrency": "USDC_BASE", + "transactionHash": "0x1234567890abcdef...", + "walletAddress": "0xfc61f1b7701f6765ff548b3bca403cdaa723d260", + "serviceProvider": "TRANSAK", + "createdAt": "2024-01-15T10:30:00Z", + "updatedAt": "2024-01-15T10:35:00Z" + } + ], + "total": 1, + "page": 1, + "pageSize": 20 +} +``` + + \ No newline at end of file diff --git a/abstract-global-wallet/fiat-on-ramp/widget.mdx b/abstract-global-wallet/fiat-on-ramp/widget.mdx new file mode 100644 index 0000000..080a90e --- /dev/null +++ b/abstract-global-wallet/fiat-on-ramp/widget.mdx @@ -0,0 +1,134 @@ +--- +title: "/widget" +api: "POST https://onramp.staging-portal.abs.xyz/widget" +description: "Create a session for buying crypto." +--- + +Create a widget session for purchasing cryptocurrency. This generates a widget URL that users can use to complete their purchase. + +## Request Body + + + The ISO 3166 2-digit country code + + + + The code for the Crypto Currency (e.g., "ETH_BASE", "USDC_BASE") + + + + The code for the Fiat Currency (e.g., "USD", "CAD") + + + + The amount (in source currency) to buy + + + + The identifier for the Payment Method + + + + The wallet address for the user making this request (does not have to be AGW) + + + + The deposit address on Base returned in the quote + + + + Service Provider to use for this session + + + + URL to navigate back to when widget flow is complete + + + + The name of the app referring the user to the Onramp + + +## Response + + + Session identifier + + + + The name of the app referring the user to the Onramp (matches provided `referrer`) + + + + The wallet address for the user making this request (matches provided `walletAddress`) + + + + Meld generated unique identifier for your customer + + + + The crypto widget URL where users complete their purchase + + + + The session token + + + + +```bash cURL +curl -X POST "https://onramp.staging-portal.abs.xyz/widget" \ + -H "Content-Type: application/json" \ + -d '{ + "country": "US", + "destinationCurrency": "USDC_BASE", + "sourceCurrency": "USD", + "amount": "100", + "paymentMethod": "CREDIT_DEBIT_CARD", + "walletAddress": "0xfc61f1b7701f6765ff548b3bca403cdaa723d260", + "toAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", + "serviceProvider": "TRANSAK", + "redirectUrl": "https://myapp.com/success", + "referrer": "MyApp" + }' +``` + +```javascript JavaScript +const response = await fetch('https://onramp.staging-portal.abs.xyz/widget', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + country: 'US', + destinationCurrency: 'USDC_BASE', + sourceCurrency: 'USD', + amount: '100', + paymentMethod: 'CREDIT_DEBIT_CARD', + walletAddress: '0xfc61f1b7701f6765ff548b3bca403cdaa723d260', + toAddress: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913', + serviceProvider: 'TRANSAK', + redirectUrl: 'https://myapp.com/success', + referrer: 'MyApp' + }) +}); + +const widget = await response.json(); +``` + + + + + +```json Response +{ + "id": "WePzm7gRdUgis7VHQjMYYL", + "externalSessionId": "MyApp", + "externalCustomerId": "0xfc61f1b7701f6765ff548b3bca403cdaa723d260", + "customerId": "WeP9qpZzvBizvKhR8bGigL", + "widgetUrl": "https://sb.meldcrypto.com?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJtZWxkLmlvIiwiaWF0IjoxNzUxOTUwMDM5LCJzdWIiOiJjcnlwdG8iLCJleHAiOjE3NTE5NTE4MzksImFjY291bnRJZCI6IldlUUVGcDZyZVU3VFNOQWVOODZjdFUiLCJzZXNzaW9uSWQiOiJXZVB6bTdnUmRVZ2lzN1ZIUWpNWVlMIn0.xr6V09K4ZSwYUaiOlmGVJ_QgAiaHFx9OXKvJroLGNtE", + "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJtZWxkLmlvIiwiaWF0IjoxNzUxOTUwMDM5LCJzdWIiOiJjcnlwdG8iLCJleHAiOjE3NTE5NTE4MzksImFjY291bnRJZCI6IldlUUVGcDZyZVU3VFNOQWVOODZjdFUiLCJzZXNzaW9uSWQiOiJXZVB6bTdnUmRVZ2lzN1ZIUWpNWVlMIn0.xr6V09K4ZSwYUaiOlmGVJ_QgAiaHFx9OXKvJroLGNtE" +} +``` + + \ No newline at end of file diff --git a/docs.json b/docs.json index ba917db..44e7d29 100644 --- a/docs.json +++ b/docs.json @@ -201,7 +201,13 @@ { "group": "FIAT On-ramp", "pages": [ - "abstract-global-wallet/fiat-on-ramp/overview" + "abstract-global-wallet/fiat-on-ramp/overview", + "abstract-global-wallet/fiat-on-ramp/config", + "abstract-global-wallet/fiat-on-ramp/currencies", + "abstract-global-wallet/fiat-on-ramp/payment-methods", + "abstract-global-wallet/fiat-on-ramp/quote", + "abstract-global-wallet/fiat-on-ramp/widget", + "abstract-global-wallet/fiat-on-ramp/transactions" ] }, { From baa08f1d7e4037d93ebb5694078e0f03c6575243 Mon Sep 17 00:00:00 2001 From: Jarrod Watts Date: Tue, 15 Jul 2025 11:59:53 +1000 Subject: [PATCH 3/8] under the hood comment --- abstract-global-wallet/fiat-on-ramp/overview.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/abstract-global-wallet/fiat-on-ramp/overview.mdx b/abstract-global-wallet/fiat-on-ramp/overview.mdx index 67ebd50..da39f0a 100644 --- a/abstract-global-wallet/fiat-on-ramp/overview.mdx +++ b/abstract-global-wallet/fiat-on-ramp/overview.mdx @@ -57,3 +57,5 @@ This flow can be broken down into three steps: +Under the hood, funds are first loaded to a temporary deposit address on the [Base network](https://www.base.org/) before being bridged to the desired destination address on Abstract. + From 62dcabbe430db5cd6edf72391a5f1c3bbcebee4c Mon Sep 17 00:00:00 2001 From: Jarrod Watts Date: Tue, 15 Jul 2025 13:02:43 +1000 Subject: [PATCH 4/8] formatting transactions --- .../fiat-on-ramp/overview.mdx | 2 +- .../fiat-on-ramp/transactions.mdx | 20 +++++++------------ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/abstract-global-wallet/fiat-on-ramp/overview.mdx b/abstract-global-wallet/fiat-on-ramp/overview.mdx index da39f0a..3477f55 100644 --- a/abstract-global-wallet/fiat-on-ramp/overview.mdx +++ b/abstract-global-wallet/fiat-on-ramp/overview.mdx @@ -53,7 +53,7 @@ This flow can be broken down into three steps: Provide your selected quote to the [/widget endpoint](/abstract-global-wallet/fiat-on-ramp/widget) to generate a widget URL that can be either opened directly or embedded in your application using an iframe. The widget URL presents the user with a form to enter their payment details and complete the transaction. Use the [/transactions endpoint](/abstract-global-wallet/fiat-on-ramp/transactions) to track the status of their order using the session ID returned from the widget. - + diff --git a/abstract-global-wallet/fiat-on-ramp/transactions.mdx b/abstract-global-wallet/fiat-on-ramp/transactions.mdx index 7924622..3d95d07 100644 --- a/abstract-global-wallet/fiat-on-ramp/transactions.mdx +++ b/abstract-global-wallet/fiat-on-ramp/transactions.mdx @@ -4,29 +4,27 @@ api: "GET https://onramp.staging-portal.abs.xyz/transactions" description: "Get transaction status and history." --- -Retrieve transaction status for onramp purchases. Use `/transactions/status` for a single transaction or `/transactions` for multiple transactions. +Retrieve transaction status for onramp purchases. -## Endpoints +- `/transactions/status` for a single transaction +- `/transactions` for multiple transactions -### Get Single Transaction Status + +## Get Single Transaction Status **GET** `/transactions/status` Get the status of a single transaction using the session ID. -#### Query Parameters - The session ID from the widget redirect URL query parameters -### Get Multiple Transactions +## Get Multiple Transactions **GET** `/transactions` -Get all transactions for a user or app. - -#### Query Parameters +Get all transactions for a user or app. Provide either `walletAddress` or `referrer` (or both) to filter transactions. The wallet address to get transactions for @@ -36,10 +34,6 @@ Get all transactions for a user or app. The name of the app to get transactions for - - You must provide either `walletAddress` or `referrer` (or both) to filter transactions. - - ## Response The response format varies depending on the endpoint used. Both endpoints return transaction objects with status information. From 6575b94c5818a69d2c1de8a26d5d9db746a465b5 Mon Sep 17 00:00:00 2001 From: Jarrod Watts Date: Wed, 16 Jul 2025 12:14:49 +1000 Subject: [PATCH 5/8] Grammar check --- abstract-global-wallet/fiat-on-ramp/currencies.mdx | 2 +- abstract-global-wallet/fiat-on-ramp/overview.mdx | 6 +++--- abstract-global-wallet/fiat-on-ramp/quote.mdx | 2 +- abstract-global-wallet/fiat-on-ramp/transactions.mdx | 8 ++++---- abstract-global-wallet/fiat-on-ramp/widget.mdx | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/abstract-global-wallet/fiat-on-ramp/currencies.mdx b/abstract-global-wallet/fiat-on-ramp/currencies.mdx index 4f5d1e4..eb18c61 100644 --- a/abstract-global-wallet/fiat-on-ramp/currencies.mdx +++ b/abstract-global-wallet/fiat-on-ramp/currencies.mdx @@ -1,7 +1,7 @@ --- title: "/currencies" api: "GET https://onramp.staging-portal.abs.xyz/currencies" -description: "Return a list of fiat and crypto currencies for the provided country." +description: "Return a list of FIAT and crypto currencies for the provided country." --- ## Query Parameters diff --git a/abstract-global-wallet/fiat-on-ramp/overview.mdx b/abstract-global-wallet/fiat-on-ramp/overview.mdx index 3477f55..08024d2 100644 --- a/abstract-global-wallet/fiat-on-ramp/overview.mdx +++ b/abstract-global-wallet/fiat-on-ramp/overview.mdx @@ -1,7 +1,7 @@ --- title: "FIAT On-ramp" sidebarTitle: "Overview" -description: "Learn how to allow user's to fund their Abstract Global Wallet with FIAT currencies." +description: "Learn how to allow users to fund their Abstract Global Wallet with FIAT currencies." --- To provide a consumer-friendly onboarding experience to non-crypto-native users, @@ -28,13 +28,13 @@ This enables users in over 200 countries to fund their Abstract Global Wallet us ## How it works -The FIAT on-ramp works by presenting user’s with a **widget** that prompts the user for their payment details to fulfil a **quote**. The quote determines the amount, address, currency, and other details of the transaction. +The FIAT on-ramp works by presenting users with a **widget** that prompts the user for their payment details to fulfill a **quote**. The quote determines the amount, address, currency, and other details of the transaction. This flow can be broken down into three steps: - To generate a **quote**, information about the user and their desired on-ramp transaction is required; including the user’s country, wallet address, desired amount, etc. (see [/quote](/abstract-global-wallet/fiat-on-ramp/quote) for more details). + To generate a **quote**, information about the user and their desired on-ramp transaction is required, including the user’s country, wallet address, desired amount, etc. (see [/quote](/abstract-global-wallet/fiat-on-ramp/quote) for more details). Present users with a form to collect the required information, making use of the below endpoints to localize and validate the user’s input: diff --git a/abstract-global-wallet/fiat-on-ramp/quote.mdx b/abstract-global-wallet/fiat-on-ramp/quote.mdx index 5e58725..da2db73 100644 --- a/abstract-global-wallet/fiat-on-ramp/quote.mdx +++ b/abstract-global-wallet/fiat-on-ramp/quote.mdx @@ -1,7 +1,7 @@ --- title: "/quote" api: "GET https://onramp.staging-portal.abs.xyz/quote" -description: "Generate quotes for purchasing cryptocurrency with fiat currency." +description: "Generate quotes for purchasing cryptocurrency with FIAT currency." --- ## Query Parameters diff --git a/abstract-global-wallet/fiat-on-ramp/transactions.mdx b/abstract-global-wallet/fiat-on-ramp/transactions.mdx index 3d95d07..05efb28 100644 --- a/abstract-global-wallet/fiat-on-ramp/transactions.mdx +++ b/abstract-global-wallet/fiat-on-ramp/transactions.mdx @@ -1,10 +1,10 @@ --- title: "/transactions" api: "GET https://onramp.staging-portal.abs.xyz/transactions" -description: "Get transaction status and history." +description: "Get on-ramp transaction status and history." --- -Retrieve transaction status for onramp purchases. +Retrieves transaction status for onramp purchases. - `/transactions/status` for a single transaction - `/transactions` for multiple transactions @@ -14,7 +14,7 @@ Retrieve transaction status for onramp purchases. **GET** `/transactions/status` -Get the status of a single transaction using the session ID. +Gets the status of a single transaction using the session ID. The session ID from the widget redirect URL query parameters @@ -24,7 +24,7 @@ Get the status of a single transaction using the session ID. **GET** `/transactions` -Get all transactions for a user or app. Provide either `walletAddress` or `referrer` (or both) to filter transactions. +Gets all transactions for a user or app. Provide either `walletAddress` or `referrer` (or both) to filter transactions. The wallet address to get transactions for diff --git a/abstract-global-wallet/fiat-on-ramp/widget.mdx b/abstract-global-wallet/fiat-on-ramp/widget.mdx index 080a90e..a8f48b9 100644 --- a/abstract-global-wallet/fiat-on-ramp/widget.mdx +++ b/abstract-global-wallet/fiat-on-ramp/widget.mdx @@ -1,7 +1,7 @@ --- title: "/widget" api: "POST https://onramp.staging-portal.abs.xyz/widget" -description: "Create a session for buying crypto." +description: "Create a session for buying crypto with FIAT currency." --- Create a widget session for purchasing cryptocurrency. This generates a widget URL that users can use to complete their purchase. From ab92e69806cc911bb24f5dfed9709f3a47eac7f9 Mon Sep 17 00:00:00 2001 From: Jarrod Watts Date: Wed, 16 Jul 2025 13:11:25 +1000 Subject: [PATCH 6/8] Change Card URL --- abstract-global-wallet/fiat-on-ramp/overview.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abstract-global-wallet/fiat-on-ramp/overview.mdx b/abstract-global-wallet/fiat-on-ramp/overview.mdx index 08024d2..ca517a7 100644 --- a/abstract-global-wallet/fiat-on-ramp/overview.mdx +++ b/abstract-global-wallet/fiat-on-ramp/overview.mdx @@ -20,7 +20,7 @@ This enables users in over 200 countries to fund their Abstract Global Wallet us Use our example repo to quickly get started with AGW and FIAT on-ramp. From 2d17451f05230b51595cf6e5948d94de534239e6 Mon Sep 17 00:00:00 2001 From: Jarrod Watts Date: Wed, 16 Jul 2025 13:41:36 +1000 Subject: [PATCH 7/8] Add API Overview section --- .../fiat-on-ramp/overview.mdx | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/abstract-global-wallet/fiat-on-ramp/overview.mdx b/abstract-global-wallet/fiat-on-ramp/overview.mdx index ca517a7..5cc602b 100644 --- a/abstract-global-wallet/fiat-on-ramp/overview.mdx +++ b/abstract-global-wallet/fiat-on-ramp/overview.mdx @@ -59,3 +59,30 @@ This flow can be broken down into three steps: Under the hood, funds are first loaded to a temporary deposit address on the [Base network](https://www.base.org/) before being bridged to the desired destination address on Abstract. + +## API Overview + +Abstract provides a simplified API to help you integrate the FIAT on-ramp into your application. + +### Base URLs + +It is recommended to use the staging environment for testing and development. + +| Staging | Production | +|---------|------------| +| `https://onramp.staging-portal.abs.xyz/` | `https://onramp.portal.abs.xyz/` | + +### Endpoints + +Below is a summary of the available endpoints. + +| Endpoint | Description | +|----------|-------------| +| [/config](/abstract-global-wallet/fiat-on-ramp/config) | Return a list of countries, purchase limits, and service providers available for on-ramp. | +| [/currencies](/abstract-global-wallet/fiat-on-ramp/currencies) | Return a list of FIAT and crypto currencies for the provided country. | +| [/payment-methods](/abstract-global-wallet/fiat-on-ramp/payment-methods) | Return a list of payment methods for the provided country. | +| [/quote](/abstract-global-wallet/fiat-on-ramp/quote) | Generate quotes for purchasing cryptocurrency with FIAT currency. | +| [/transactions](/abstract-global-wallet/fiat-on-ramp/transactions) | Get on-ramp transaction status and history. | +| [/widget](/abstract-global-wallet/fiat-on-ramp/widget) | Create a session for buying crypto with FIAT currency. | + + From 7b4c1209716613d4d18cdf992b6940aa03e49116 Mon Sep 17 00:00:00 2001 From: Jarrod Watts Date: Wed, 16 Jul 2025 13:42:20 +1000 Subject: [PATCH 8/8] Update card links --- abstract-global-wallet/fiat-on-ramp/overview.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/abstract-global-wallet/fiat-on-ramp/overview.mdx b/abstract-global-wallet/fiat-on-ramp/overview.mdx index 5cc602b..fbe2ccc 100644 --- a/abstract-global-wallet/fiat-on-ramp/overview.mdx +++ b/abstract-global-wallet/fiat-on-ramp/overview.mdx @@ -13,14 +13,14 @@ This enables users in over 200 countries to fund their Abstract Global Wallet us View a demo application that uses AGW and FIAT on-ramp to test the flow. Use our example repo to quickly get started with AGW and FIAT on-ramp.