Loading...
YourVisa.ai and related products
Base URL:
https://api.yourvisa.aiBuilding an AI-powered travel or immigration assistant? Read our story on how a Travel Visa MCP server stopped an agency's chatbot from giving wrong visa answers, and our engineering walkthrough on MCP Server Integration for travel documentation across e-visa, ETA and ETIAS.
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.
Quick response times with 99.9% uptime guarantee
Enterprise-grade security with OAuth 2.0 authentication
Clear examples and detailed explanations for every endpoint
Standard REST API with JSON responses
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-secretPOST 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"}'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"
All API requests should be made to the following base URL:
https://api.yourvisa.aiMost endpoints require authentication using a Bearer token. Include the token in the Authorization header of your requests:
Authorization: Bearer YOUR_ACCESS_TOKENImportant: 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.
The API uses standard HTTP status codes to indicate success or failure:
If you have questions or need assistance, don't hesitate to reach out:
/unprotected/generate-programmatic-tokenExchange 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.
keyRequiredstringProduction or sandbox API key
secretRequiredstringMatching production or sandbox API secret
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.
falsesuccessbooleanfalsemessagestringcurl -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}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 type - Get products from countries
successbooleantrueproductsarraysuccessbooleanfalsemessagestringsuccessbooleanfalsemessagestringcurl -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}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.
fromRequiredpathstringCountry of origin
successbooleantruecountryCodesarraysuccessbooleanfalsemessagestringsuccessbooleanfalsemessagestringcurl -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=66a9ebe9572eb2904562c3adproductIdRequiredpathstringID of the product
successbooleantrueproductInputDetailsarrayproductDetailsobjectsuccessbooleanfalsemessagestringsuccessbooleanfalsemessagestringcurl -X GET "https://api.yourvisa.ai/agents-api/get-specific-product-details?productId=66a9ebe9572eb2904562c3ad" \
-H "Authorization: Bearer YOUR_TOKEN_HERE"/agents-api/commit-new-visaCommit 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.
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"}
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"successbooleanmessagestringsuccessbooleanfalsemessagestringsuccessbooleanmessagestring"Your agency is not allowed to create agent-paid bookings"successbooleanmessagestringcurl -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 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.
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
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"successbooleanmessagestringsuccessbooleanfalsemessagestringsuccessbooleanmessagestringsuccessbooleanmessagestringcurl -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-historyReturns booked products for the authenticated agency. Optional filters are combined with AND. Traveler fields query applicantDetails on each booking. Each item includes paymentDetails (visa costs and who pays). If YourVisa admin enables applicant-data sharing for the agency, each item also includes full applicantDetails and time-limited download URLs for applicantUploads. Download URLs expire after 5 minutes and can be fetched with a normal HTTPS GET. Results are sorted by dateCreated descending (newest first). At most 100 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.
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.
successbooleantruemessagestringPresent when no bookings match filters (success still true).
"There are no matching products"bookedProductsarrayNewest bookings first; capped at 100 items.
successbooleanfalsemessagestringExamples include invalid dateStart/dateEnd, start date after end date, invalid bookedProductId, invalid statusCode.
successbooleanfalsemessagestringcurl -X GET "https://api.yourvisa.ai/agents-api/get-products-history" \
-H "Authorization: Bearer YOUR_TOKEN_HERE"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.
<iframe src="{applicationUrl}" width="100%" height="700" frameborder="0"></iframe>/agents-api/download-evisa-documentReturns 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.
bookedProductIdRequiredquerystringMongoDB ObjectId of the booked product (24-character hex)
successbooleantruedataobjectsuccessbooleanfalsemessagestring"bookedProductId query parameter is required"successbooleanfalsemessagestringsuccessbooleanfalsemessagestring"Booking not found or access denied"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"curl -X GET "https://api.yourvisa.ai/agents-api/download-evisa-document" \
-H "Authorization: Bearer YOUR_TOKEN_HERE"/agents-api/create-corporateCreates 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.
corporateNameRequiredstringpartnerCorporateIdentifierRequiredstringPartner-owned corporate identifier unique within your agency
contactRequiredobjectPrimary contact who is also created as the corporate manager
successbooleantruecorporateIdstringpartnerCorporateIdentifierstringmessagestringerrorCodestringBadRequestsuccessbooleanfalsemessagestringmessagestringerrorCodestringBadRequestcurl -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-corporatesLists 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=1corporateIdquerystringYourVisa corporate MongoDB ObjectId
partnerCorporateIdentifierquerystringPartner-owned corporate identifier (exact match)
corporateNamequerystringCase-insensitive partial name match
pagequeryintegerPage number (default 1)
successbooleantruecorporatesarraypageintegerpageSizeintegertotalCountintegertotalPagesintegermessagestringerrorCodestringBadRequestsuccessbooleanfalsemessagestringcurl -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-linkCreates 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).
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)
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
messagestringerrorCodestringBadRequestsuccessbooleanfalsemessagestringmessagestringerrorCodestringBadRequestmessagestringerrorCodestringBadRequestPOST /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}).<iframe
src="{setupUrl}"
width="100%"
height="700"
frameborder="0"
style="border: none; border-radius: 8px;"
></iframe>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);
}
});<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);
}
}}
/>{source: "yourvisaai-iframe", event: "corporate_payment_method_saved", data: {corporateId: "...", corporateName: "...", timestamp: "2026-07-02T13:25:50.110Z"}}Only when isEmbeddedInPartnerPage was true on link creation and after the server confirms card save on POST /corporate-payment-setup/:token/complete.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"
}'This section explains how to construct and use a specialized URL to embed the visa application for affiliated agencies and agents.
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.
Interactive tool
Get a self-contained HTML page to try every embedded iframe flow locally — visa search, wizard, instant checkout, corporate payment setup, and postMessage 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.
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);
});{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.{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.{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.<WebView
source={{ uri: iframeUrl }}
onMessage={(event) => {
const payload = JSON.parse(event.nativeEvent.data);
if (payload?.source === "yourvisaai-iframe") {
console.log(payload.event, payload.data);
}
}}
/>Let travelers search by origin and destination, browse products, and start an application without pre-filling productId.
<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>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.
<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>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.
<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>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
}
});{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.<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>{
"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.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
}
});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.
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).<iframe
src="{setupUrl}"
width="100%"
height="700"
frameborder="0"
style="border: none; border-radius: 8px;"
></iframe>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);
}
});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.
{
"mcpServers": {
"YourVisa.ai": {
"url": "https://mcp.yourvisa.ai/api/mcp",
"headers": {
"Authorization": "Bearer yv_mcp_your_key_here"
}
}
}
}In your account settings, you can define a webhook URL to be notified whenever your agency submits a visa application. Each notification includes visa costs and who pays.
{
"toCountry": "US",
"fromCountry": "IL",
"productId": "66a9ebe9572eb2904562c3ae",
"bookedProductId": "66b0aae9572eb2904562c3af",
"customKeys": {
"customKey1": "travel-file-9",
"customKey2": "string",
"customKey3": "string",
"customKey4": "string",
"customKey5": "string"
},
"dateCreated": 1710000000000,
"paymentDetails": {
"currency": "USD",
"govVisaCost": 35,
"productServiceFee": 100,
"partnerServiceFee": 0,
"processingSpeedFee": 20,
"partnerProcessingSpeedFee": 0,
"totalCost": 155,
"paymentStatus": "PAID",
"paidBy": "AGENT"
},
"applicantDetails": {},
"applicantUploads": {}
}We'd love to show you a demo.