6. Payment

Working with payments yoy have the following features:

Get payment

Update payment

Create payment

Confirm payment

Get payments list

There are several types of payments inside 1 counterparty:

  • from emission to processing account;

  • from bank processing account to customer;

  • from customer to customer;

  • from processing to emission account;

  • from customer to bank processing account.

There are 2 types of payments between 2 counterparties:

  • from processing account of one counterparty to processing account of another counterparty;

  • from customer of one counterparty to customer of another counterparty.

Get payment

Get payment

get

Get dcm payments get with filter

Path parameters
counterparty_guidstringRequired

Counterparty GUID

Query parameters
guidsstringOptional

Payment GUIDs

asset_issuersstringOptional

Payment asset issuers ids

asset_codesstringOptional

Payment asset codes ids

sender_idsstringOptional

Payment sender ids

receiver_idsstringOptional

Payment receiver ids

statusesstringOptional

Payment statuses

created_at_minstringOptional

created at min

created_at_maxstringOptional

created at max

updated_at_minstringOptional

updated at min

updated_at_maxstringOptional

updated at max

orderstringOptional

sorting order

offsetintegerOptional

offset

limitintegerOptional

limit

Responses
200
OK
application/json
get
GET /api/v1/counterparty/{counterparty_guid}/payments HTTP/1.1
Host: dev-dcm-api.armenotech.dev
Accept: */*
{
  "amount": 1,
  "assetCode": "text",
  "assetIssuer": "text",
  "createdAt": "text",
  "deletedAt": {
    "time": "text",
    "valid": true
  },
  "guid": "text",
  "receiverId": "text",
  "senderId": "text",
  "status": "CREATED",
  "updatedAt": "text"
}

Update payment

Update payment

put

Update payment

Path parameters
counterparty_guidstringRequired

Counterparty GUID

Body
guidstringOptional
Responses
200
OK
application/json
Responseobject
put
PUT /api/v1/counterparty/{counterparty_guid}/payments HTTP/1.1
Host: dev-dcm-api.armenotech.dev
Content-Type: application/json
Accept: */*
Content-Length: 265

{
  "amount": {
    "valid": true,
    "value": 1
  },
  "asset_code": {
    "valid": true,
    "value": "text"
  },
  "asset_issuer": {
    "valid": true,
    "value": "text"
  },
  "guid": "text",
  "receiver_id": {
    "valid": true,
    "value": "text"
  },
  "sender_id": {
    "valid": true,
    "value": "text"
  },
  "status": {
    "valid": true,
    "value": "CREATED"
  }
}
{}

Create payment

To create payment note:

  • sender account should have balance before creating payment

  • sender and receiver should be under one counterparty.

Create payment

post

Create payment

Path parameters
counterparty_guidstringRequired

Counterparty GUID

Body
amountnumberOptional
asset_codestringOptional
asset_issuerstringOptional
guidstringOptional

GUID if guid is zero, generate new random guid if guid exist return error

receiver_idstringOptional
sender_idstringOptional
statusstring · enumOptionalPossible values:
Responses
200
OK
application/json
post
POST /api/v1/counterparty/{counterparty_guid}/payments HTTP/1.1
Host: dev-dcm-api.armenotech.dev
Content-Type: application/json
Accept: */*
Content-Length: 127

{
  "amount": 1,
  "asset_code": "text",
  "asset_issuer": "text",
  "guid": "text",
  "receiver_id": "text",
  "sender_id": "text",
  "status": "CREATED"
}
{
  "guid": "text"
}

Confirm payment

After creating payment you should confirm payment.

Before the confirmation be sure that payment should be already created, corresponding payment guid should be used in the request body.

Confirm Payment

post

Confirm dcm payment

Path parameters
counterparty_guidstringRequired

Counterparty GUID

Body
bank_guidstringOptional

Counterparty's GUID (receiver's bank). If it is not provided, the payment will be considered an internal transfer.

guidstringOptional

Payment's GUID

Responses
200
OK
application/json
Responseobject
post
POST /api/v1/counterparty/{counterparty_guid}/payments/confirm HTTP/1.1
Host: dev-dcm-api.armenotech.dev
Content-Type: application/json
Accept: */*
Content-Length: 34

{
  "bank_guid": "text",
  "guid": "text"
}
{}

Get payments list

If you want to get payments list you should make the following request.

Get payments list

get

Get dcm payments list with filter

Path parameters
counterparty_guidstringRequired

Counterparty GUID

Query parameters
guidsstringOptional

Payment GUIDs

asset_issuersstringOptional

Payment asset issuers ids

asset_codesstringOptional

Payment asset codes ids

sender_idsstringOptional

Payment sender ids

receiver_idsstringOptional

Payment receiver ids

statusesstringOptional

Payment statuses

created_at_minstringOptional

created at min

created_at_maxstringOptional

created at max

updated_at_minstringOptional

updated at min

updated_at_maxstringOptional

updated at max

orderstringOptional

sorting order

offsetintegerOptional

offset

limitintegerOptional

limit

Responses
200
OK
application/json
get
GET /api/v1/counterparty/{counterparty_guid}/payments/list HTTP/1.1
Host: dev-dcm-api.armenotech.dev
Accept: */*
[
  {
    "amount": 1,
    "assetCode": "text",
    "assetIssuer": "text",
    "createdAt": "text",
    "deletedAt": {
      "time": "text",
      "valid": true
    },
    "guid": "text",
    "receiverId": "text",
    "senderId": "text",
    "status": "CREATED",
    "updatedAt": "text"
  }
]

Last updated