Skip to content
paymentsidramarmeniae-commerce

Idram payment integration for an online store: how it works

7 min readBy Tigran

ByTigranFounder, EcomHubPublished Updated

If you sell online in Armenia, a share of your customers will ask to pay with Idram. Idram is a wallet, not a card acquirer, so it does not plug into your bank's vPOS. It has its own merchant interface, and that interface is small: an HTML form you post to Idram, two requests Idram sends back to your server, and one checksum.

This post walks through that flow using Idram's own document, the Idram Payment System merchant interface description published by Idram's API account. Every field name below comes from that document. Where the document is silent, we say so instead of guessing.

What Idram gives you after the agreement

You do not create these settings yourself. According to the document, each merchant has three URLs, one secret key and one email address, and "at the moment these 5 parameters are set by Idram payment system technical personnel after signing an agreement with merchant company."

  • SUCCESS_URL: where the customer is sent after a successful payment.
  • FAIL_URL: where the customer is sent after a failed payment.
  • RESULT_URL: the script on your server that answers Idram's requests. This is the important one.
  • SECRET_KEY: known only to you and Idram. It goes into the checksum.
  • EMAIL: where Idram sends the payment confirmation if your server does not answer "OK".

You also get your merchant IdramID, the account that receives the money. So the first practical step is not code. It is the agreement, and deciding before you sign which URL on your site will be the RESULT_URL, because Idram's staff will set it for you.

Step 1: send the customer to Idram with a form

Your checkout page builds an HTML form with hidden fields and posts it to Idram:

  • EDP_LANGUAGE: the language of Idram's page, RU, EN or AM.
  • EDP_REC_ACCOUNT: your merchant IdramID.
  • EDP_DESCRIPTION: what the customer is paying for. It becomes the description of the Idram transaction.
  • EDP_AMOUNT: the amount, greater than zero, with a dot as the decimal separator.
  • EDP_BILL_NO: your order or invoice number.
  • EDP_EMAIL (optional): overrides the EMAIL setting for this one payment.

Any extra field without the EDP_ prefix is passed through and posted back to your site after the payment. That is a convenient place for something like an internal cart reference, but your order number already travels in EDP_BILL_NO, so you rarely need it.

Idram works in UTF-8, so EDP_DESCRIPTION must be UTF-8 text. The document gives a separate address for sites that still use windows-1251.

One detail to check with Idram before you go live: the address. The document's text says to post to https://web.idram.am/payment.aspx, while its own HTML example posts to https://money.idram.am/payment.aspx. When we checked on 16 November 2026, both addresses answered with a redirect to https://banking.idram.am/Payment/GetPayment. Use the address Idram confirms for your agreement and test it, rather than copying one from a blog post, this one included.

After the customer submits the form, they log in on Idram's side and confirm the payment there. Your site never sees their Idram credentials.

Step 2: answer the precheck

Before Idram moves any money, it sends a request to your RESULT_URL to ask whether the order is real. This preliminary request has four fields:

  • EDP_PRECHECK with the value YES
  • EDP_BILL_NO
  • EDP_REC_ACCOUNT
  • EDP_AMOUNT

Your server looks up the order and, if everything matches, replies with the plain text OK, with no HTML around it. If Idram does not receive "OK", the document is clear: the customer cannot pay, no money moves, and the customer is redirected to the FAIL_URL.

The sample script in the document checks only that the order exists. Check more than that:

  • The order with that EDP_BILL_NO exists and is still unpaid.
  • EDP_REC_ACCOUNT is your own IdramID.
  • EDP_AMOUNT equals the order total you expect. Compare the numbers, not the strings: you may have sent 1900 and receive 1900.00.

If any of these fail, do not answer "OK". The precheck is your chance to stop a payment for a cancelled order, an already paid order or a tampered amount before the customer is charged.

Step 3: verify the payment confirmation

After the payment completes, Idram sends a second request to the same RESULT_URL, this time with:

  • EDP_BILL_NO: your order number.
  • EDP_REC_ACCOUNT: your IdramID.
  • EDP_PAYER_ACCOUNT: the customer's IdramID.
  • EDP_AMOUNT: the amount, in 0.00 format.
  • EDP_TRANS_ID: Idram's transaction ID, unique in Idram's system, 14 characters.
  • EDP_TRANS_DATE: the transaction date, dd/mm/yyyy.
  • EDP_CHECKSUM: a signature over the data.

