PartnerCard Payment: Difference between revisions
Line 89: | Line 89: | ||
To prepare the payment the partner has to model a payment scenario. The easiest scenario is a simple immediate payment that can be configured as described on the [[Responsive_web_payment|Responsive Web Payment]] page. | To prepare the payment the partner has to model a payment scenario. The easiest scenario is a simple immediate payment that can be configured as described on the [[Responsive_web_payment|Responsive Web Payment]] page. | ||
Example preparation request | '''Example preparation request''' | ||
<pre> | <pre> | ||
Line 110: | Line 110: | ||
} | } | ||
</pre> | |||
'''Example reparation response''' | |||
<pre> | |||
{ | |||
"PaymentId": "9361c11b72f548b9a21537d23f34ce20", | |||
"PaymentRequestId": "PAYMENT--001", | |||
"Status": "Prepared", | |||
"QRUrl": "https://api.barion.com/qr/generate?paymentId=9361c11b72f548b9a21537d23f34ce20&size=Large", | |||
"Transactions": [ | |||
{ | |||
"POSTransactionId": "TRANSACTION--01", | |||
"TransactionId": "12084502b4474188abec644207b9fa2e", | |||
"Status": "Prepared", | |||
"Currency": "HUF", | |||
"TransactionTime": "2017-06-02T08:33:48.118", | |||
"RelatedId": null | |||
} | |||
], | |||
"RecurrenceResult": "None", | |||
"GatewayUrl": "https://secure.barion.com/Pay?Id=9361c11b72f548b9a21537d23f34ce20", | |||
"RedirectUrl": null, | |||
"CallbackUrl": null, | |||
"Errors": [] | |||
} | |||
</pre> | </pre> |
Revision as of 09:13, 2 June 2017
Partner Card Payment
With partner card payment a Barion partner can issue a plastic card that can be used to topup a Barion wallet or make a payment with it. For this the partner has to request a Barion API key. This API is only available for specific partners.
The feature contains three major areas:
- Card registration
- Topup with the card
- Payment with the card
Card registration process
The partner card registration contains three steps.
- Card preparation: The partner requests a new card secret from the Barion API. This is stored on the card and used for authentication later. One card number can only be registered once. At this point the card is not attached to any Barion wallet.
- Card issueing: The previously registered card can be issued. This means that the card will be attached to a Barion wallett.
- Card activation': The owner of the card must choose a PIN number that ensures another factor in the security protocol. This should be registered with the Barion API and must not be stored on the card itself.
Card preparation example
Request
{ "PartnerKey" : "f776efde-bd50-4755-a233-caa48cdf961f", "PAN": "4657 3726 1490" }
Response
{ "PrivateCardKey": "b9c8c4c3e660484ca166a32f0ba584cf", "Errors": [] }
Card issueing example
Request
{ "PartnerKey" : "f776efde-bd50-4755-a233-caa48cdf961f", "PrivateCardKey": "b9c8c4c3e660484ca166a32f0ba584cf", "OwnerLoginName": "[email protected]" }
Response
{ "PrivateCardKey": "b9c8c4c3e660484ca166a32f0ba584cf", "CardIssueWasSuccessful": true, "Errors": [] }
Card activation example
Request
{ "PartnerKey" : "f776efde-bd50-4755-a233-caa48cdf961f", "PrivateCardKey": "b9c8c4c3e660484ca166a32f0ba584cf", "CardPin": "1234" }
Response
{ "PrivateCardKey": "b9c8c4c3e660484ca166a32f0ba584cf", "CardActivationWasSuccessful": true, "Errors": [] }
Related API endpoints
TopUp process
TODO
Payment process
The partner card payment uses the Barion PaymentGateway to prepare the payment. This means that the payment should first be prepared and than fulfilled. At this moment only e-money payment is supported. This means that the total of the payment must be available in the wallet of the payer.
Preparing the payment
To prepare the payment the partner has to model a payment scenario. The easiest scenario is a simple immediate payment that can be configured as described on the Responsive Web Payment page.
Example preparation request
{ "POSKey": "ab9ebdba-e1bf-46a6-bf3c-4a3a38b95044", "PaymentType": "Immediate", "PaymentRequestId": "PAYMENT--001", "FundingSources": ["All"], "OrderNumber": "Order_01", "Currency": "HUF", "Transactions": [ { "POSTransactionId": "TRANSACTION--01", "Payee": "[email protected]", "Total": 150000, "Comment": "Shipment 002", "Items": [ ] } ] }
Example reparation response
{ "PaymentId": "9361c11b72f548b9a21537d23f34ce20", "PaymentRequestId": "PAYMENT--001", "Status": "Prepared", "QRUrl": "https://api.barion.com/qr/generate?paymentId=9361c11b72f548b9a21537d23f34ce20&size=Large", "Transactions": [ { "POSTransactionId": "TRANSACTION--01", "TransactionId": "12084502b4474188abec644207b9fa2e", "Status": "Prepared", "Currency": "HUF", "TransactionTime": "2017-06-02T08:33:48.118", "RelatedId": null } ], "RecurrenceResult": "None", "GatewayUrl": "https://secure.barion.com/Pay?Id=9361c11b72f548b9a21537d23f34ce20", "RedirectUrl": null, "CallbackUrl": null, "Errors": [] }