Loading YourVisa.ai...

YourVisa.ai docs

YourVisa.ai and related products

Version 1.5.5REST API

Base URL:

https://api.yourvisa.ai

Building 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.

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

1

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-secret
2

Generate 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"}'
3

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.ai

Authentication

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:

200Success - Request completed successfully
400Bad Request - Invalid parameters or missing required fields
401Unauthorized - Invalid or expired access token
404Not Found - Resource not found
500Internal Server Error - Something went wrong on our end

Need Help?

If you have questions or need assistance, don't hesitate to reach out:

post/unprotected/generate-programmatic-token

Generate 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

keyRequiredstring

Production or sandbox API key

secretRequiredstring

Matching production or sandbox API secret

Responses

200Successful response

Schema: GenerateProgrammaticTokenResponse

successboolean
Default: true
tokenstring

JWT access token valid for 12 hours

agencyIdstring

ID of the agency associated with the API credentials

isApiSandboxboolean

true 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.

endpoint.example false
400Bad request

Schema: GenerateProgrammaticTokenBadRequest

successboolean
Default: false
messagestring
Possible values:
Missing fieldsUser with programmatic access doesn't exist
404Not found
500Internal server error

Try it Out

bash
curl -X POST "https://api.yourvisa.ai/unprotected/generate-programmatic-token" \
  -H "Content-Type: application/json" \
  -d '{
  "key": "string",
  "secret": "string"
}'
get/agents-api/get-products-from-countries?from={from}&to={to}

Get products from countries

Requires Authentication (Bearer Token)

Parameters

fromRequiredpathstring

Country of origin

toRequiredpathstring

Destination country

currencypathstring

Optional display currency (supported ISO 4217 code). When provided, each product paymentDetails includes displayPricing with converted amounts.

Possible values:

AUDBRLCADCHFCNYCZKDKKEGPETBEURGBPGHSHKDHUFIDRILSINRISKJPYKESKRWMADMXNMYRNGNNOKNZDPHPPLNRONSEKSGDTHBTNDTRYTZSUGXUSDXAFXOFZAR
Country codesstring

AF, 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

200Successful response

Schema: GetProductsFromCountriesSupportedResponse

successboolean
Default: true
productsarray
Array of object(click to see properties)
400Bad request

Schema: GetProductsFromCountriesBadRequest

successboolean
Default: false
messagestring
Possible values:
Country of origin (from) or destination country (to) is not providedCountry code (from or to) is not validCurrency code is not valid. Supported values: AUD, BRL, CAD, CHF, CNY, CZK, DKK, EGP, ETB, EUR, GBP, GHS, HKD, HUF, IDR, ILS, INR, ISK, JPY, KES, KRW, MAD, MXN, MYR, NGN, NOK, NZD, PHP, PLN, RON, SEK, SGD, THB, TND, TRY, TZS, UGX, USD, XAF, XOF, ZAR
401Unauthorized

Schema: Unauthorized

successboolean
Default: false
messagestring
Possible values:
You don't have credentialsYou don't have permissionInvalid access tokenYour access token is not valid or expired
404Not found
500Internal server error

Try it Out

bash
curl -X GET "https://api.yourvisa.ai/agents-api/get-products-from-countries?from={from}&to={to}" \
  -H "Authorization: Bearer YOUR_TOKEN_HERE"
get/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.

Requires Authentication (Bearer Token)

Parameters

fromRequiredpathstring

Country of origin

Responses

200Successful response

Schema: GetSupportedDestinationsResponse

successboolean
Default: true
countryCodesarray
Array of string
400Bad request

Schema: GetSupportedDestinationsBadRequest

successboolean
Default: false
messagestring
Possible values:
Country of origin (from) is not providedCountry code (from) is not valid
401Unauthorized

Schema: Unauthorized

successboolean
Default: false
messagestring
Possible values:
You don't have credentialsYou don't have permissionInvalid access tokenYour access token is not valid or expired
500Internal server error

