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
  • POST/create_payment_message
  • GET/payment_message_status
  1. Bank
  2. p2p transfers

Payment message

Methods described on this page:

  • POST /create_payment_message

  • GET /payment_message_status

After the client confirms payment, the bank sends a request to the DCM platform in JWT format using the POST/payment_message method to create a Payment Message.

POST/create_payment_message

Endpoint: POST/api/v1/p2p/payment-messages Request format:

When forming a Payment Message, it is important to consider the structure's specifics.

Payload:

{ 
  "jti": "T12fa2213", 
  "payment_message_external_id": "112663", 
  "amount": 5, 
  "currency": "UAH", 
  "debtor_agent_bic": "306500", 
  "debtor": {
  "debtor_name": "encrypted value", (encrypted data)
  "debtor_id": "encrypted value", (encrypted data)
  "debtor_account": "UA761372924114433543273694797",
  "debtor_phone": "+380661234567" 
}, 
  "creditor_agent_bic": "380816", 
  "creditor": { 
    "creditor_name": "encrypted value", (encrypted data)
    "creditor_id": "encrypted value", (encrypted data)
    "creditor_account": "UA761372924114433543273694797",
    },
  "order_id": "bb95a18f-bd52-46ae-bb1e-0e6f42bf48f5", 
  "purpose": "Tesgtft777", 
  "msg_creation_date": "2023-12-10", 
  "msg_creation_time": "14:30:12", 
  "pm_type": "р2р", (enum: trade/ p2p/ return/ aid)
  "sender_account_type": "limit-related"
  "encryption": { 
      "nonce": "A1B2C3D4E5F6G7H8", 
      "encrypted_key": "a1b2c3d4e5f6g7h8i9j0" 
    } 
}
 

Response 200: plain text JWT token

Payload

{
 guid: '9dcf8b3b-c9fe-498c-9adf-364c30804f26'
}

The DCM platform allows retrieving information about the status of a payment message using the GET /payment_message_status request.

GET/payment_message_status

Endpoint: GET /api/v1/p2p/payment-messages/:guid

Response 2хх OK plain text JWT token

Payload

{ 
“payment_message”: {
"jti": "T12fa2213", 
"payment_message_external_id": "112663", 
"amount": 5, 
"currency": "UAH", 
"debtor_agent": { 
"debtor_agent_name": "TPN Bank", 
"debtor_agent_bic": "306500" 
}, 
"debtor": { 
"debtor_name": "encrypted value", 
"debtor_id": "encrypted value", 
"debtor_account": "UA761372924114433543273694797", 
}, 
"creditor_agent": { 
"creditor_agent_name": "Second Bank", 
"creditor_agent_bic": "380816" 
}, 
"creditor": { 
"creditor_name": "encrypted value", 
"creditor_id": "encrypted value", 
"creditor_account": "UA761372924114433543273694797", 
}, 
"order_id": "a38c4e9a-ee54-4e3c-90a4-d6af5e39cfc7", 
"purpose": "Tesgtft777", 
"msg_creation_date": "2023-12-10", 
"msg_creation_time": "12:12:12", 
"pm_type": "p2p", 
"sender_account_type": "limit-related", 
"encryption": { 
"nonce": "A1B2C3D4E5F6G7H8", 
"encrypted_key": "a1b2c3d4e5f6g7h8i9j0" 
}, 
"public_key": {  
    "alg": "RS256"
    "e": "AQAB", 
    "n": "iwdsLwz7LyT4i9MJVfHbuLESFqFN5ezuXMweum25ATblKxSupdc8kaVSC85n3YIocq, 
    "kid": "9A21DD62-DA56-402D-87A5-4714B113DAD4", 
    "kty": "RSA", 
    "use": "sig" 
  } 
}, 
"payment_message_guid": "8af3c3f5-7543-4bc2-8a0f-2e27f4d16972",
"status": "success" / "reject"
"reason": "string" 
}

Response 4хх ERROR

{ 
"code": "SOME_CODE", 
"message": "some code description" 
}

Error list:

Code 400:

  • "INVALID_PAYMENT_MESSAGE_GUID"

Code 401:

  • "AUTHORIZATION_FAILED"

Code 404:

  • "PAYMENT_MESSAGE_NOT_FOUND"

Code 500:

  • "INTERNAL_ERROR"

PreviousPay request initiationNextValidation

Last updated 3 months ago

🏦
💸
📨