On-ramp integration guide
This guide walks through using Latitude’s on-ramp product. The examples here describe on-ramping MXN into USDC via virtual accounts utilizing virtual CLABEs.
Before you start, make sure you’re familiar with the API basics — authentication, idempotency, webhooks, and prefunding.
Summary
The high-level steps are as follows:
- (Optional) Create a webhook subscription for
individualandconversionevents - Create an
individualthat represents the end user - Upload document images for KYC verification
- Wait for KYC result
- Create a
conversion_accountthat represents the on-ramp mechanism- The response contains a virtual CLABE
- Share the virtual CLABE with the end user
- The user can now deposit MXN into the virtual CLABE at any time
- User deposits MXN
- Receive webhooks for conversion lifecycle events
Detailed Steps
Step 1: (Optional) Create a Webhook Subscription
Create a webhook subscription to be notified of individual and conversion events. See API basics — Webhooks for details. The relevant event types for this flow are:
conversion.created— sent when a deposit is received into a virtual accountconversion.payout_initiated— sent when a blockchain transfer is initiatedconversion.completed— sent when a blockchain transfer is completedindividual.status_changed— sent when an individual’s status changes
Step 2: Create an Individual
Request:
Response:
The response includes status and status_details. For on-ramp individuals, the initial status is action_required because document images are needed for KYC verification. The status_details array contains objects with a machine-readable code and a human-readable message explaining what’s needed.
Individual Statuses
When the status is action_required, status_details is an array of objects with code and message. When status is active, pending, or rejected, status_details is null.
Note:
status_details[].codeis a machine-readable string you can use for programmatic branching.status_details[].messageis a human-readable string suitable for manual review. New codes may be added over time without changing the set of statuses.
Step 3: Upload Verification Images
Note: Latitude supports other options for completing KYC. Contact us to discuss alternatives.
After creating the individual, upload photos of the front and back (if applicable) of the end user’s government ID.
Request:
The type field identifies what the image represents. The accepted types are document-front and document-back. The content field is the image as a base64-encoded data URI.
Response:
Replacing an Image
The endpoint uses merge-by-side semantics: only the sides included in the request are replaced. Existing images for other sides are preserved. For example, to replace just the front image:
Retrieving Image Metadata
Sandbox Image Testing
In sandbox, any valid image will generate an approved outcome by default. Use the following magic strings as the base64-encoded image content to trigger specific outcomes:
Sample request to simulate one image being blurry:
Step 4: Wait for KYC Result
After uploading document images, the individual’s status moves to pending while KYC verification is processed. You will receive an individual.status_changed webhook when the status changes.
- If the status changes to
active, proceed to create aconversion_account. - If the status changes to
action_required, checkstatus_details[].codeto determine what’s needed.
After taking the requested action (e.g., uploading clearer photos), the individual returns to pending and KYC verification is re-processed.
Sample individual.status_changed webhook (KYC passed):
Sample individual.status_changed webhook (action needed):
Step 5: Create a Conversion Account
The individual must have active status before a conversion account can be created.
Request:
Response:
The deposit_account contains the virtual CLABE that you share with the end user. These financial accounts are also associated with the individual and will appear in GET /v1/individuals/{id}.
Step 6: User Deposits Fiat
At this point, the end user may send funds to the virtual CLABE via SPEI at any point. Each time a deposit is received, a new conversion will be created.
Simulate Deposit (Sandbox Only)
In sandbox, a deposit can be simulated using the sandbox-only simulation endpoint. Provide the financial_account_id of the virtual account and the amount of fiat currency to deposit.
Request:
Note: There is a 50 MXN limit for sandbox deposits.
Step 7: Receive Webhooks
Note: Polling is also available as an alternative to webhooks. You can poll for updates on the list conversions endpoint.