Try it Out

bash
curl -X GET "https://api.yourvisa.ai/agents-api/get-supported-destinations?from={from}" \
  -H "Authorization: Bearer YOUR_TOKEN_HERE"
get/agents-api/get-specific-product-details?productId=66a9ebe9572eb2904562c3ad

Get specific product details

Requires Authentication (Bearer Token)

Parameters

productIdRequiredpathstring

ID of the product

Responses

200Successful response

Schema: GetSpecificProductDetailsResponse

successboolean
Default: true
productInputDetailsarray
Array of object(click to see properties)
productDetailsobject
400Bad request

Schema: GetSpecificProductDetailsBadRequest

successboolean
Default: false
messagestring
401Unauthorized

Schema: Unauthorized

successboolean
Default: false
messagestring
Possible values:
You don't have credentialsYou don't have permissionInvalid access tokenYour access token is not valid or expired
404Not found
500Internal server error

Try it Out

bash
curl -X GET "https://api.yourvisa.ai/agents-api/get-specific-product-details?productId=66a9ebe9572eb2904562c3ad" \
  -H "Authorization: Bearer YOUR_TOKEN_HERE"
post/agents-api/commit-new-visa

Create 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.

Requires Authentication (Bearer Token)

Request Body

Schema: CommitNewVisaRequest

productIdRequiredstring

The ID of the visa product

isPaidByCustomerboolean

Whether the customer will pay (true) or the agent will pay (false). Cannot be true when isFilledByCustomer is false.

isFilledByCustomerboolean

Whether the customer will fill the form (true) or the agent will fill it (false). Cannot be false when isPaidByCustomer is true.

customerFirstNameRequiredstring

Customer's first name

customerLastNameRequiredstring

Customer's last name

customerEmailRequiredstring

Customer's email address

voucherInvoiceNumberstring

Optional voucher or invoice reference stored with the booking

endpoint.example "INV-2026-001"
travelFileNumberstring

Optional Travel CRM travel file number linked to this booking

endpoint.example "1252813"
messageForTravelerstring

Optional message included in the traveler application email when isFilledByCustomer is true. Letters, numbers, spaces, and basic punctuation (. , ! ? ' -) only.

endpoint.example "Please complete the form and upload a clear passport scan."
preferredLanguagestring

Optional language code for traveler-facing emails: en (English, default), de (Deutsch), es (Español), ru (Русский), he (עברית), ar (العربية), fr (Français)

Possible values:
endeesruhearfr
corporateIdForChargingstring

Optional 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.

endpoint.example "66a9ebe9572eb2904562c3ae"
customKeysobject

Optional 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

201Successfully created booked product

Schema: CommitNewVisaResponse

successboolean
endpoint.example true
bookedProductIdstring
endpoint.example "66a9ebe9572eb2904562c3ae"
isPaymentTestboolean

true when the booking was created as a test visa (sandbox API credentials or agency/corporate integration test mode). Test bookings skip balance charges.

endpoint.example false
messagestring
endpoint.example "Visa booking created successfully"
400Bad request - validation error

Schema: CommitNewVisaBadRequest

successboolean
messagestring
401Unauthorized - invalid or missing token

Schema: Unauthorized

successboolean
Default: false
messagestring
Possible values:
You don't have credentialsYou don't have permissionInvalid access tokenYour access token is not valid or expired
403Forbidden - agency not allowed to create agent-paid bookings

Schema: CommitNewVisaForbidden

successboolean
messagestring
endpoint.example "Your agency is not allowed to create agent-paid bookings"
404Product or agency not found

Schema: CommitNewVisaNotFound

successboolean
messagestring

Try it Out

bash
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"
  }
}'
get/agents-api/get-products-history

Get 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.

Requires Authentication (Bearer Token)

Parameters

dateStartquerystring

