POST api/pos/payment/prepare
The prepared payment flow makes the payment accessible to the customer on creation, pending an amount using a POST method.
Only when the payment is readied will the customer be able to make the approval.
As an example, this flow could be used to start a payment before the payment amount is known.This could for instance be because goods are still being scanned at a cash register or to support loyalty flows.
When using this payment flow, you will always need to call the api pos/payment/ready after preparing a payment.
A payment will only be prepare if there is no any active payment on the Pos
Request Information
URI Parameters
None.
Body Parameters
Prepare payment query parameters
QueriesPaymentPrepare| Name | Description | Type | Additional information |
|---|---|---|---|
| orderId |
Required: The orderId |
string |
None. |
| terminalId |
Required: The terminalId |
string |
None. |
| accessToken | string |
None. |
|
| bioCode | string |
None. |
Request Formats
application/xml, text/xml
<QueriesPaymentPrepare xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/_1SA_MobilePay_POS.Models"> <accessToken xmlns="http://schemas.datacontract.org/2004/07/_1SA_MobilePay_POS_ViewModels">sample string 3</accessToken> <bioCode xmlns="http://schemas.datacontract.org/2004/07/_1SA_MobilePay_POS_ViewModels">sample string 4</bioCode> <orderId>sample string 1</orderId> <terminalId>sample string 2</terminalId> </QueriesPaymentPrepare>
application/json, text/json
{
"orderId": "sample string 1",
"terminalId": "sample string 2",
"accessToken": "sample string 3",
"bioCode": "sample string 4"
}
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
paymentId if success is true, otherwise errors . You can use the paymentId to call payment ready (api/pos/payment/ready)
PaymentStartViewModel| Name | Description | Type | Additional information |
|---|---|---|---|
| paymentId | string |
None. |
|
| success | boolean |
None. |
|
| errors | Collection of string |
None. |
Response Formats
application/xml, text/xml
<PaymentStartViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/_1SA_MobilePay_POS_ViewModels.ViewModels">
<errors xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>sample string 1</d2p1:string>
<d2p1:string>sample string 2</d2p1:string>
</errors>
<success>true</success>
<paymentId>sample string 1</paymentId>
</PaymentStartViewModel>
application/json, text/json
{
"paymentId": "sample string 1",
"success": true,
"errors": [
"sample string 1",
"sample string 2"
]
}