Flow¶
Flow is initiated by Merchant.
Merchant¶
The payment process from the Merchant’s point of view:
Merchant generates a random session_id.
Merchant subscribes to the topic acks/{session_id}.
Merchant create a
MerchantOrderRequestMessage
and publishes on topic merchant_order_request/{application_id}.crypto_currency
field should be empty if customer wants to pay with Manta.Merchant receives an
AckMessage
with status == “new” on topic acks/{session_id}.Merchant can create QR code/NDEF Message with URL data
Merchant will receive an
AckMessage
messages as payment changes state. With status == “paid” the transaction is completed.Merchant unsubscribes from the topic acks/{session_id}.
Payment Processor¶
The payment process from the Payment Processor’s side:
When it starts:
- it subscribes to merchant_order_request/{application_id} and merchant_order_cancel/{session_id} topics;
- it publishes the Manta CA certificate to certificate topic, with retention.
On message
MerchantOrderRequestMessage
on a specific merchant_order_request/{application_id} topic:- generates an
AckMessage
with status == “new”. Theurl
field is in manta format if fieldcrypto_currency
is null (manta protocol), otherwiseurl
format will depend on thecrypto_currency
; - publishes this the
AckMessage
on the acks/{session_id} topic;
If manta protocol is used:
- It subscribes to payments/{session_id} and payment_requests/{session_id}/{crypto_currency} topics.
- generates an
On an event on payment_requests/{session_id}/{crypto_currency} without any payload:
- creates a new
PaymentRequestMessage
and publishes it on payment_requests/{session_id} wrapped into aPaymentRequestEnvelope
with retention.
{crypto_currency}
parameter can be “all” to request multiple cryptos.Destination should be specific to
{crypto_currency}
field.- creates a new
On message (a)
PaymentMessage
on payments/{session_id} it starts monitoring blockchain and on progress publishes (b)AckMessage
on acks/{session_id}.
Manta enabled wallet¶
The payment process from the Wallet point of view:
After receiving a Manta URL via QR code or NFC it subscribes to payment_requests/{session_id}.
Publishes on payment_requests/{session_id}/{crypto_currency}.
{crypto_currency}
can be “all” to request multiple cryptos.On
PaymentRequestMessage
on topic payment_requests/{session_id} ifdestinations
field does not contain desired crypto, check supported_cryptos and eventually go back to 2).Verifies
PaymentRequestMessage
signature.After payment on blockchain publishes a
PaymentMessage
on payments/{session_id} topic.Subscribes to the topic named acks/{session_id}
Wallet will receive an
AckMessage
messages as payment changes state. With status == “paid” the transaction is completed.