Optional lower bound on booking dateCreated (ISO date or datetime). Omit with dateEnd to leave range open on the lower side.

dateEndquerystring

Optional upper bound on booking dateCreated (ISO date or datetime). Omit with dateStart to leave range open on the upper side.

bookedProductIdquerystring

MongoDB ObjectId of the booked product (24-character hex)

statusCodequery

Agency-facing booking status filter (same values as status on each item).

Possible values:

waitingForTravelerToFillpleaseFillVisaDetailswereProcessingYourVisamissingVisaDetailswaitingForTravelerResponsehandledByOurTeamgovernmentReviewingapplicationNotApprovedfraudFlaggedvisaProcessFinishedrefundInProgressrefundCompleted
fromCountryquerystring

Origin country on the booking (case-insensitive exact match)

toCountryquerystring

Destination country on the booking (case-insensitive exact match)

visaTypequerystring

Visa type on the booking (case-insensitive exact match)

firstNamequerystring

Substring match on applicantDetails.firstName (case-insensitive)

lastNamequerystring

Substring match on applicantDetails.lastName (case-insensitive)

emailquerystring

Substring match on applicantDetails.email (case-insensitive)

customKey1querystring

Exact match on customKeys.customKey1. Use for partner-defined tracking or lookup data.

customKey2querystring

Exact match on customKeys.customKey2. Recommended for a partner external booking ID.

customKey3querystring

Exact match on customKeys.customKey3. Recommended for a partner external traveler ID.

customKey4querystring

Exact match on customKeys.customKey4. Recommended for a partner external trip ID.

customKey5querystring

Exact match on customKeys.customKey5. Use for extra partner context when needed.

Responses

200Successful response

Schema: GetHistoryOfProductsResponse

successboolean
endpoint.example true
messagestring

Present when no bookings match filters (success still true).

endpoint.example "There are no matching products"
bookedProductsarray

Newest bookings first; capped at 300 items.

Array of object(click to see properties)
400Bad request

Schema: GetHistoryOfProductsBadRequest

successboolean
Default: false
messagestring

Examples include invalid dateStart/dateEnd, start date after end date, invalid bookedProductId, invalid statusCode.

401Unauthorized

Schema: Unauthorized

successboolean
Default: false
messagestring
Possible values:
You don't have credentialsYou don't have permissionInvalid access tokenYour access token is not valid or expired
404Not found
500Internal server error

Try it Out

bash
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.

Instant PaymentYour PlatformIframe

Details

Step 1: Check visa products

Call GET /agents-api/get-products-from-countries?from={from}&to={to} to find available products. Use the selected productId in the checkout entry URL.

Step 2: Start instant checkout

Send the traveler to https://www.yourvisa.ai/instant-visa-checkout (standalone) or https://www.yourvisa.ai/iframe/instant-visa-checkout (embedded in your site) with productId, affiliatedAgencyId, travelerClient, isInstantPayment=true, optional traveler prefill fields, and customKey1..5. productId is used on entry because bookedProductId does not exist until checkout creates the booking.

Step 2C: Checkout parameters

travelerClient is web or app. Use web when the traveler starts from your website. Use app when the traveler starts from your mobile app and payment opens in an external browser tab. travelerFirstName, travelerLastName, travelerEmail, and travelerPhone are optional prefill fields. customKey1..5 are your reference fields, for example external user ID, order ID, traveler ID, trip ID, campaign, or source.

Step 3: After payment

Behavior depends on your agency instant-payment handoff setting (configured by YourVisa — contact us to enable or change): • Continue on YourVisa (default): the traveler continues the visa wizard on YourVisa. • Return to partner: the traveler sees a payment-complete screen instead of continuing on YourVisa. If YourVisa configured a partner redirect URL for your agency, they are sent there after a short countdown with bookedProductId, productId, paymentStatus=paid, and any non-empty customKey1..5 — for both travelerClient=web and travelerClient=app. If no redirect URL is configured, they see a thank-you screen and return to your app or website on their own. Iframe embeds receive instant_payment_complete on the parent page when partner handoff is enabled. YourVisa also sends the traveler a payment-received confirmation email branded for your agency.