The checksum is how you know the request came from Idram and was not changed on the way. Join these values with a colon, in this order, and take the MD5 hash:

EDP_REC_ACCOUNT:EDP_AMOUNT:SECRET_KEY:EDP_BILL_NO:EDP_PAYER_ACCOUNT:EDP_TRANS_ID:EDP_TRANS_DATE

If your hash matches EDP_CHECKSUM, the payment is genuine: mark the order as paid and reply OK. The sample in the document compares the two values in upper case, so make your comparison case-insensitive.

Three details from the sample are worth copying exactly:

  • It uses your own stored IdramID for EDP_REC_ACCOUNT in the hash, not the value from the request.
  • It hashes EDP_AMOUNT exactly as received. Do not reformat it before hashing, or a correct payment will fail the check.
  • It takes the secret key from configuration. Keep SECRET_KEY on the server only, never in the page or in a mobile app.

If Idram does not get "OK" back from this request, it sends the confirmation to your EMAIL address instead. That email is your safety net, not your process: someone has to read it and reconcile the order by hand. Fix the cause the same day.

The mistakes that cost money

The protocol is short, so most problems come from what happens around it.

Treating the SUCCESS_URL as proof of payment. The SUCCESS_URL is a page the customer's browser is sent to. Anyone can open it. The only proof of payment is a confirmation request with a valid checksum. Your success page should read the order status from your database and show "paid" only if the confirmation already set it.

Taking the amount from the browser. The form is built in the customer's browser, so its fields can be edited. If your RESULT_URL compares the incoming amount against the order total stored on your server, an edited form fails the precheck. If it trusts whatever amount arrives, it does not.

Processing the same payment twice. Write the confirmation handler so that a second request with the same EDP_TRANS_ID changes nothing, and still answers "OK". Store EDP_TRANS_ID with the order. You will need it anyway when you reconcile with Idram's statements.

A RESULT_URL that Idram cannot reach. It has to be a public HTTPS address on your live site, not behind a login, a staging password or a firewall rule. If a CDN or bot protection sits in front of your site, make sure Idram's server-to-server requests reach the script. A blocked precheck looks to the customer like Idram refusing their payment.

Answering with a full page. The answer must be the two letters OK. A framework that wraps every response in a layout, or adds a byte-order mark or whitespace, can break it. Test the raw response with a tool like curl.

Losing the bill number. EDP_BILL_NO is how both requests find your order. Use your real order ID, not a value generated per page load.

Paying from the Idram mobile app

Idram also supports payment directly in its mobile wallet: a merchant's mobile app opens the Idram app and the customer pays there. The document links to integration guides for iOS and Android. The server side is the same as on the web: the same precheck, the same confirmation and the same checksum. If you build the RESULT_URL properly once, both channels share it.

What the document does not cover

The merchant interface description covers paying and confirming. It does not describe an API call for refunds or a way to query a transaction's status later. If you need either, ask Idram what is available for your contract before you plan your refund process around it, and write down the answer. Until then, assume refunds are a manual step and give whoever handles them the order's EDP_TRANS_ID and EDP_PAYER_ACCOUNT so they can find the payment.

Where Idram fits next to card payments

Most stores that add Idram also take cards. Card payments in Armenia go through your bank's vPOS: ArCa-protocol banks or Ameriabank's own vPOS API. That is a different integration with its own contract. Our ArmPay case study covers the card side we built for ArCa banks and Ameriabank. Idram was not part of ArmPay, but the pattern is the same: redirect to the provider's page, then trust only the server-to-server confirmation.

On the order side, both should end the same way: one order record, one status, one payment reference, no matter which method paid it. That keeps your warehouse, your accounting export and your customer emails from caring how the customer paid.

Summary

An Idram integration is a form, a precheck and a verified confirmation. The code is short. What makes it safe is checking the amount against your own records, trusting only the checksum, handling repeats and keeping the RESULT_URL reachable.

We build payment integrations with Armenian banks and Idram for each store, on your own contract with no monthly app fee. If you are adding Idram to a store and want a second pair of eyes on the flow, get in touch.