PurchaseNotify
Server-to-Server Payment Notification
Warning: This method is used only for the Purchase method (Purchase).
Use this callback to confirm a successful payment on your server.
Quick flow:
- Customer completes payment.
- myPOS sends
PurchaseNotifyto yourURL_Notifyendpoint. - Your server validates the data and returns
HTTP 200 OK. - myPOS then redirects the customer to
URL_OKusingPurchaseOK.
Purpose
myPOS Checkout API sends this method to notify the merchant about a successful payment and provide all payment parameters to URL_Notify. After your server responds successfully, myPOS Checkout redirects the customer browser to URL_OK and sends the same parameters with IPCPurchaseOK.
Do not use IPCPurchaseOK to authorize a payment because it is not a server-to-server connection and it is not always guaranteed to receive a response. In this case, you should use IPCPurchaseNotify.
Method Properties
| Property | Typical value | Type | Description |
|---|---|---|---|
| Amount | 23.45 | Double | Conditional. Echo from IPCPurchase. |
| Currency | EUR | A(3) | Echo from IPCPurchase. |
| OrderID | 201203319999999 | String | Echo from IPCPurchase. |
| IPC_Trnref | 12345678923 | String | Used to uniquely identify a transaction in IPC. Used as a parameter for a subsequent refund or reversal if needed. |
| RequestDateTime | 2012-03-31 23:59:59 | DateTime | Date/time of the request |
| RequestSTAN | 123456 | N(6) | Consequent number from 1 to 999999. Used for request unique match. |
| CardToken | Byte[] | BASE64 | Conditional. Returned when the card is stored (depending on CardTokenRequest). |
| PAN | 4885 | N(4) | Conditional. Last four digits of the account number (PAN). |
| ExpDate | 1703 | N(4) | Conditional. Card expiry date. |
| CardType | 1 | N(1) | Conditional. Card type. |
| CustomerEmail | name@website.com | String | Conditional. When PaymentParametersRequired = 1; 2 |
| CustomerPhone | +23568956958 | String | Conditional. When PaymentParametersRequired = 1; 2 |
| CustomerFirstNames | John Santamaria | String | Conditional. When PaymentParametersRequired = 1; 2 |
| CustomerFamilyName | Smith | String | Conditional. When PaymentParametersRequired = 1; 2 |
| BillingDescriptor | MYPOS *BillingDescriptor | String | Identifying text that appears on a customer's credit or debit card statement. |
| Signature | Byte[] | BASE64 | SHA-256 HASH for all properties in the command. Signature is ALWAYS THE LAST PARAMETER IN THE POST. |
Response
When your server receives this request, return the following:
- Status code:
HTTP 200 OK - Response body: plain-text string
OK - Content-Type:
text/plain(recommended)
Any non-200 response is treated as a communication or system error.
Example response:
HTTP/1.1 200 OK
Content-Type: text/plain
OK
Do not rely on IPCPurchaseOK for payment authorization. Always validate and authorize based on the server-to-server IPCPurchaseNotify request.
Example HTTP POST
POST /somescript.php HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/4.0
Content-Length: 39
Content-Type: application/x-www-form-urlencoded
userid=joe&password=guessme&user_type=1
Example Result POST Data
{
"IPCmethod": "IPCPurchaseNotify",
"SID": "000000000000010",
"Amount": "50",
"Currency": "EUR",
"OrderID": "1440146333",
"IPC_Trnref": "813705",
"RequestSTAN": "000006",
"RequestDateTime": "2015-08-21 10:39:37",
"Signature": "Pn96fYghN/hdLgP0oGbCgl6..."
}