Step 3B: App booking lookup

After the traveler returns to your app, use your original custom keys to find the paid booking. Example: GET /agents-api/get-products-history?customKey1={externalUserId}&customKey2={externalBookingId}. Filters use exact matching, are scoped to your agency, and are combined with other optional filters using AND logic. Use the returned bookedProducts[0]._id as bookedProductId.

Step 4: Get iframe application link

Call POST /agents-api/get-application-link with {"bookedProductId": "66a9ebe9572eb2904562c3ae", "langKey": "en", "isIframe": true}. The response includes applicationUrl.

Step 5: Embed the iframe

<iframe src="{applicationUrl}" width="100%" height="700" frameborder="0"></iframe>

Step 6: Listen for completion

After YourVisa submits the application inside the iframe, it shows an Application submitted message and sends application_submitted to the parent page. Your platform owns what happens next: keep the iframe open, close it, or replace it with your own trip/application status screen.

💡 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.
get/agents-api/download-evisa-document

Download 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.

Requires Authentication (Bearer Token)

Parameters

bookedProductIdRequiredquerystring

MongoDB ObjectId of the booked product (24-character hex)

Responses

200Presigned download URL generated successfully

Schema: DownloadEvisaDocumentResponse

successboolean
endpoint.example true
dataobject
400Bad request - missing or invalid bookedProductId

Schema: DownloadEvisaDocumentBadRequest

successboolean
Default: false
messagestring
endpoint.example "bookedProductId query parameter is required"
401Unauthorized - invalid or missing token

Schema: Unauthorized

successboolean
Default: false
messagestring
Possible values:
You don't have credentialsYou don't have permissionInvalid access tokenYour access token is not valid or expired
403Forbidden - booking not found or access denied

Schema: DownloadEvisaDocumentForbidden

successboolean
Default: false
messagestring
endpoint.example "Booking not found or access denied"
404No eVisa document available for this booking

Schema: DownloadEvisaDocumentNotFound

successboolean
Default: false
messagestring
endpoint.example "No eVisa document available for this booking"
errorCodestring
Possible values:
EVISA_DOCUMENT_NOT_AVAILABLEEVISA_DOCUMENT_FILE_NOT_FOUND
hasEvisaDocumentboolean

false when the booking has no eVisa attached yet; true when metadata exists but the file is missing

endpoint.example "false"

Try it Out

bash
curl -X GET "https://api.yourvisa.ai/agents-api/download-evisa-document" \
  -H "Authorization: Bearer YOUR_TOKEN_HERE"
post/agents-api/create-corporate

Create 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.

Requires Authentication (Bearer Token)

Request Body

Schema: CreateCorporateRequest

corporateNameRequiredstring
partnerCorporateIdentifierRequiredstring

Partner-owned corporate identifier unique within your agency

contactRequiredobject

Primary contact who is also created as the corporate manager

Responses

201Corporate created successfully

Schema: CreateCorporateResponse

successboolean
endpoint.example true
corporateIdstring
partnerCorporateIdentifierstring
400Validation error

Schema: BadRequest

messagestring
errorCodestring
Default: BadRequest
401Unauthorized

Schema: Unauthorized

successboolean
Default: false
messagestring
Possible values:
You don't have credentialsYou don't have permissionInvalid access tokenYour access token is not valid or expired
409Partner corporate identifier already in use

Schema: BadRequest

messagestring
errorCodestring
Default: BadRequest

Try it Out

bash
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": {}
}'
get/agents-api/get-corporates

List 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=1
Requires Authentication (Bearer Token)

Parameters

corporateIdquerystring

YourVisa corporate MongoDB ObjectId

