NetworkService

NetworkService is used by provider in order to notify network on payment intent updates

Method NameRequest TypeResponse TypeDescription
ConfirmPaymentConfirmPaymentRequestConfirmPaymentResponseNotify network about a successful payment for the corresponding payment intent
RejectPaymentIntentRejectPaymentIntentRequestRejectPaymentIntentResponseNotify network about a payment failure for the corresponding payment intent
ConfirmSettlementConfirmSettlementRequestConfirmSettlementResponseNotify network about relation between payment intent and settlement transaction. This method is not essential but helps to keep track of payment flow

ProviderService

ProviderService is implemented by provider to provide pay-in details fpr payment intents

Method NameRequest TypeResponse TypeDescription
CreatePaymentIntentCreatePaymentIntentRequestCreatePaymentIntentResponseNetwork instructs provider to create payment details for the payment intent. Provide should return a list of supported payment method along with URL where payer should be redirected.
ConfirmPayoutConfirmPayoutRequestConfirmPayoutResponseNetwork notifies provider about successful payout for the corresponding payment intent

Requests And Response Types

ConfirmPaymentRequest

FieldTypeLabelDescription
payment_intent_iduint64payment_intent_id from CreatePaymentIntentRequest
payment_methodtzero.v1.common.PaymentMethodType

ConfirmPaymentResponse

FieldTypeLabelDescription
settlement_amounttzero.v1.common.Decimalsettlement amount denominated in settlement currency
payout_provider_iduint32

ConfirmPayoutRequest

FieldTypeLabelDescription
payment_intent_iduint64payment_intent_id from CreatePaymentIntentRequest
payment_iduint64corresponding payment_id for this payment intent

ConfirmPayoutResponse

This message has no fields defined.

ConfirmSettlementRequest

FieldTypeLabelDescription
blockchaintzero.v1.common.Blockchain
tx_hashstring
payment_intent_iduint64repeatedlist of payment_intent_id’s for this settlement (on-chain) transaction

ConfirmSettlementResponse

This message has no fields defined.

CreatePaymentIntentRequest

FieldTypeLabelDescription
payment_intent_iduint64idempotency key
currencystringpay-in currency
amounttzero.v1.common.Decimalpay-in amount
merchant_iduint32

CreatePaymentIntentResponse

FieldTypeLabelDescription
payment_methodsCreatePaymentIntentResponse.PaymentMethodrepeated

CreatePaymentIntentResponse.PaymentMethod

FieldTypeLabelDescription
payment_urlstring
payment_methodtzero.v1.common.PaymentMethodType

RejectPaymentIntentRequest

FieldTypeLabelDescription
payment_intent_iduint64payment_intent_id from CreatePaymentIntentRequest
reasonstring

RejectPaymentIntentResponse

This message has no fields defined.