Sandbox
In-Store API
Give your shoppers the option to pay with Zip in-store with our point-of-sale API.
This page will guide you through setting up your Zip account to begin your integration with the In-Store REST API.
Upon completion, you will be ready to begin your development.
Request a test account
You can request a Zip test merchant account by reaching out to our team at [email protected]
A Zip test account will provide you with sandbox API credentials, allowing you to begin interacting with the in-store API.
Test connectivity
To verify that your account is working correctly, let's make a test purchase request for $10 AUD.
- Encode your API key
EncodedKey = base64_encode(API_KEY + “:”);
- In the code below, replace YOUR_ENCODED_API_KEY with your base 64 encoded sandbox API key
- AND, replace TEST_STORE_LOCATION_ID with your sandbox location ID provided by Zip
- Copy the resulting code into your command line, and run the command.
curl -X POST \
https://merchantapi.sandbox.zipmoney.com.au/v1/purchaserequests \
-H 'Authorization: Basic YOUR_ENCODED_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"refCode": "your_transaction_reference",
"payAmount": "10",
"payAmountAsDecimal": 1,
"originator": {
"staffActor": {
"refCode": "staff_no",
"name": "staff_name"
},
"locationId": TEST_STORE_LOCATION_ID,
"deviceRefCode": "11111"
},
"AccountIdentifier": {
"method": "token",
"value": "500057"
},
"capture": true
}'
If your account is set up correctly, you will receive a JSON response containing the below message:
{
"code": "AccountIdentifier_NoMatch",
"message": "The account identifier does not match any known account, please try again",
"items": null
}
This is as expected, as we have not yet included a valid Zip customer barcode!
Test as you go
To generate a valid customer barcode, start by creating some test customer accounts to aid you in development
Updated 3 months ago