partnerCorporateIdentifierquerystring

Partner-owned corporate identifier (exact match)

corporateNamequerystring

Case-insensitive partial name match

pagequeryinteger

Page number (default 1)

Responses

200Corporates listed successfully

Schema: GetCorporatesResponse

successboolean
endpoint.example true
corporatesarray
Array of object(click to see properties)
pageinteger
pageSizeinteger
totalCountinteger
totalPagesinteger
400Validation error

Schema: BadRequest

messagestring
errorCodestring
Default: BadRequest
401Unauthorized

Schema: Unauthorized

successboolean
Default: false
messagestring
Possible values:
You don't have credentialsYou don't have permissionInvalid access tokenYour access token is not valid or expired

Try it Out

bash
curl -X GET "https://api.yourvisa.ai/agents-api/get-corporates?partnerCorporateIdentifier=acme-001&corporateName=Acme&page=1" \
  -H "Authorization: Bearer YOUR_TOKEN_HERE"

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.

Affiliated Agency UsageCustom Links

Details

Domain

https://www.yourvisa.ai/ - The base URL of the service.

from

(Required) Two-letter country code representing the traveler's origin country or passport nationality (e.g., 'IL' for Israel, 'US' for United States).

to

(Required) Two-letter country code representing the destination country (e.g., 'US' for United States, 'GB' for United Kingdom).

visaType

(Optional) Type of visa being requested (e.g., 'tourist', 'business', 'student'). If not specified, defaults to 'tourist'.

affiliatedAgencyId

Represents the unique ID of the affiliated agency or partner integrating the service.

affiliatedAgentId

(Optional field) Identifies the specific agent within the affiliated agency who is generating the visa.

customKey1-5

(Optional) Custom tracking parameters. You can include up to 5 custom keys (customKey1, customKey2, customKey3, customKey4, customKey5) for additional tracking or identification purposes. These will be stored in the booking and sent via webhooks.

💡 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.

Download iframe tester

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.

Embedded Iframe

Details

Iframe base path

All iframe routes live under https://www.yourvisa.ai/iframe/.... They suppress the main YourVisa navbar and footer.

Payment page branding

Embedded payment surfaces show the YourVisa.ai logo and legal policy links: /iframe/instant-visa-checkout, /iframe/corporate-payment-setup/{token}, and the payment step inside /iframe/visa-wizard. Visa search and other wizard steps do not.

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

On /iframe/traveler, /iframe/visa-wizard, and /iframe/instant-visa-checkout you may append: customKey1..5, langKey (e.g. &langKey=he).

Language support (direct iframe URLs)

Append langKey as a query parameter on iframe URLs you build yourself. Supported values: en (default), de, es, ru, he, ar, fr. Traveler search: https://www.yourvisa.ai/iframe/traveler?affiliatedAgencyId={agencyId}&customKey1={value1}&langKey=he Instant checkout: https://www.yourvisa.ai/iframe/instant-visa-checkout?productId={productId}&affiliatedAgencyId={agencyId}&isInstantPayment=true&travelerClient=web&customKey1={value1}&langKey=de

Language support (visa wizard URL)

Append langKey as a query parameter when you build the iframe URL directly. https://www.yourvisa.ai/iframe/visa-wizard?productId={productId}&affiliatedAgencyId={agencyId}&customKey1={value1}&langKey=de

Language support (signed application link)

If you already have a bookedProductId and need a tokenized link, pass langKey in POST /agents-api/get-application-link. Use applicationUrl from the response as the iframe src.

Language support (corporate payment setup)

Pass langKey in POST /agents-api/create-corporate-payment-setup-link. The response setupUrl includes it when provided. {"corporateIdentifier": "acme-001", "isEmbeddedInPartnerPage": true, "langKey": "he"} Example setupUrl path: /iframe/corporate-payment-setup/{token}?langKey=he

Custom branding

