ProviderService link
This service must be implemented by the provider.
All methods of this service must be idempotent, meaning they are safe to retry and multiple calls with the same parameters must not have additional effect.
Method Name | Request Type | Response Type | Description |
---|
PayOut | PayoutRequest | PayoutResponse | Network instructs the provider to execute a payout to the recipient. This method should be idempotent, meaning that multiple calls with the same parameters will have no additional effect. |
UpdatePayment | UpdatePaymentRequest | UpdatePaymentResponse | Network provides an update on the status of a payment. This can be either a success or a failure. This method should be idempotent, meaning that multiple calls with the same parameters will have no additional effect. |
CreatePayInDetails | CreatePayInDetailsRequest | CreatePayInDetailsResponse | Network asks the provider for possible pay-in options for a sender, in preparation for a pay-in process. This is optional, but if implemented, it should return a list of available pay-in methods. |
UpdateLimit | UpdateLimitRequest | UpdateLimitResponse | This rpc is used to notify the provider about the changes in credit limit and/or credit usage. |
AppendLedgerEntries | AppendLedgerEntriesRequest | AppendLedgerEntriesResponse | Network can send all the updates about ledger entries of the provider’s accounts. It can be used to keep track of the provider’s exposure to other participants and other important financial events. (see the list in the message below) |
Requests And Response Types link
AppendLedgerEntriesRequest link
Field | Type | Label | Description |
---|
transactions | AppendLedgerEntriesRequest.Transaction | repeated | This is a list of transactions that were appended to the ledger of the provider. The transaction_id should be used to identify the transaction and ensure that it is processed only once. |
AppendLedgerEntriesRequest.LedgerEntry link
Field | Type | Label | Description |
---|
account_owner_id | uint32 | | 1 is network account, others are ids of participants |
account_type | AppendLedgerEntriesRequest.AccountType | | account_type is the type of the account that the entry belongs to. It is used to categorize the entries and understand the nature of the financial event. |
currency | string | | It is the currency of the entry. If the transaction contains entries with multiple currencies, the exchange_rate field should be provided to be used to convert the amounts to USD. |
debit | tzero.v1.common.Decimal | | debit is the amount that was debited from the account. If the entry is a credit, this field should be 0. |
credit | tzero.v1.common.Decimal | | credit is the amount that was credited to the account. If the entry is a debit, this field should be 0. |
exchange_rate | tzero.v1.common.Decimal | | exchange_rate is the exchange rate of the currency to USD if the currency is not USD and the transaction contains entries with multiple currencies. Exchange rate for the base currency USD and the quote currency provided in the entry. |
AppendLedgerEntriesRequest.Transaction link
AppendLedgerEntriesRequest.Transaction.FeeSettlement link
Field | Type | Label | Description |
---|
fee_settlement_id | uint64 | | |
AppendLedgerEntriesRequest.Transaction.PayIn link
Field | Type | Label | Description |
---|
payment_id | uint64 | | |
AppendLedgerEntriesRequest.Transaction.Payout link
Field | Type | Label | Description |
---|
payment_id | uint64 | | |
AppendLedgerEntriesRequest.Transaction.PayoutReservation link
Field | Type | Label | Description |
---|
payment_id | uint64 | | |
AppendLedgerEntriesRequest.Transaction.PayoutReservationRelease link
Field | Type | Label | Description |
---|
payment_id | uint64 | | |
AppendLedgerEntriesRequest.Transaction.ProviderSettlement link
Field | Type | Label | Description |
---|
settlement_id | uint64 | | |
AppendLedgerEntriesResponse link
This message has no fields defined.
CreatePayInDetailsRequest link
Field | Type | Label | Description |
---|
payment_intent_id | string | | payment_intent_id is a unique identifier for the payment intent, which is used to create a payment later. |
sender | CreatePayInDetailsRequest.Sender | | Sender details for the pay-in process. |
CreatePayInDetailsRequest.Sender link
CreatePayInDetailsRequest.Sender.PrivatePerson link
Field | Type | Label | Description |
---|
private_person_id | string | | can be used to get KYC data |
CreatePayInDetailsResponse link
Field | Type | Label | Description |
---|
pay_in_method | tzero.v1.common.PaymentMethod | repeated | List of available pay-in methods for the sender. This is used to present the user with options for how they can pay in. |
PayoutRequest link
Field | Type | Label | Description |
---|
payment_id | int64 | | payment id assigned by the network (provider should store this id to provide details in UpdatePayout later) |
payout_id | int64 | | payout id assigned by the network (provider should store this id to provide details in UpdatePayout later) |
currency | string | | currency of the payout (participant could support multiple currencies) This is the currency in which the payout should be made. |
client_quote_id | string | | client quote id of the quote used for this payout (the provider provides the quote IDs in the UpdateQuote rpc) This is the identifier of the quote that was used to calculate the payout amount. |
amount | tzero.v1.common.Decimal | | amount in currency of the payout This is the amount that should be paid out to the recipient. |
payout_method | tzero.v1.common.PaymentMethod | | payout_method is the payment method for the payout, e.g. bank transfer, crypto transfer, etc. This is used to specify how the payout should be made. |
PayoutResponse link
This message has no fields defined.
UpdateLimitRequest link
All the amounts are in USD
Field | Type | Label | Description |
---|
limits | UpdateLimitRequest.Limit | repeated | can contain one or more Limit messages, each representing a credit limit for a specific counterparty provider. |
UpdateLimitRequest.Limit link
Field | Type | Label | Description |
---|
version | int64 | | Incrementally growing for the provider - same as in Ledger. |
creditor_id | int32 | | the Id of the counterparty (creditor) provider, e.g. the provider that is providing the credit limit. It’s usually the payOut provider, which provides the credit line to the payIn provider. |
payout_limit | tzero.v1.common.Decimal | | payout_limit = credit_limit - credit_usage, negative value means credit limit is exceeded, e.g. if counterparty decreased credit limit |
credit_limit | tzero.v1.common.Decimal | | This is the credit limit that the counterparty is willing to extend to the provider. |
credit_usage | tzero.v1.common.Decimal | | This is the credit usage that the provider has used so far. It is the sum of all payouts made by the provider minus the settlement net (settlement balance). It could be negative if the provider has received more in settlements than maid payouts (pre-settlement). |
UpdateLimitResponse link
Empty message - means no response is needed.
This message has no fields defined.
UpdatePaymentRequest link
Field | Type | Label | Description |
---|
payment_id | uint64 | | payment_id is a payment id in the T-0 network. |
payment_client_id | string | | payment_client_id is a payment id assigned by the client, this is the same id that was provided in the CreatePaymentRequest. |
success | UpdatePaymentRequest.Success | | Success response - means the payout was executed successfully and the payment is now complete. This happens when the payout is successfully processed by the payout provider, and the payment was made to the recipient. |
failure | UpdatePaymentRequest.Failure | | Failure response - means the payout was not executed successfully, e.g. the payout provider could not process the payout. |
UpdatePaymentRequest.Failure link
This message has no fields defined.
UpdatePaymentRequest.Success link
UpdatePaymentResponse link
This message has no fields defined.
AppendLedgerEntriesRequest.AccountType link
Name | Number | Description |
---|
ACCOUNT_TYPE_UNSPECIFIED | 0 | |
ACCOUNT_TYPE_USER_PAYABLE | 1 | Reflects the user’s payable balance, the amount that the provider owes to the user. |
ACCOUNT_TYPE_CASH | 2 | Reflects the cash balance of the provider. |
ACCOUNT_TYPE_RESERVE | 3 | This is the reserve account of the provider, which reflects the reserve of balance to reduce the limit available from one provider to another. |
ACCOUNT_TYPE_RESERVE_USAGE | 4 | This is the mirror account for the reserve. To keep the double entry accounting principle. |
ACCOUNT_TYPE_PROVIDER_PAYABLE | 5 | Reflects how much the provider owes to the network or other participants. |
ACCOUNT_TYPE_PROVIDER_RECEIVABLE | 6 | Reflects how much the provider is owed by the network or other participants. |
ACCOUNT_TYPE_FEE_PAYABLE | 7 | Reflects the fees that the provider owes to the network. |
ACCOUNT_TYPE_FEE_RECEIVABLE | 8 | Reflects the fees that the network is owed by the provider. |
ACCOUNT_TYPE_FEE_EXPENSE | 9 | Reflects the fees that the provider has to pay for the services provided by the network. |
ACCOUNT_TYPE_PROVIDER_SETTLEMENT | 10 | Reflects the settlement balance of the provider with the network or other participants. |
UpdatePaymentRequest.Failure.Reason link
Name | Number | Description |
---|
REASON_UNSPECIFIED | 0 | |
Scalar Value Types link
.proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
---|
double | | double | double | float | float64 | double | float | Float |
float | | float | float | float | float32 | float | float | Float |
int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass |
string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |