Welcome to YourVisa.ai docs
This comprehensive API documentation will guide you through integrating our visa services into your application. Whether you're a beginner or an experienced developer, you'll find everything you need to get started.
Fast & Reliable
Quick response times with 99.9% uptime guarantee
Secure
Enterprise-grade security with OAuth 2.0 authentication
Well Documented
Clear examples and detailed explanations for every endpoint
RESTful
Standard REST API with JSON responses
Quick Start Guide
Get Your API Credentials
Sign up for an account and generate your production and/or sandbox API key and secret from the dashboard.
Key: your-api-key
Secret: your-api-secretGenerate an Access Token
POST your key and secret to obtain a bearer token. The response includes agencyId and isApiSandbox (true for sandbox credentials, false for production). Do not send an environment field — it is inferred from which credentials match.
curl -X POST "https://api.yourvisa.ai/unprotected/generate-programmatic-token" -H "Content-Type: application/json" -d '{"key": "your-api-key","secret": "your-api-secret"}'Make Your First API Call
Use the token to authenticate your requests to protected endpoints.
curl -X GET "https://api.yourvisa.ai/agents-api/get-products-from-countries?from=IL&to=IN" -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Base URL
All API requests should be made to the following base URL:
https://api.yourvisa.aiAuthentication
Most endpoints require authentication using a Bearer token. Include the token in the Authorization header of your requests:
Authorization: Bearer YOUR_ACCESS_TOKEN⚠️ Important: Keep your API credentials secure. Never expose them in client-side code or public repositories. Use sandbox credentials for integration testing; sandbox tokens mark bookings as test and skip balance charges.
Error Handling
The API uses standard HTTP status codes to indicate success or failure:
Need Help?
If you have questions or need assistance, don't hesitate to reach out:
- 📧Email: api-support@yourvisa.ai
/unprotected/generate-programmatic-tokenGenerate programmatic token
Exchange an Agents API key and secret for a JWT access token (valid 12 hours). Send either production or sandbox credentials — the environment is inferred from which key matches in the database. Do not send an environment field. When sandbox credentials match, the response includes isApiSandbox: true and the JWT carries the same flag so bookings created with that token are marked as test.
Request Body
Schema: GenerateProgrammaticToken
keyRequiredstringProduction or sandbox API key
secretRequiredstringMatching production or sandbox API secret
Responses
Schema: GenerateProgrammaticTokenResponse
successbooleantruetokenstringJWT access token valid for 12 hours
agencyIdstringID of the agency associated with the API credentials
isApiSandboxbooleantrue when the provided key/secret are sandbox credentials; false for production. Sandbox tokens mark bookings created via the Agents API as test and skip balance charges.
falseSchema: GenerateProgrammaticTokenBadRequest
successbooleanfalsemessagestringTry it Out
curl -X POST "https://api.yourvisa.ai/unprotected/generate-programmatic-token" \
-H "Content-Type: application/json" \
-d '{
"key": "string",
"secret": "string"
}'/agents-api/get-products-from-countries?from={from}&to={to}Get products from countries
Parameters
fromRequiredpathstringCountry of origin
toRequiredpathstringDestination country
currencypathstringOptional display currency (supported ISO 4217 code). When provided, each product paymentDetails includes displayPricing with converted amounts.
Possible values:
AUDBRLCADCHFCNYCZKDKKEGPETBEURGBPGHSHKDHUFIDRILSINRISKJPYKESKRWMADMXNMYRNGNNOKNZDPHPPLNRONSEKSGDTHBTNDTRYTZSUGXUSDXAFXOFZARCountry codesstringAF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CK, CR, CI, HR, CU, CW, CY, CZ, CD, DK, DJ, DM, DO, TL, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, XK, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, KP, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, KR, SS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, VG, UA, AE, GB, US, UM, UY, VI, UZ, VU, VA, VE, VN, WF, EH, YE, ZM, ZW
Response Types
Response type - Get products from countries
Responses
Schema: GetProductsFromCountriesSupportedResponse
successbooleantrueproductsarraySchema: GetProductsFromCountriesBadRequest
successbooleanfalsemessagestringSchema: Unauthorized
successbooleanfalsemessagestringTry it Out
curl -X GET "https://api.yourvisa.ai/agents-api/get-products-from-countries?from={from}&to={to}" \
-H "Authorization: Bearer YOUR_TOKEN_HERE"/agents-api/get-supported-destinations?from={from}Get supported destination country codes
Returns distinct ISO 3166-1 alpha-2 destination country codes that have visa products with isSupportedVisa true for the given origin country. The origin country is never included as a destination.
Parameters
fromRequiredpathstringCountry of origin
Responses
Schema: GetSupportedDestinationsResponse
successbooleantruecountryCodesarraySchema: GetSupportedDestinationsBadRequest
successbooleanfalsemessagestringSchema: Unauthorized
successbooleanfalsemessagestringTry it Out
curl -X GET "https://api.yourvisa.ai/agents-api/get-supported-destinations?from={from}" \
-H "Authorization: Bearer YOUR_TOKEN_HERE"/agents-api/get-specific-product-details?productId=66a9ebe9572eb2904562c3adGet specific product details
Parameters
productIdRequiredpathstringID of the product
Responses
Schema: GetSpecificProductDetailsResponse
successbooleantrueproductInputDetailsarrayproductDetailsobjectSchema: GetSpecificProductDetailsBadRequest
successbooleanfalsemessagestringSchema: Unauthorized
successbooleanfalsemessagestringTry it Out
curl -X GET "https://api.yourvisa.ai/agents-api/get-specific-product-details?productId=66a9ebe9572eb2904562c3ad" \
-H "Authorization: Bearer YOUR_TOKEN_HERE"/agents-api/commit-new-visaCreate a new booked visa product
Commit a new visa booking with customer details via API. The combination isPaidByCustomer=true with isFilledByCustomer=false (customer pays, agency fills) is not supported and returns 400. When corporateIdForCharging is provided, the booking is organization-paid and billed to that corporate (balance rolling or back-to-back per corporate billing settings). The agency must have isAllowedToChargeCorporatesViaApi enabled by YourVisa.ai admin. If the Bearer token was issued from sandbox API credentials (isApiSandbox: true from POST /unprotected/generate-programmatic-token), the booking is automatically marked as a test visa and balance charges are skipped.
Request Body
Schema: CommitNewVisaRequest
productIdRequiredstringThe ID of the visa product
isPaidByCustomerbooleanWhether the customer will pay (true) or the agent will pay (false). Cannot be true when isFilledByCustomer is false.
isFilledByCustomerbooleanWhether the customer will fill the form (true) or the agent will fill it (false). Cannot be false when isPaidByCustomer is true.
customerFirstNameRequiredstringCustomer's first name
customerLastNameRequiredstringCustomer's last name
customerEmailRequiredstringCustomer's email address
voucherInvoiceNumberstringOptional voucher or invoice reference stored with the booking
"INV-2026-001"travelFileNumberstringOptional Travel CRM travel file number linked to this booking
"1252813"messageForTravelerstringOptional message included in the traveler application email when isFilledByCustomer is true. Letters, numbers, spaces, and basic punctuation (. , ! ? ' -) only.
"Please complete the form and upload a clear passport scan."preferredLanguagestringOptional language code for traveler-facing emails: en (English, default), de (Deutsch), es (Español), ru (Русский), he (עברית), ar (العربية), fr (Français)
corporateIdForChargingstringOptional corporate ID to bill for this booking instead of the agency balance. Requires agency isAllowedToChargeCorporatesViaApi, the corporate must belong to the agency, and the corporate must have a valid payment setup (saved card for back-to-back, or auto top-up with saved card for balance rolling). When set, isPaidByCustomer is treated as false and the traveler email is added to the corporate whitelist.
"66a9ebe9572eb2904562c3ae"customKeysobjectOptional custom key-value pairs for tracking or metadata (maximum 5 keys). Example: {"customKey1": "customKey1 value", "customKey2": "customKey2 value", "customKey3": "customKey3 value", "customKey4": "customKey4 value", "customKey5": "customKey5 value"}
Responses
Schema: CommitNewVisaResponse
successbooleantruebookedProductIdstring"66a9ebe9572eb2904562c3ae"isPaymentTestbooleantrue when the booking was created as a test visa (sandbox API credentials or agency/corporate integration test mode). Test bookings skip balance charges.
falsemessagestring"Visa booking created successfully"Schema: CommitNewVisaBadRequest
successbooleanmessagestringSchema: Unauthorized
successbooleanfalsemessagestringSchema: CommitNewVisaForbidden
successbooleanmessagestring"Your agency is not allowed to create agent-paid bookings"Schema: CommitNewVisaNotFound
successbooleanmessagestringTry it Out
curl -X POST "https://api.yourvisa.ai/agents-api/commit-new-visa" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{
"productId": "string",
"isPaidByCustomer": true,
"isFilledByCustomer": true,
"customerFirstName": "string",
"customerLastName": "string",
"customerEmail": "string",
"voucherInvoiceNumber": "string",
"travelFileNumber": "string",
"messageForTraveler": "string",
"preferredLanguage": "en",
"corporateIdForCharging": "string",
"customKeys": {
"customKey1": "customKey1 value",
"customKey2": "customKey2 value",
"customKey3": "customKey3 value",
"customKey4": "customKey4 value",
"customKey5": "customKey5 value"
}
}'/agents-api/get-application-linkGenerate application link for an existing booking
Generate an application URL with embedded token for an already-created booked product. Use this after creating a booking via POST /agents-api/commit-new-visa, or after receiving a bookedProductId from an instant-payment handoff. Set isIframe to true (default) for an iframe-ready URL, or false for the regular visa-wizard URL. Note: this link is only valid for visa applications that have not yet been submitted. Environment is inferred from the Bearer token: sandbox tokens may only generate links for test bookings; production tokens may only generate links for non-test bookings.
Request Body
Schema: GetApplicationLinkRequest
bookedProductIdRequiredstringThe ID of the existing booked product. This can come from POST /agents-api/commit-new-visa or from a partner instant-payment return URL.
langKeystringOptional language preference for the application form: en (English, default), de (Deutsch), es (Español), ru (Русский), he (עברית), ar (العربية), fr (Français)
isIframebooleanWhether to generate an iframe URL (true, default) pointing to /iframe/visa-wizard, or a regular URL (false) pointing to /visa-wizard
Responses
Schema: GetApplicationLinkResponse
successbooleantruebookedProductIdstringThe ID of the booked product
"66a9ebe9572eb2904562c3ae"applicationUrlstringThe full URL including base domain.
With isIframe=true (default): https://www.yourvisa.ai/iframe/visa-wizard?productId=...&token=...
With isIframe=false: https://www.yourvisa.ai/visa-wizard?productId=...&token=...
"https://www.yourvisa.ai/iframe/visa-wizard?productId=66a9ebe9572eb2904562c3ad&token=eyJhbGc..."pathstringThe path and query portion of the URL (everything after the base domain).
With isIframe=true (default): /iframe/visa-wizard?productId=...&token=...
With isIframe=false: /visa-wizard?productId=...&token=...
"/iframe/visa-wizard?productId=66a9ebe9572eb2904562c3ad&token=eyJhbGc..."messagestring"Application link generated successfully"Schema: GetApplicationLinkBadRequest
successbooleanmessagestringSchema: Unauthorized
successbooleanfalsemessagestringSchema: GetApplicationLinkForbidden
successbooleanmessagestringSchema: GetApplicationLinkNotFound
successbooleanmessagestringTry it Out
curl -X POST "https://api.yourvisa.ai/agents-api/get-application-link" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{
"bookedProductId": "string",
"langKey": "en",
"isIframe": true
}'/agents-api/get-products-historyGet history of products
Returns booked products for the authenticated agency. Optional filters are combined with AND. Traveler fields query applicantDetails on each booking. Results are sorted by dateCreated descending (newest first). At most 300 items are returned. Environment is inferred from the Bearer token: sandbox tokens (isApiSandbox: true from generate-programmatic-token) return only test bookings; production tokens return only non-test bookings.
Parameters
dateStartquerystringOptional lower bound on booking dateCreated (ISO date or datetime). Omit with dateEnd to leave range open on the lower side.
dateEndquerystringOptional upper bound on booking dateCreated (ISO date or datetime). Omit with dateStart to leave range open on the upper side.
bookedProductIdquerystringMongoDB ObjectId of the booked product (24-character hex)
statusCodequeryAgency-facing booking status filter (same values as status on each item).
Possible values:
waitingForTravelerToFillpleaseFillVisaDetailswereProcessingYourVisamissingVisaDetailswaitingForTravelerResponsehandledByOurTeamgovernmentReviewingapplicationNotApprovedfraudFlaggedvisaProcessFinishedrefundInProgressrefundCompletedfromCountryquerystringOrigin country on the booking (case-insensitive exact match)
toCountryquerystringDestination country on the booking (case-insensitive exact match)
visaTypequerystringVisa type on the booking (case-insensitive exact match)
firstNamequerystringSubstring match on applicantDetails.firstName (case-insensitive)
lastNamequerystringSubstring match on applicantDetails.lastName (case-insensitive)
emailquerystringSubstring match on applicantDetails.email (case-insensitive)
customKey1querystringExact match on customKeys.customKey1. Use for partner-defined tracking or lookup data.
customKey2querystringExact match on customKeys.customKey2. Recommended for a partner external booking ID.
customKey3querystringExact match on customKeys.customKey3. Recommended for a partner external traveler ID.
customKey4querystringExact match on customKeys.customKey4. Recommended for a partner external trip ID.
customKey5querystringExact match on customKeys.customKey5. Use for extra partner context when needed.
Responses
Schema: GetHistoryOfProductsResponse
successbooleantruemessagestringPresent when no bookings match filters (success still true).
"There are no matching products"bookedProductsarrayNewest bookings first; capped at 300 items.
Schema: GetHistoryOfProductsBadRequest
successbooleanfalsemessagestringExamples include invalid dateStart/dateEnd, start date after end date, invalid bookedProductId, invalid statusCode.
Schema: Unauthorized
successbooleanfalsemessagestringTry it Out
curl -X GET "https://api.yourvisa.ai/agents-api/get-products-history" \
-H "Authorization: Bearer YOUR_TOKEN_HERE"Instant payments: complete applications inside your platform
Use this flow when you want the traveler to pay on YourVisa before the full visa application, then return to your platform and complete the application inside a YourVisa iframe.
Details
Step 1: Check visa products
Step 2: Start instant checkout
Step 2C: Checkout parameters
Step 3: After payment
Step 3A: Web return URL example
Step 3B: App booking lookup
Step 4: Get iframe application link
Step 5: Embed the iframe
<iframe src="{applicationUrl}" width="100%" height="700" frameborder="0"></iframe>Step 6: Listen for completion
💡 Tips for Implementation
- •Always validate the parameters before constructing the URL to avoid errors.
- •Test your integration in a development environment before going live.
- •Keep your authentication credentials secure and never expose them in client-side code.
- •Contact support if you need assistance with implementation.
/agents-api/download-evisa-documentDownload eVisa document for a booking
Returns a short-lived presigned URL to download the eVisa document for a booked product. The booking must belong to the authenticated agency. Non-manager agents can only access bookings they created. Returns 404 when the booking has no eVisa document attached yet. Environment is inferred from the Bearer token: sandbox tokens may only download eVisas for test bookings; production tokens may only download eVisas for non-test bookings.
Parameters
bookedProductIdRequiredquerystringMongoDB ObjectId of the booked product (24-character hex)
Responses
Schema: DownloadEvisaDocumentResponse
successbooleantruedataobjectSchema: DownloadEvisaDocumentBadRequest
successbooleanfalsemessagestring"bookedProductId query parameter is required"Schema: Unauthorized
successbooleanfalsemessagestringSchema: DownloadEvisaDocumentForbidden
successbooleanfalsemessagestring"Booking not found or access denied"Schema: DownloadEvisaDocumentNotFound
successbooleanfalsemessagestring"No eVisa document available for this booking"errorCodestringhasEvisaDocumentbooleanfalse when the booking has no eVisa attached yet; true when metadata exists but the file is missing
"false"Try it Out
curl -X GET "https://api.yourvisa.ai/agents-api/download-evisa-document" \
-H "Authorization: Bearer YOUR_TOKEN_HERE"/agents-api/create-corporateCreate a connected corporate account
Creates a corporate under your agency and your partner corporate identifier. The identifier is stored as affiliatePartnerCorporateKey and can be used with corporateIdentifier on other corporate endpoints. The contact person you provide is also created as the corporate manager.
Request Body
Schema: CreateCorporateRequest
corporateNameRequiredstringpartnerCorporateIdentifierRequiredstringPartner-owned corporate identifier unique within your agency
contactRequiredobjectPrimary contact who is also created as the corporate manager
Responses
Schema: CreateCorporateResponse
successbooleantruecorporateIdstringpartnerCorporateIdentifierstringSchema: BadRequest
messagestringerrorCodestringBadRequestSchema: Unauthorized
successbooleanfalsemessagestringSchema: BadRequest
messagestringerrorCodestringBadRequestTry it Out
curl -X POST "https://api.yourvisa.ai/agents-api/create-corporate" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{
"corporateName": "string",
"partnerCorporateIdentifier": "string",
"contact": {}
}'/agents-api/get-corporatesList agency corporates
Lists corporates for the authenticated agency. Optional filters are query parameters (no request body). Up to 100 results per page, sorted by newest first. hasPaymentMethod is true when the corporate has billing set up to pay for bookings.
Example request URL
https://api.yourvisa.ai/agents-api/get-corporates?partnerCorporateIdentifier=acme-001&corporateName=Acme&page=1Parameters
corporateIdquerystringYourVisa corporate MongoDB ObjectId
partnerCorporateIdentifierquerystringPartner-owned corporate identifier (exact match)
corporateNamequerystringCase-insensitive partial name match
pagequeryintegerPage number (default 1)
Responses
Schema: GetCorporatesResponse
successbooleantruecorporatesarraypageintegerpageSizeintegertotalCountintegertotalPagesintegerSchema: BadRequest
messagestringerrorCodestringBadRequestSchema: Unauthorized
successbooleanfalsemessagestringTry it Out
curl -X GET "https://api.yourvisa.ai/agents-api/get-corporates?partnerCorporateIdentifier=acme-001&corporateName=Acme&page=1" \
-H "Authorization: Bearer YOUR_TOKEN_HERE"/agents-api/create-corporate-payment-setup-linkCorporate payment link setup
Creates a secure link for the corporate manager to add a credit card on a YourVisa-hosted page. The link expires 12 hours after creation. corporateIdentifier accepts either the YourVisa corporate ObjectId or your partner corporate identifier. Set isEmbeddedInPartnerPage to true when embedding the setup page in your own site via iframe or mobile WebView—the returned URL targets /iframe/corporate-payment-setup/{token}, a navbar-free layout that shows the YourVisa.ai logo and legal policy links. The manager must accept YourVisa.ai terms before saving a card. After the manager saves a card, the embedded page emits a corporate_payment_method_saved host event. Optional langKey sets the UI language on the setup page (defaults to en).
Request Body
Schema: CreateCorporatePaymentSetupLinkRequest
corporateIdentifierRequiredstringYourVisa corporate ObjectId or partner corporate identifier
isEmbeddedInPartnerPagebooleanWhen true, setupUrl targets /iframe/corporate-payment-setup/{token} for embedding in a partner page without the YourVisa navbar.
langKeystringOptional UI language for the setup page: en (English, default), de (Deutsch), es (Español), ru (Русский), he (עברית), ar (العربية), fr (Français)
Responses
Schema: CreateCorporatePaymentSetupLinkResponse
successbooleantruetokenstringsetupUrlstringFull URL to send the corporate manager
pathstring"/corporate-payment-setup/abc123?langKey=de"expiresAtstringLink expiry time (12 hours after creation)
corporateIdstringpartnerCorporateIdentifierstringnullisEmbeddedInPartnerPagebooleanWhether the setup page is intended for iframe embedding
langKeystringResolved UI language for the setup page
Schema: BadRequest
messagestringerrorCodestringBadRequestSchema: Unauthorized
successbooleanfalsemessagestringSchema: BadRequest
messagestringerrorCodestringBadRequestSchema: BadRequest
messagestringerrorCodestringBadRequestDetails
Step 1: Create embedded link
POST /agents-api/create-corporate-payment-setup-link
{
"corporateIdentifier": "acme-001",
"isEmbeddedInPartnerPage": true,
"langKey": "he"
}
Use setupUrl from the 201 response (targets /iframe/corporate-payment-setup/{token}).Step 2: Load the iframe
<iframe
src="{setupUrl}"
width="100%"
height="700"
frameborder="0"
style="border: none; border-radius: 8px;"
></iframe>Step 3: Listen in browser (iframe parent)
window.addEventListener("message", (event) => {
// Optional but recommended: verify the iframe origin in production
if (event.origin !== "https://www.yourvisa.ai") {
return;
}
if (
event.data?.source === "yourvisaai-iframe" &&
event.data?.event === "corporate_payment_method_saved"
) {
console.log("Card saved:", event.data.data);
}
});Step 4: Listen in React Native WebView
<WebView
source={{ uri: setupUrl }}
onMessage={(event) => {
const payload = JSON.parse(event.nativeEvent.data);
if (
payload?.source === "yourvisaai-iframe" &&
payload?.event === "corporate_payment_method_saved"
) {
console.log("Card saved:", payload.data);
}
}}
/>Event structure
{source: "yourvisaai-iframe", event: "corporate_payment_method_saved", data: {corporateId: "...", corporateName: "...", timestamp: "2026-07-02T13:25:50.110Z"}}When it fires
Only when isEmbeddedInPartnerPage was true on link creation and after the server confirms card save on POST /corporate-payment-setup/:token/complete.Try it Out
curl -X POST "https://api.yourvisa.ai/agents-api/create-corporate-payment-setup-link" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{
"corporateIdentifier": "string",
"isEmbeddedInPartnerPage": true,
"langKey": "en"
}'Creating a link for an affiliated agency with specific product
This section explains how to construct and use a specialized URL to embed the visa application for affiliated agencies and agents.
Details
Example URL with productId
Example URL to any product
Domain
productId
affiliatedAgencyId
affiliatedAgentId
customKey1-5
💡 Tips for Implementation
- •Always validate the parameters before constructing the URL to avoid errors.
- •Test your integration in a development environment before going live.
- •Keep your authentication credentials secure and never expose them in client-side code.
- •Contact support if you need assistance with implementation.
Creating a custom traveler page link with pre-filled country information
This section explains how to construct a specialized URL that pre-fills the visa search with specific origin and destination countries, along with affiliated agency tracking.
Details
Example URL with countries
Example URL minimal
Domain
from
to
visaType
affiliatedAgencyId
affiliatedAgentId
customKey1-5
💡 Tips for Implementation
- •Always validate the parameters before constructing the URL to avoid errors.
- •Test your integration in a development environment before going live.
- •Keep your authentication credentials secure and never expose them in client-side code.
- •Contact support if you need assistance with implementation.
Interactive tool
Download the iframe tester
Get a self-contained HTML page to try every embedded iframe flow locally — visa search, wizard, instant checkout, corporate payment setup, and postMessage events.
Overview and host events
Embed YourVisa flows inside your website or mobile WebView without the YourVisa navbar or footer. Use /iframe/* URLs for embedding; use the non-iframe URLs when opening in a new browser tab. Payment surfaces embedded in an iframe (instant checkout, corporate card setup, and the visa wizard payment step) also show the YourVisa.ai logo and links to terms, privacy, refund, and cookie policies. Visa search and non-payment wizard steps do not include that payment chrome.
Details
Iframe base path
Payment page branding
Listen for events (browser)
window.addEventListener("message", (event) => {
if (event.origin !== "https://www.yourvisa.ai") {
return;
}
if (event.data?.source !== "yourvisaai-iframe") {
return;
}
console.log(event.data.event, event.data.data);
});Event: application_submitted
{source: "yourvisaai-iframe", event: "application_submitted", data: {bookedProductId: "...", productId: "...", timestamp: "2026-07-04T10:30:00.000Z", ...}} — fired after the traveler submits the visa application inside the iframe.Event: instant_payment_complete
{source: "yourvisaai-iframe", event: "instant_payment_complete", data: {bookedProductId: "66a9ebe9572eb2904562c3ae", productId: "68e94b68f0022238439d7d4b", paymentStatus: "paid", redirectUrl: "https://partner.example.com/visa/payment-complete?...", timestamp: "2026-07-04T10:30:00.000Z"}} — fired immediately on the partner handoff payment-complete screen when instant checkout runs inside an iframe, before any automatic redirect. redirectUrl is included when configured.Event: corporate_payment_method_saved
{source: "yourvisaai-iframe", event: "corporate_payment_method_saved", data: {corporateId: "...", corporateName: "...", timestamp: "2026-07-02T13:25:50.110Z"}} — fired after a corporate manager saves a card on the embedded payment-setup page.React Native WebView
<WebView
source={{ uri: iframeUrl }}
onMessage={(event) => {
const payload = JSON.parse(event.nativeEvent.data);
if (payload?.source === "yourvisaai-iframe") {
console.log(payload.event, payload.data);
}
}}
/>Optional query parameters
Language support (direct iframe URLs)
Language support (visa wizard URL)
Language support (signed application link)
Language support (corporate payment setup)
Custom branding
💡 Tips for Implementation
- •Always validate the parameters before constructing the URL to avoid errors.
- •Test your integration in a development environment before going live.
- •Keep your authentication credentials secure and never expose them in client-side code.
- •Contact support if you need assistance with implementation.
Visa search and product selection
Let travelers search by origin and destination, browse products, and start an application without pre-filling productId.
Details
affiliatedAgencyId
Optional parameters
Example URL with optional parameters
Example embed
<iframe
src="https://www.yourvisa.ai/iframe/traveler?affiliatedAgencyId={agencyId}&customKey1={value1}&customKey2={value2}&langKey=en"
width="100%"
height="700"
frameborder="0"
style="border: none; border-radius: 8px;"
></iframe>How it works
Listen for completion
💡 Tips for Implementation
- •Always validate the parameters before constructing the URL to avoid errors.
- •Test your integration in a development environment before going live.
- •Keep your authentication credentials secure and never expose them in client-side code.
- •Contact support if you need assistance with implementation.
Visa application wizard
Embed the visa application wizard when you already know which product the traveler should apply for. Point the iframe at /iframe/visa-wizard with productId and your affiliatedAgencyId.
Details
Direct iframe URL
Embed
<iframe
src="https://www.yourvisa.ai/iframe/visa-wizard?productId={productId}&affiliatedAgencyId={agencyId}&customKey1={value1}&customKey2={value2}&langKey=en"
width="100%"
height="700"
frameborder="0"
style="border: none; border-radius: 8px;"
></iframe>Required parameters
Optional parameters
Standalone vs iframe
Listen for completion
Already have a bookedProductId?
💡 Tips for Implementation
- •Always validate the parameters before constructing the URL to avoid errors.
- •Test your integration in a development environment before going live.
- •Keep your authentication credentials secure and never expose them in client-side code.
- •Contact support if you need assistance with implementation.
Instant payment checkout
Embed instant payment when you already know the productId.
Load the checkout at /iframe/instant-visa-checkout inside your site or app. The page shows the YourVisa.ai logo and links to our legal policies.
After payment, your integration follows one of three paths — contact YourVisa to configure the option that fits your product.
Details
After payment — option 1: Redirect to your website
After payment — option 2: Stay embedded (iframe event)
After payment — option 3: Continue the visa wizard
Combining options 1 and 2
Embed checkout
<iframe
id="yourvisa-instant-checkout"
src="https://www.yourvisa.ai/iframe/instant-visa-checkout?productId={productId}&affiliatedAgencyId={agencyId}&travelerClient=web&isInstantPayment=true&langKey=en&travelerFirstName={firstName}&travelerLastName={lastName}&travelerEmail={email}&travelerPhone={phone}&customKey1={externalUserId}&customKey2={externalBookingId}&customKey3={externalTravelerId}&customKey4={externalTripId}&customKey5={extraContext}"
width="100%"
height="700"
frameborder="0"
style="border: none; border-radius: 8px;"
></iframe>Required parameters
Optional parameters
travelerClient
No redirect URL configured
Listen for payment complete (browser)
window.addEventListener("message", (event) => {
if (event.origin !== "https://www.yourvisa.ai") {
return;
}
if (
event.data?.source === "yourvisaai-iframe" &&
event.data?.event === "instant_payment_complete"
) {
const { bookedProductId, productId, paymentStatus, redirectUrl } = event.data.data;
console.log("Instant payment complete", { bookedProductId, productId, paymentStatus, redirectUrl });
// Close the iframe now, or let the traveler follow the in-iframe redirect
}
});Event: instant_payment_complete
{source: "yourvisaai-iframe", event: "instant_payment_complete", data: {bookedProductId: "66a9ebe9572eb2904562c3ae", productId: "68e94b68f0022238439d7d4b", paymentStatus: "paid", redirectUrl: "https://partner.example.com/visa/payment-complete?...", timestamp: "2026-07-04T10:30:00.000Z"}}
Fired immediately on the partner handoff payment-complete screen when checkout runs inside an iframe — before any automatic redirect. redirectUrl is included when YourVisa configured one for your agency.Full integration example
<iframe
id="yourvisa-instant-checkout"
src="https://www.yourvisa.ai/iframe/instant-visa-checkout?productId={productId}&affiliatedAgencyId={agencyId}&travelerClient=web&isInstantPayment=true&customKey1={externalUserId}&customKey2={externalBookingId}"
width="100%"
height="700"
frameborder="0"
style="border: none; border-radius: 8px;"
></iframe>
<script>
window.addEventListener("message", (event) => {
if (event.origin !== "https://www.yourvisa.ai") {
return;
}
if (event.data?.source !== "yourvisaai-iframe") {
return;
}
if (event.data.event === "instant_payment_complete") {
const { bookedProductId, productId } = event.data.data;
document.getElementById("yourvisa-instant-checkout").style.display = "none";
// Resume in your UI, or load the wizard iframe with POST /agents-api/get-application-link
}
});
</script>Event: application_submitted
{
"source": "yourvisaai-iframe",
"event": "application_submitted",
"data": {
"bookedProductId": "6a493c9b8f46d0e57c31bd65",
"productId": "68e94b68f0022238439d7d4b",
"visaType": "tourist",
"timestamp": "2026-07-04T17:08:29.646Z"
}
}
Fired inside an iframe when the traveler submits the visa application after instant payment and continuing through the wizard. This is the completion signal for option 3 — not instant_payment_complete. applicantName may also be included when available.Listen for application submitted (browser)
window.addEventListener("message", (event) => {
if (event.origin !== "https://www.yourvisa.ai") {
return;
}
if (
event.data?.source === "yourvisaai-iframe" &&
event.data?.event === "application_submitted"
) {
const { bookedProductId, productId, visaType } = event.data.data;
console.log("Visa application submitted", { bookedProductId, productId, visaType });
// Close the iframe, show your own confirmation, or refresh trip status
}
});💡 Tips for Implementation
- •Always validate the parameters before constructing the URL to avoid errors.
- •Test your integration in a development environment before going live.
- •Keep your authentication credentials secure and never expose them in client-side code.
- •Contact support if you need assistance with implementation.
Corporate payment method setup
Embed the corporate card-setup page so a corporate manager can save a payment method inside your site. Requires POST /agents-api/create-corporate-payment-setup-link with isEmbeddedInPartnerPage: true. The embedded page shows the YourVisa.ai logo and legal policy links.
Details
Step 1: Create embedded link
POST /agents-api/create-corporate-payment-setup-link
{
"corporateIdentifier": "acme-001",
"isEmbeddedInPartnerPage": true,
"langKey": "he"
}
langKey is set in the request body. Use setupUrl from the 201 response as the iframe src (targets /iframe/corporate-payment-setup/{token}?langKey=he).Step 2: Load the iframe
<iframe
src="{setupUrl}"
width="100%"
height="700"
frameborder="0"
style="border: none; border-radius: 8px;"
></iframe>Optional parameters
Step 3: Listen in browser
window.addEventListener("message", (event) => {
if (event.origin !== "https://www.yourvisa.ai") {
return;
}
if (
event.data?.source === "yourvisaai-iframe" &&
event.data?.event === "corporate_payment_method_saved"
) {
console.log("Card saved:", event.data.data);
}
});When it fires
💡 Tips for Implementation
- •Always validate the parameters before constructing the URL to avoid errors.
- •Test your integration in a development environment before going live.
- •Keep your authentication credentials secure and never expose them in client-side code.
- •Contact support if you need assistance with implementation.
MCP Server — connect AI assistants to YourVisa.ai
The YourVisa MCP (Model Context Protocol) server lets any compatible AI assistant — Claude Desktop, Cursor, and others — look up visa requirements, fees, and generate application links in real time. It is a remote HTTP service using the Streamable HTTP transport and requires an API key.
Details
1. Get an API key
2. Add to your MCP client config
3. Available tools
4. Stateless & read-only
5. Rate limits
Example Response
{
"mcpServers": {
"YourVisa.ai": {
"url": "https://mcp.yourvisa.ai/api/mcp",
"headers": {
"Authorization": "Bearer yv_mcp_your_key_here"
}
}
}
}💡 Tips for Implementation
- •Always validate the parameters before constructing the URL to avoid errors.
- •Test your integration in a development environment before going live.
- •Keep your authentication credentials secure and never expose them in client-side code.
- •Contact support if you need assistance with implementation.
Set a webhook URL to receive notifications when visa applications are submitted
In your account settings, you can define a webhook URL to be notified whenever your agency submits a visa application.
Details
Where to set it
What it's used for
Example use
Example Response
{
"toCountry": "string",
"fromCountry": "string",
"productId": "string",
"bookedProductId": "string",
"customKeys": {
"customKey1": "string",
"customKey2": "string",
"customKey3": "string"
},
"dateCreated": "string"
}💡 Tips for Implementation
- •Always validate the parameters before constructing the URL to avoid errors.
- •Test your integration in a development environment before going live.
- •Keep your authentication credentials secure and never expose them in client-side code.
- •Contact support if you need assistance with implementation.