6. Payment
Working with payments yoy have the following features:
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 dcm payments get with filter
Counterparty GUID
Payment GUIDs
Payment asset issuers ids
Payment asset codes ids
Payment sender ids
Payment receiver ids
Payment statuses
created at min
created at max
updated at min
updated at max
sorting order
offset
limit
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
Counterparty GUID
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
Counterparty GUID
GUID if guid is zero, generate new random guid if guid exist return error
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 dcm payment
Counterparty GUID
Counterparty's GUID (receiver's bank). If it is not provided, the payment will be considered an internal transfer.
Payment's GUID
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 dcm payments list with filter
Counterparty GUID
Payment GUIDs
Payment asset issuers ids
Payment asset codes ids
Payment sender ids
Payment receiver ids
Payment statuses
created at min
created at max
updated at min
updated at max
sorting order
offset
limit
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