開発者
Developers
An API built with craft.
Predictable REST resources, readable errors, idempotency and webhooks. Your first test payment takes minutes.
開
// create a payment
const payment = await zw.payments.create({
amount: 14900,
currency: 'nzd',
methods: ['card', 'pay_by_bank'],
});
// → status: 'succeeded'
開Quick start
Your first payment in a few lines.
Amounts are in cents. Test keys start with sk_test_ and live keys start with sk_live_.
import Paymark Click from '@Paymark Click/node';
const zw = new Paymark Click(process.env.PAYMARK CLICK_SECRET_KEY);
const payment = await zw.payments.create({
amount: 14900, // in cents
currency: 'nzd',
methods: ['card', 'pay_by_bank', 'afterpay'],
description: 'Order #1042',
return_url: 'https://shop.example.co.nz/thanks',
});
# Create a payment
curl https://api.zelaway.com/v1/payments \
-u sk_test_...: \
-H "Idempotency-Key: 7f3c-..." \
-d amount=14900 \
-d currency=nzd \
-d "methods[]=card" \
-d "methods[]=pay_by_bank" \
-d description="Order #1042"
$zw = new \Paymark Click\Client(getenv('PAYMARK CLICK_SECRET_KEY'));
$payment = $zw->payments->create([
'amount' => 14900,
'currency' => 'nzd',
'methods' => ['card', 'pay_by_bank'],
]);
header('Location: ' . $payment->checkout_url);
import Paymark Click
zw = Paymark Click.Client(os.environ["PAYMARK CLICK_SECRET_KEY"])
payment = zw.payments.create(
amount=14900,
currency="nzd",
methods=["card", "pay_by_bank"],
)
表Resources
Core API resources
| Endpoint | Description | Methods |
|---|---|---|
| /v1/payments | Create and retrieve payments | GET, POST |
| /v1/refunds | Full and partial refunds | GET, POST |
| /v1/customers | Customers and saved payment methods | GET, POST, PATCH |
| /v1/bank_consents | Pay-by-bank and direct debit consents | GET, POST, PATCH |
| /v1/subscriptions | Recurring billing | GET, POST, PATCH, DELETE |
| /v1/payment_links | Payment links | GET, POST |
| /v1/payouts | Payouts to your bank account | GET |
| /v1/webhooks | Webhook endpoints | GET, POST, DELETE |
具Tooling
Everything you need to ship.
一
Sandbox
Test cards, pay-by-bank flows, direct debits and BNPL.
二
SDKs
Official libraries for Node.js, PHP, Python and Java.
三
Webhooks
HMAC-signed events with automatic retries.
四
Request logs
See every API request and response.
六
Restricted keys
API keys limited to specific resources.
始Begin
Start building today.
Create a sandbox account and get your test API keys straight away.