iFrame Initialization

Initialize the MiFinity eWallet iFrame to collect payments from your customers.

Initialize the eWallet iFrame to present your customers with a hosted payment interface. This endpoint returns an initializationToken that you use to render the iFrame on your page.

🔗

POST https://demo.mifinity.com/pegasus-ci/api/gateway/init-iframe/

Headers

ParameterTypeDescription
Content-TypeStringapplication/json
AcceptStringapplication/json
x-api-versionString1
KeyStringYour API key

Request Parameters

NameTypeRequiredDescription
returnUrlURLYesCallback URL for successful transfers. Receives a JSON ApiSGPGPaymentResponse object. Results are sent asynchronously once the remote processor executes the transfer (this can happen after the iFrame closes). Execution time varies by processor.
errorUrlURLNoCallback URL for failed transfers. Receives a JSON ApiSGPGErrorResponse object. Results are sent asynchronously once the remote processor executes the transfer (this can happen after the iFrame closes). Execution time varies by processor.
validationKeyStringYesSecret key to validate the payment response and retrieve payment status. Generate this on your end — it must be unique per request. Min 48, max 255 characters.
clientSGPGPlatformUserYesObject containing client information. All fields except emailAddress can be edited within the iFrame.
clientReferenceStringYesYour internal client identifier. Max 48 characters.
addressSGPGAddressYesObject containing the client's address. Editable within the iFrame.
traceIdStringYesYour unique identifier for this call. Max 48 characters.
moneyMoneyYesObject containing the transfer amount and currency.
descriptionStringYesTransfer description. Max 255 characters (Sofort/Klarna deposits are limited to 27 characters).
destinationAccountNumberStringYesYour MiFinity account number to collect the payment.
iframeIdEntityIdNoSpecify if you have multiple iFrames with different types.
brandIdStringYesA 3-digit ID provided by MiFinity indicating which brand the call is made through.
languagePreferenceStringNo2–5 character language code for the iFrame. Defaults to English (EN). Supported values: BR, PT_BR, CN, ZH_CN, DE, DK, DA, DA_DK, EN, ES, FI, FR, GR, EL, EL_GR, HR, IT, JP, JA, JA_JP, LA, ES_LA, NL, NO, PL, PT, RU, SV, SE, SV_SE, ZH, TW, ZH_TW.
logoUrlURLNoURL of a logo to display below the iFrame header (centered). The logo container has a max height of 45px — the image is resized to fit while preserving aspect ratio. Use small images to minimize load time.
paymentMethodStringNoPayment method to initialize the iFrame with. Required when using the Split Gateway feature.

Nested Objects

SGPGPlatformUser
NameTypeRequiredDescription
dobLocalDateYesDate of birth. Format: YYYY-MM-DD
firstNameStringYesFirst name. 1–20 characters.
lastNameStringYesLast name. 1–20 characters.
phoneStringYesPhone number.
dialingCodeStringYesInternational dialing code.
nationalityStringYesISO 3166-1 alpha-2 country code.
emailAddressStringYesEmail address. Max 40 characters.
SGPGAddress
NameTypeRequiredDescription
addressLine1StringYesBuilding name/number. Max 40 chars.
addressLine2StringNoStreet name. Max 40 chars.
countryCodeStringYesISO 3166-1 alpha-2 country code (2 chars).
postalCodeStringNoPostal code. Max 15 chars.
stateStringNoState code. Max 2 chars.
cityStringYesCity name. Max 30 chars.
Money
NameTypeRequiredDescription
amountBigDecimalYesTransfer amount.
currencyStringYesCurrency code in ISO 4217 format.

Request Example

{
  "returnUrl": "https://your-site.com/payment/success",
  "errorUrl": "https://your-site.com/payment/error",
  "validationKey": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4",
  "client": {
    "dob": "1985-10-10",
    "firstName": "John",
    "lastName": "Smith",
    "dialingCode": "353",
    "phone": "81234567890",
    "nationality": "GB",
    "emailAddress": "[email protected]"
  },
  "clientReference": "client-ref-12345",
  "address": {
    "addressLine1": "Baker str 212B",
    "countryCode": "IE",
    "postalCode": "123456",
    "city": "London"
  },
  "traceId": "traceIdutTn7_14bQWAsAARrdUeV",
  "money": {
    "amount": 100.00,
    "currency": "EUR"
  },
  "description": "Deposit to account",
  "destinationAccountNumber": "1001001",
  "brandId": "001",
  "languagePreference": "EN"
}

Response

Success Response Fields

NameTypeDescription
traceIdStringThe trace ID submitted with the request.
initializationTokenStringEncoded token used to render the iFrame.
clientSGPGPlatformUserObject containing the submitted client information.
addressSGPGAddressObject containing the submitted address information.

  "payload": [
    {
      "traceId": "traceIdutTn7_14bQWAsAARrdUeV",
      "initializationToken": "75lh4Lh_M5SCrA_k4Yse-Z_5NYk95eq6jKcovrOhoSS291nXBhv7EQAgZeBvaZ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3s=",
      "client": {
        "dob": "1985-10-10",
        "firstName": "John",
        "lastName": "Smith",
        "dialingCode": "353",
        "phone": "81234567890",
        "nationality": "GB",
        "emailAddress": "[email protected]"
      },
      "address": {
        "addressLine1": "Baker str 212B",
        "countryCode": "IE",
        "postalCode": "123456",
        "city": "London"
      }
    }
  ]
}

What’s Next

Generate JavaScript html code for your clients.