DCM Platform Guide
  • 🌐DCM platform
  • ⚙️Specifics of working with the API
    • 🔐Security stack
    • 🔑Key Generation
    • 🔐Data encrypting
    • 🪃Retry policy
  • 🎨Design guide
  • 🗂️DCM platform's artifacts
  • 🏦Bank
    • 📋Preparing for integration
    • 🏪E-commerce
      • 📦Order and payment
      • 📨Payment message
        • 1️⃣Validation
        • 2️⃣Сallback 1 “Pay-in”
        • 3️⃣Callback 3 “Pay-out”
        • 4️⃣Callback 4 "Credit callback"
      • 🎯Testing
      • 🖇️Merchant Onboarding
      • ⛔Error reference guide
    • 🗃️Alias database
      • 🗝️Adding alias
      • ↕️"Сallback "Alias updated"
      • ☑️Get alias status
    • 💸p2p transfers
      • 📲p2p by phone number
        • ⏺️p2p order (to pay)
        • 🔍Receiver search
        • 🗂️Get receiver's data
        • ⏪Callback "Pay request"
      • 🖇️p2p by deeplink or QR code
        • ⏺️p2p order (to request)
        • Pay request initiation
      • 📨Payment message
        • 1️⃣Validation
        • 2️⃣Сallback “Pay-in”
        • 3️⃣Callback "Pay-out"
    • 💲Gross settlement
      • 1️⃣Callback “Gross_Settlement”
      • 2️⃣Gross_settlement_list
      • 3️⃣Gross_settlement_by_id
      • 4️⃣Gross_settlement_pay
      • 5️⃣Gross_settlement_confirm
      • 6️⃣Gross_settlement_confirm_internal
      • 📧Email notification
    • ✔️Reconciliation
  • 🏢Merchant
    • 🏫DCM platform for Merchants
      • 🔠Integration options
    • 👨‍🏫Preparing for integration
      • ⚙️Working with the API
      • 🔑Key Generation
      • 🖥️Updating interfaces
    • 🏪E-commerce
      • 📦Order
        • 💵Payment through the DCM platform
        • 💳Payment on the Merchant's website
        • 📋Emitters
        • 📬Order status
      • 1️⃣Сallback "Pay-in"
  • 📑Document data
    • 🆕Version history
    • 📃Change log
Powered by GitBook
On this page
  1. Bank
  2. E-commerce

Order and payment

PreviousE-commerceNextPayment message

After ordering a product or service on a website or at a point of sale, if the buyer selects payment via the DCM platform, the Merchant initiates a request using the POST /create_merchant’s_order method.

Endpoint

Payload запиту

