NetworkService

This service is used by provider to interact with the Network, e.g. push quotes and initiate payments.

All methods of this service are idempotent, meaning they are safe to retry and multiple calls with the same parameters will have no additional effect.

Method NameRequest TypeResponse TypeDescription
UpdateQuoteUpdateQuoteRequestUpdateQuoteResponseUsed by the provider to publish pay-in and pay-out quotes (FX rates) into the network. These quotes include tiered pricing bands and an expiration timestamp. This method is idempotent, meaning that multiple calls with the same parameters will have no additional effect.
GetPayoutQuoteGetPayoutQuoteRequestGetPayoutQuoteResponseRequest the best available quote for a payout in a specific currency, for a given amount. If the payout quote exists, but the credit limit is exceeded, this quote will not be considered.
CreatePaymentCreatePaymentRequestCreatePaymentResponseSubmit a request to create a new payment. PayIn currency and QuoteId are the optional parameters. If the payIn currency is not specified, the network will use USD as the default payIn currency, and considering the amount in USD. If specified, it must be a valid currency code - in this case the network will try to find the payIn quote for the specified currency and considering the band from the provider initiated this request. So this is only possible, if this provider already submitted the payIn quote for the specified currency using UpdateQuote rpc. If the quoteID is specified, it must be a valid quoteId that was previously returned by the GetPayoutQuote method. If the quoteId is not specified, the network will try to find a suitable quote for the payout currency and amount, same way as GetPayoutQuote rpc. This method is idempotent, meaning that multiple calls with the same parameters will have no additional effect.
UpdatePayoutUpdatePayoutRequestUpdatePayoutResponseInform the network that a payout has been completed or failed. This endpoint is called by the payout provider, specifying the payment ID and payout ID, which was provided when the payout request was made to this provider. This method is idempotent, meaning that multiple calls with the same parameters will have no additional effect.
CreatePayInCreatePayInRequestCreatePayInResponseInform the network that the provider has received a pay-in from the user. This method is idempotent, meaning that multiple calls with the same parameters will have no additional effect.
GetKycDataGetKycDataRequestGetKycDataResponseRetrieve KYC verification data (e.g., SumSub token) for a person involved in the payment.

Requests And Response Types

CreatePayInRequest

FieldTypeLabelDescription
payment_idstring
amounttzero.v1.common.Decimal

CreatePayInResponse

This message has no fields defined.

CreatePaymentRequest

FieldTypeLabelDescription
payment_client_idstringunique client generated id for this payment
payout_currencystringISO 4217 currency code, e.g. EUR, GBP, etc. in which the payout should be made
amounttzero.v1.common.Decimalamount in the payin currency, by default USD (if the payIn currency is not specified)
payin_currencystringoptionalif not specified, USD is used for calculations
senderCreatePaymentRequest.Sender
recipientCreatePaymentRequest.Recipient
quote_idQuoteIdoptionalif specified, must be a valid quoteId that was previously returned by the GetPayoutQuote method

CreatePaymentRequest.PrivatePerson

Work in progress

FieldTypeLabelDescription
private_person_client_idstring
first_namestring
last_namestring

CreatePaymentRequest.Recipient

Work in progress

FieldTypeLabelDescription
private_personCreatePaymentRequest.PrivatePerson

CreatePaymentRequest.Sender

Work in progress

FieldTypeLabelDescription
private_personCreatePaymentRequest.PrivatePerson

CreatePaymentResponse

FieldTypeLabelDescription
payment_client_idstringclient generated id supplied in the request
successCreatePaymentResponse.SuccessSuccess response - means the payment was accepted, but the payout is not yet completed. This means, the network found a suitable quote for the payout currency and amount, and instructed the payout provider to process the payout.
failureCreatePaymentResponse.FailureFailure response - means the payment was not accepted, e.g. the network could not find a suitable quote for the payout currency and amount, or the credit limit is exceeded for the available quotes.

CreatePaymentResponse.Failure

This message has no fields defined.

CreatePaymentResponse.Success

FieldTypeLabelDescription
payment_idint64payment id assigned by the network

GetKycDataRequest

FieldTypeLabelDescription
person_idstring

GetKycDataResponse

FieldTypeLabelDescription
sumsub_kyc_tokenstring

GetPayoutQuoteRequest

FieldTypeLabelDescription
payout_currencystringISO 4217 currency code, e.g. EUR, GBP, etc. in which the payout should be made
amounttzero.v1.common.Decimalamount in quote currency, only USD is supported
quote_typeQuoteTypetype of the quote, e.g. real-time or guaranteed

GetPayoutQuoteResponse

FieldTypeLabelDescription
ratetzero.v1.common.Decimalrate in USD/currency, e.g. 1.2345 for 1 USD = 1.2345 EUR
expirationgoogle.protobuf.Timestampexpiration time of the quote
quote_idQuoteId

QuoteId

FieldTypeLabelDescription
quote_idint64unique identifier of the quote within the specified provider
provider_idint32provider id of the quote

UpdatePayoutRequest

FieldTypeLabelDescription
payment_idint64payment id assigned by the network, this is the same payment id that was provided in the PayoutRequest
payout_idint64payout id assigned by the payout provider, this is the same payout id that was provided in the PayoutRequest
successUpdatePayoutRequest.Successsuccess response with the details of the payout
failureUpdatePayoutRequest.Failurefailure response with the reason of the failure

UpdatePayoutRequest.Failure

This message has no fields defined.

UpdatePayoutRequest.Success

This message has no fields defined.

UpdatePayoutResponse

This message has no fields defined.

UpdateQuoteRequest

Base currency is always USD, so the quotes are always in USD/currency format.

FieldTypeLabelDescription
pay_outUpdateQuoteRequest.QuoterepeatedZero or more quotes for pay-out operations, each quote must have a unique currency, and one or more bands, with the unique client_quote_id for each band.
pay_inUpdateQuoteRequest.QuoterepeatedZero or more quotes for pay-in operations, each quote must have a unique currency, and one or more bands, with the unique client_quote_id for each band.

UpdateQuoteRequest.Quote

FieldTypeLabelDescription
currencystringBRL, EUR, GBP, etc. (ISO 4217 currency code)
quote_typeQuoteTypetype of the quote, e.g. real-time or guaranteed
bandsUpdateQuoteRequest.Quote.Bandrepeatedlist of bands for this quote
expirationgoogle.protobuf.Timestampexpiration time of the quote
timestampgoogle.protobuf.Timestamptimestamp quote was created

UpdateQuoteRequest.Quote.Band

FieldTypeLabelDescription
client_quote_idstringunique client generated id for this band
max_amounttzero.v1.common.Decimalmax amount of USD this quote is applicable for. Please look into documentation for valid amounts.
ratetzero.v1.common.DecimalUSD/currency rate

UpdateQuoteResponse

This message has no fields defined.

CreatePaymentResponse.Failure.Reason

NameNumberDescription
REASON_UNSPECIFIED0

QuoteType

NameNumberDescription
QUOTE_TYPE_UNSPECIFIED0
QUOTE_TYPE_REALTIME1real-time quote must be valid at least for 30 seconds (TBD)

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)