v1

latestOpenAPI 3.1.02026-07-24260142.2 KB

Create a charge

Sandbox (Testing): https://global-api.sand.au.edge.zip.co/merchant/charges

Once the Zip checkout flow has redirected the customer to your previously defined "redirect_uri," that page should consume the the state of the checkout to determine if it has been approved or declined. If the checkout has been approved, this page should then proceed to charge the customer.

post/charges

Headers

Authorizationstring required

Bearer {{API key}}

Idempotency-Keystring required

[RandomString]

Zip-Versionstring date required

2021-08-25

Request body

authorityobject required

Order shipping address object.

referencestring required

Unique payment reference for this charge.

amountnumber double required

Amount of this charge. This is the amount that will be transferred (if capture=true) from customer to merchant account or ring-fenced if capture=false.

currencystring required

Transaction currency. Accepted values are AUD, NZD, and USD

captureboolean

Defaults to true. Capture=true will immediately transfer funds to merchant account and deduct the funds from customers account. Capture=False will authorize only and will ring-fence funds to be transferred on a call to /capture.

Response

200

amountinteger
captured_amountinteger
created_datestring
currencystring
idstring
productstring
receipt_numberinteger
refunded_amountinteger
statestring

Example response

{
  "amount": 100,
  "created_date": "2023-06-23T17:25:49.215Z",
  "currency": "USD",
  "id": "us-5b1c9ff7-8972-4cef-b016-eb6675ee1066",
  "product": "partPay",
  "receipt_number": 230623652526,
  "state": "approved",
  "customer": {
    "first_name": "Dale",
    "last_name": "Jones",
    "email": "firstname.lastname@zip.co"
  }
}