Transfer
API provides the following ways to work with payments:
As a best practice please rely on the following transfer routes inside 1 Counterparty:
from identification to processing entity;
from bank processing entity to customer;
from customer to customer;
from processing to identification entity;
from customer to bank processing entity.
For external transfers (2 counterparties) the following transfer types are advised:
from your processing entity to a processing entity of another Counterparty;
from your customer counterparty to a customer of another Counterparty.
Get transfer information
Get payments with filter
Counterparty GUID
Payment GUID
Include stellar info
GET /api/v1/counterparty/{counterparty_guid}/payments/{payment_guid} HTTP/1.1
Host: your_host
Accept: */*
{
"amount": 1,
"asset_code": "text",
"asset_issuer": "text",
"category": "text",
"category_guid": "text",
"created_at": "text",
"deleted_at": "text",
"fee": 1,
"guid": "text",
"purpose": "text",
"receiver_account_account_kind": "text",
"receiver_counterparty": "text",
"receiver_id": "text",
"sender_account_account_kind": "text",
"sender_counterparty": "text",
"sender_id": "text",
"status": "CREATED",
"stellar_info": {
"hash": "text"
},
"target_balance": 1,
"updated_at": "text"
}
Using the parameter hash
you can see this operation in Stellar.Expert.
Create transfer
The transfer is done with 2 steps: first, you need to create a draft record with "Create payment". When it is done a confirmation is required.
Create payment
Create payment
Counterparty GUID
amount of tokens to transfer
asset code
address in Stellar that issues tokens
payment category
IBAN of receiver account
guid of receiver account
IBAN of sender account
guid of sender account
account balance after operation
POST /api/v1/counterparty/{counterparty_guid}/payments HTTP/1.1
Host: your_host
Content-Type: application/json
Accept: */*
Content-Length: 197
{
"amount": 1,
"asset_code": "text",
"asset_issuer": "text",
"category_guid": "text",
"purpose": "text",
"receiver_iban": "text",
"receiver_id": "text",
"sender_iban": "text",
"sender_id": "text",
"target_balance": 1
}
{
"guid": "text"
}
Confirm transfer
After creating a transfer you should confirm the transfer.
Before the confirmation be sure that the transfer is already created, the corresponding transfer guid should be used in the request body.
bank_guid
is mandatory only for a transfer to another counterparty.
Confirm 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: your_host
Content-Type: application/json
Accept: */*
Content-Length: 34
{
"bank_guid": "text",
"guid": "text"
}
{}
Get transfers list
If you want to get payment list you should make the following request.
Get payments list with filter
Counterparty GUID
Receiver counterparty GUID
Sender counterparty GUID
Payment GUIDs
Payment sender ids
Payment receiver ids
External transaction id
Minimal amount
Maximum amount
Payment statuses
Asset issuers
Asset codes
ISO date
ISO date
ISO date
ISO date
Category's guid
sorting order
offset
limit
GET /api/v1/counterparty/{counterparty_guid}/payments HTTP/1.1
Host: your_host
Accept: */*
{
"payments": [
{
"amount": 1,
"asset_code": "text",
"asset_issuer": "text",
"category": "text",
"category_guid": "text",
"created_at": "text",
"deleted_at": "text",
"fee": 1,
"guid": "text",
"purpose": "text",
"receiver_account_account_kind": "text",
"receiver_counterparty": "text",
"receiver_id": "text",
"sender_account_account_kind": "text",
"sender_counterparty": "text",
"sender_id": "text",
"status": "CREATED",
"stellar_info": {
"hash": "text"
},
"target_balance": 1,
"updated_at": "text"
}
],
"total": 1
}
Last updated