If your agency has custom branding enabled, iframe routes automatically apply your branded experience.

💡 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.

Embedded IframeVisa Application

Details

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

productId — the visa product the traveler is applying for. affiliatedAgencyId — your agency ID so the booking is attributed to your account.

Optional parameters

customKey1..5, langKey (e.g. &langKey=he).

Standalone vs iframe

Use /iframe/visa-wizard for embedding inside your site. Use /visa-wizard with the same query parameters when opening in a new browser tab.

Listen for completion

After submission, the iframe sends application_submitted to the parent page.

Already have a bookedProductId?

If the traveler already paid or you created a booking via API, use POST /agents-api/get-application-link with isIframe: true instead. That returns a signed applicationUrl with a token for the existing booking.

💡 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.

Embedded IframeInstant Payment

Details

After payment — option 1: Redirect to your website

YourVisa sends the traveler to a redirect URL you provide in advance. Query parameters include bookedProductId, productId, paymentStatus=paid, and any non-empty customKey1..5. Works for both travelerClient=web and travelerClient=app. Contact YourVisa support to request or change your redirect URL — it cannot be set through the API.

After payment — option 2: Stay embedded (iframe event)

When checkout runs inside an iframe, your parent page receives an instant_payment_complete postMessage as soon as payment succeeds. Use this to close the iframe, show your own confirmation, or continue in your UI. See Listen for payment complete and Event: instant_payment_complete below.

After payment — option 3: Continue the visa wizard

The traveler moves straight into the YourVisa visa wizard in the same iframe or tab — no redirect and no partner handoff screen. No instant_payment_complete is sent at payment time. Listen for application_submitted after the traveler finishes and submits the visa form.

Combining options 1 and 2

When a redirect URL is configured, embedded checkout still fires instant_payment_complete immediately, shows a short payment-complete screen, then redirects inside the iframe after a few seconds. That gives your page time to close the iframe or handle the event before the redirect.

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

productId, affiliatedAgencyId, isInstantPayment=true, travelerClient (web or app).

Optional parameters

customKey1..5, langKey (e.g. &langKey=he), travelerFirstName, travelerLastName, travelerEmail, travelerPhone.

travelerClient

web — traveler starts from your website or embedded iframe. app — traveler starts from your native mobile app; payment may open in an external browser tab or WebView.

No redirect URL configured

If partner handoff is enabled but no redirect URL is set, travelers see a thank-you screen telling them payment was received and to return to your app or website. Find the paid booking with GET /agents-api/get-products-history or resume with POST /agents-api/get-application-link.

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.

Embedded IframeCorporate

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

langKey only — set in the POST body when creating the link (e.g. "langKey": "he"). The returned setupUrl includes it. customKey1..5 do not apply to this flow.

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

Only when isEmbeddedInPartnerPage was true on link creation and after the server confirms card save.

💡 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.

MCPAI Integration

Details

1. Get an API key

Log in to your YourVisa.ai account, go to Dashboard → MCP API tab, and click 'New Key'. Copy and save it — it is shown only once.

2. Add to your MCP client config

Add the config block shown below to your MCP client configuration file (e.g. claude_desktop_config.json for Claude Desktop, or the MCP settings in Cursor).

3. Available tools

search_visas · get_visa_details · get_visa_requirements · get_visa_fees · get_application_link · get_country_info

4. Stateless & read-only

The MCP server only reads data. No bookings or writes are performed via MCP.

5. Rate limits

Free tier: 60 requests / minute.

Example Response

200MCP client config snippet
{
  "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.

Account SettingsWebhook

Details

Where to set it

Log in to your dashboard and go to the 'Account Settings' tab. There you can add or update your webhook URL.

What it's used for

Your webhook will be triggered every time a visa application is created by your agency.

Example use

You might use this to sync applications with your internal CRM, send alerts, or perform custom logic on new submissions.

Example Response

200Successful 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.