LPB
Supports in this guide: Payments
Provider website: lpb.lv currently redirects to magnetiqbank.com (LPB - Latvijas Pasta Banka - has rebranded as Magnetiq Bank)
Note
Corefy also has a separate connector for Magnetiq Bank (code magnetiqbank), documented on its own page. This guide covers the lpb connector specifically - if you're setting up a brand-new connection, confirm with your account manager whether you should use this one or the separate Magnetiq Bank connector.
What you need to do for start processing transactions (brief summary)
- Get your credentials (from LPB)
- Connect in Dashboard
- Send an API request
Prerequisites: get from LPB
Contact your LPB account manager to get your account verified and receive the following.
- Merchant Interface Code -> Corefy field
merchant_interface_code-> LPB's identifier for your account. - Merchant Public Key Index -> Corefy field
merchant_public_key_index-> identifies which of your registered key pairs LPB should use. - Private Key (file) -> Corefy field
private_key-> your own RSA private key, generated as part of onboarding; used to sign every request to LPB. - Provider Public Key (file) -> Corefy field
provider_public_key-> LPB's own RSA public key, given to you by LPB; used to encrypt every request before it's sent. - Google Pay MID (optional) -> Corefy field
google_pay_mid-> only needed if you use Google Pay.
Important
This connector encrypts and signs every request with RSA key pairs, so onboarding requires an actual key exchange with LPB, not just copying API credentials: you (or Corefy on your behalf) generate a key pair, send LPB your public key, and receive LPB's own public key in return. Both your private key and LPB's public key then need to be uploaded here as files.
Payments processing (connect H2H Merchant account, create payment-invoice)
Connect H2H Merchant account in Corefy Dashboard
Step 1 - Open connection form
Open LPB in the provider directory and press Connect at LPB Provider Overview page in the New connection section. Choose H2H Merchant account.
Step 2 - Fill in fields and select settings
- Merchant Interface Code
- Merchant Public Key Index
- Private Key
- Provider Public Key
- Google Pay MID (optional)
- Test Mode -> (enable if you are using sandbox credentials)
Choose Currency / Features; check with your Corefy account manager which are enabled for your account.
Success
You have connected LPB H2H Merchant account!
First request to Corefy API (MIN)
What it does: creates a payment-invoice; card data itself is collected and submitted separately by Corefy's checkout/SDK layer, not as part of this request. LPB uses an off-site 3D Secure challenge (redirect-based); after the customer completes it and returns, Corefy finalizes the payment automatically - this can take up to around 30 seconds while Corefy polls LPB for the final result. CVV is always required - non-CVV sales aren't supported.
Payment - MIN
POST /api/payment-invoices
{
"data": {
"type": "payment-invoice",
"attributes": {
"reference_id": "8e3dbbb0-17af-4c9a-bedb-93bdac6900a2",
"service": "payment_card_eur_hpp",
"currency": "EUR",
"amount": 10
}
}
}
This connector also supports USD, GBP, PLN, CZK, TRY.
Payment - MAX
POST /api/payment-invoices
{
"data": {
"type": "payment-invoice",
"attributes": {
"reference_id": "6795502c-e27d-4d07-85e0-93245aab9a3f",
"service": "payment_card_eur_hpp",
"currency": "EUR",
"amount": 10,
"customer": {
"reference_id": "cus_123",
"name": "John Smith",
"email": "johnsmith@gmail.com",
"phone": "+15551234567"
}
}
}
}
customer is entirely optional - everything is only used to enrich the sale.
Extended request (MAX)
Why add extra fields (typical reasons): - Provide additional customer details for compliance/reconciliation - Positively influence conversion rate - Include optional fields required by your specific flow
No Constants are configured for this connector.
Options
custom_finalization_logic-> optional, boolean - LPB reports a successful payment in two stages: authorized (funds reserved) and later deposited (funds actually settled). Enable this to have Corefy wait for LPB's "deposited" confirmation before reporting the payment as a final success, instead of finalizing it as soon as it's authorized. Also available for Apple Pay and Google Pay.set_additional_data-> optional, boolean - delays status checks (reconciliation) until LPB's own overnight settlement/clearing cycle has had time to complete, instead of checking immediately; recommended if you've seen premature or inconsistent statuses shortly after a sale.use_api_v3-> optional, boolean - switches to a newer version of LPB's API; ask your account manager whether this applies to your account.
Refunds
LPB supports partial refunds, but only one refund per payment (no multiple partial refunds against the same payment).
Authorize / Capture / Void and Recurring
This connector also supports the standard Corefy Authorize->Capture/Void flow (hold funds first, then capture or release them separately) and saving a card as a token during a sale to charge it again later without resubmitting card data - ask your account manager if you need either set up for your integration.
Apple Pay / Google Pay
Both are supported for this account type. Google Pay requires the Google Pay MID field above; Apple Pay needs no extra LPB-specific fields.
Additional info
- Callback routing is automatic - Corefy generates the callback/return URLs per transaction, nothing to configure in LPB's own back-office.
- No payouts - this connector does not support payouts through Corefy.
FAQ / Troubleshooting
- Invalid credentials / auth error, or encryption/signature failures -> double-check the RSA key pair - make sure you uploaded your own private key (not LPB's) as
private_key, and LPB's public key (not your own) asprovider_public_key - Payment stays pending for a while after the customer returns from the 3D Secure page -> this is expected; Corefy polls LPB for up to about 30 seconds to get the final result
- Status looks final too early, or reconciliation looks inconsistent -> try enabling
custom_finalization_logicand/orset_additional_data- see the Options above - Refund fails on a second attempt -> only one refund is allowed per payment
- Currency or service is not supported -> confirm allowed currencies/features in your LPB account and in Corefy
Question
Still looking for help connecting your LPB account? Please contact our support team!