In-App Purchase
Integrated Payment Experience Inside Your Application
Purpose
The In-AppPurchase method is used to initiate a payment process directly within your own app or website—keeping the customer fully on your platform. All required payment details, including sensitive card information, are collected by your application and securely submitted to the myPOS Checkout API.
This method supports both initial payments with card details and recurring payments with a stored card token.
If you're handling card data directly (i.e., not using a stored token), your solution must be PCI DSS SAQ-D compliant. You’re also responsible for managing 3D Secure communication (e.g., via an MPI plugin).
Alternatively, you can store the card using IPCPurchase with CardTokenRequest = 1, and later use IPCIAPurchase with the CardToken.
Security Validations by myPOS The API will validate the following:
- Valid myPOS Client number (WalletNumber)
- Valid Store ID (SID)
- Checkout status is enabled
- Correct currency and amount
- Proper KeyIndex and signature
Request Parameters
| Parameter | Example | Type | Required | Description |
|---|---|---|---|---|
| OrderID | 20120331999999 | String | YES | Placeholder for the merchant. Used to recognize the order (max 80 characters). |
| Amount | 23.45 | Double | YES | The amount of payment requested. |
| Currency | EUR | A(3) | YES | ISO 3-character currency code. Must be registered and approved. |
| SID | 000000000000010 | String | YES | Store ID (SID) - Reference number for the Merchant Store in the myPOS system. |
| WalletNumber | 61938166610 | String | YES | myPOS Client Number. |
| KeyIndex | 1 | Int | YES | Indicates which key pair is being used. |
| CardType | 1 | N(1) | Conditional | Required when CardToken is not provided. See Card Types. |
| PAN | Byte[] (BASE64) | BASE64 | Conditional | Required when CardToken is not provided. |
| CardholderName | John Smith | String (30) | Conditional | Required when CardToken is not provided. |
| ExpDate | Byte[] (BASE64) | BASE64 | Conditional | Required when CardToken is not provided. |
| CVC | Byte[] (BASE64) | BASE64 | Conditional | Required when CardToken is not provided. |
| ECI | 6 | N(1) | Conditional | Required when CardToken is not provided. |
| AVV | Byte[] (BASE64) | BASE64 | Conditional | Required when CardToken is not provided and the card is 3DS enabled. |
| XID | Byte[] (BASE64) | BASE64 | Conditional | Required when CardToken is not provided and the card is 3DS enabled. |
| CardToken | Byte[] (BASE64) | BASE64 | Conditional | Required when the card is already stored and no additional card data is sent. |
| AccountSettlement | 11111111119 | N(11) | NO | Account for payment settlement. |
| Note | — | String | NO | Text associated with the purchase. |
| CartItems | 2 | Int | YES | Number of items in the cart. Add fees/taxes as new items. |
| Cart | Logical Holder | Logical Record | YES | Array describing the shopping cart content. |
| OutputFormat | XML | String | NO | Output format: “XML” or “JSON”. Defaults to “XML”. |
| PartnerID | mps-p-XXXXXXXX | String | Conditional | Required if you are part of the Partners Program (API version 1.4.1+). |
| ApplicationID | mps-app-XXXXXXXX | String | Conditional | Required if you are part of the Partners Program (API version 1.4.1+). |
Cart Item Parameters
| Property | Example | Type | Description |
|---|---|---|---|
| Article_1 | HP ProBook 6360b sticker | String | Name of an article in the shopping cart. |
| Quantity_1 | 2 | Int | How many pieces of an article. |
| Price_1 | 2.34 | Double | Price of a single unit. |
| Amount_1 | 4.68 | Double | Quantity × Price for the article. |
| Currency_1 | EUR | A(3) | Should be the same currency as in the purchase. |
Response Parameters
| Property | Example | Type | Description |
|---|---|---|---|
| Amount | 23.45 | Double | Echo from IPCIAPurchase |
| Currency | EUR | A(3) | Echo from IPCIAPurchase |
| OrderID | 201203319999999 | String | Echo from IPCIAPurchase |
| IPC_Trnref | 12345678923 | String | Unique transaction ID in IPC; used for refunds/reversals |
| PaymentReference | MTCOR0123456XXK7 | String | Payment Reference of the transaction |
Important Notes
- Use
IPCIAPurchasefor in-app or direct payments (initial or recurring). - You must be PCI SAQ-D compliant if handling card data.
- Use a stored token for easier compliance and less liability.
- Validate all response data and signatures for secure processing.
Partner Identification
If you are part of our Partners Program, you will need to submit these two additional parameters with each of your requests to the API. This will provide you with analytics about the usage in your myPOS Partners Portal account and help our support teams assist you better.
This requires you to set the API version of your requests to 1.4.1. No other changes in the code/requests are necessary.
| Property | Example | Type | Description |
|---|---|---|---|
PartnerID | mps-p-XXXXXXXX | String | Identical number for the partner |
ApplicationID | mps-app-XXXXXXXX | String | Identical number for the application |
Example Request
<ipc_response is-array="true">
<IPCmethod>IPCIAPurchase</IPCmethod>
<IPC_Trnref>131753</IPC_Trnref>
<PaymentReference>MTCOR0124565XXK7</PaymentReference>
<Amount>50</Amount>
<Currency>EUR</Currency>
<Status>0</Status>
<StatusMsg>Success</StatusMsg>
<Signature>K6E5HZd21zGWVB4aEBwVOp1XuQMwGZiVk57FFu3sSnkD/M0v30XHFYL3dh7yKifKeOICQIrmzi3XKgnhwPMb/TgeNCOafgZ4EW9I4faP0TTmM0QrvAoayZjb4PG/tIcMgFiUKBr+K/Cbqcw7yLkDEzavfWBy5IT4Hmv92CAPKo8=</Signature>
</ipc_response>