{
  "sub": "623e460b-9ffd-41df", - Merchant identifier (uid) 
  "exp": 1719493881, - Order expiration time
  "iat": 1707105971, -  Order creation time
  "amt": 1000, -  Order amount
  "cur": "UAH", -  Order currency
  "ref": "d4ee06f", -  Order number in the Merchant's accounting system
  "prp": "Payment for goods/services", -  Payment purpose
  "url": "https://www.city24.com", - Redirect URL for returning the buyer to the Merchant's website
  "fri": { - Information about the ultimate beneficiary of the funds (optional)
    "frn": "Kyivpark LLC", - Name
    "frc": "0987654321", - Tax number
    "fra": "UA55386780956567", -  Account number (IBAN)
    "frb": "300335", - Servicing bank's code
    "frm": "7791" -  Merchant category code
 }

Example Response:

{
"id":"3aa202bc-6b20-445d-89698274b11c66d0",
"link_deeplinks":"https://api.admin.smaug.armenotech.dev/api/v1/merchants/order?id=3aa202bc-6b20-445d-8969-8274b11c66d0&mobile=1",
"link_qr":"https://api.admin.smaug.armenotech.dev/api/v1/merchants/order?id=3aa202bc-6b20-445d-8969-8274b11c66d0&mobile=0"
}

Based on the received response, the DCM platform generates payment pages with the following payment options:

  • Scanning a QR code using the mobile app of a participating bank.

  • Scanning a QR code using the smartphone's camera.

  • Following a deep link, which automatically redirects to the payment interface.


QR Code Scanning with the Initiator Bank's Mobile App

This involves the Bank receiving the order_id parameter, which is embedded in the QR code data as a URL.

Example URL:

https://api.admin.smaug.armenotech.dev/api/v1/merchants/order?id=3aa202bc-6b20-445d-8969-8274b11c66d0&mobile=1"

order_id is passed as a query parameter.

The Bank must use the received order_id in a GET /merchants/order/nbu/json request to retrieve detailed information about the order.

Endpoint:

Positive Response (example):

{
  "id": "3aa202bc-6b20", - Order ID 
  "exp": 1719493881, - Order expiration time
  "amt": 1000, - Order amount
  "cur": "UAH", - Order currency
  "ref": "d4ee06f", - Order ID in the Merchant's system
  "prp": "Payment for goods/services", - Payment purpose
  "uid": "623e460b-9ffd-41df", - Merchant identifier 
  "recn": "Merchant", - Merchant's name
  "recc": "44684355", - Merchant's tax identification number
  "acc": "UA553806343157729535", - Merchant's account number (IBAN)
  "mcc": 5231, - Merchant category code
  "logo_url": "https://public-files-city24.svg", - Link to the Merchant's logo (if available)
  "bic": "380634", - Receiver bank's code (servicing the Merchant)
  "fri": { - Information about the ultimate beneficiary of the funds
    "frn": "Kyivpark LLC", - Name
    "frc": "0987654321", - Tax number
    "fra": "UA55386780956567", -  Account (IBAN)
    "frb": "300335", -  Servicing bank's code
    "frm": "7791" - Merchant category code
  },
  "bpk": { - Receiver bank's public key information (needed for encoding payment notification data)
    "alg": "RS256",
    "e": "AQAB",
    "n": "iwdsLwz7LyT4i9MJVfH...",
    "kid": "9A21DD62-DA56-402D-....",
    "kty": "RSA",
    "use": "sig"
  }
}

Negative Response

{
    "error": "func GetMerchantsOrderNbuJSONHandler() failed. Error: failed to get order by ID: get order by guid err: order not found"
}

QR Code Scanning with the Smartphone Camera or using following a Deep Link

This involves automatically redirecting the Bank's customer to the DCM platform’s payment page in their mobile browser. This page displays a list of participating banks along with corresponding deep links for completing the payment.

The deep link contains a reference to the participating bank's mobile app and payment information about the order in JWT format.

The structure of the payment information in JWT fully mirrors the JSON data from the QR code.

Example Deeplink structure:

Before providing the deep link to the DCM platform, the participant bank must ensure that such a deep link is correctly registered as an App Link for Android applications and as a Universal Link for iOS.

JWT format

eyJhbGciOiJSUzI1NiIsImtpZCI6IjljMzdlYjc5LWI2YmYtNDQzNC1hYzNhLTM1NTZjOGI0YjBmNyIsInR5cCI6IkpXVCJ9.eyJhY2MiOiJVQTI0MzA1Mjk5MDAwMDAyNjAwMzAwNjcxODE4MSIsImFtdCI6MTAwLCJiaWMiOiIzMDUyOTkiLCJicGsiOnsiYWxnIjoiUlMyNTYiLCJlIjoiQVFBQiIsIm4iOiJpd2RzTHd6N0x5VDRpOU1KVmZIYnVMRVNGcUZONWV6dVhNd2V1bTI1QVRibEt4U3VwZGM4a2FvZF85VlNDODVuM1lJb2NxQXVHUlhCclhXRS1zMmE0aUM0X3lNWFVfbDJBTnQ2T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p9QiwJqAxsd726Xb4sqUUNukniZenjU9hqEJDNNz5leG8CG6d_3Uk3-xx7W_sEUkzlnvuZN9ti_Ih97wDBRQtxzqK6lMqRT2FnP4bgzIgeYY8f7HgqyXLW-INnWyIsM9SlEIfLtPeW-fcyQn-SOLSTHEHk_H_bFTelU_MpKqkvMBWPC_frkCOIde7WqA8Wb9LOoEvaY9YvimIFpDccA98_yphupgE1X-bQljrqF1oAoUOWhY4EJd3A90dw0ENKdEPGvs2tzViOM50fa4fLOods1Ny1PxjfA

🏦
🏪
📦
https://api-0s3og9.integrate.dcmapis.com/api/v1/merchants/order?jwt={{JWT}}'
https://api-bank1.develop.dcmapis.com/api/v1/merchants/order/nbu/json/a27147e8-94ba-4ff7-82d2-0afd20c07d37
https://awesome-bank.com.ua/deeplinks/payment_create?order=$JWT