Webhooks
Onerway pushes the final results of payments, tokenization, subscriptions, pre-authorizations, and refunds to your server through webhooks. This page describes the notification handling contract shared by every integration method; the Checkout, Web SDK, and Direct API integration guides only add the notification types and additional considerations for that integration method.
The delivery, verification, acknowledgement, and deduplication rules on this page apply to the notifications listed in Delivery. Profit share and reversal notifications use the x-signature header for verification; see the Profit share result webhook for their notification URLs and acknowledgement requirements.
Fraud alerts, Ethoca alerts, Ethoca enrollment status notifications, RDR enrollment status notifications, and chargeback alerts carry the x-signature, X-Rh-Signature, and x-timestamp headers. We recommend using x-signature for verification; X-Rh-Signature is retained for compatibility. Their notification URLs are configured separately, and their acknowledgement and deduplication rules are documented in each event's API Reference.
Configure Ethoca / RDR enrollment status notification URLs for Pre-disputes Enrollment (for resellers) under Developers → Webhooks in the merchant portal and acknowledge with the exact plain-text body 20000. See the Ethoca enrollment status webhook and RDR enrollment status webhook for the complete requirements.
Effective subscription cancellation is reported through the separate subscription cancellation webhook (notifyType=SUBSCRIPTION_CANCELED). Use its API Reference for fields, verification, and acknowledgement rather than the payment payloads listed in Delivery.
Source IP allowlist
Onerway sends all Payments webhooks from the following IP addresses. If your webhook endpoint restricts source IP addresses, allow all addresses for the corresponding environment in your firewall, WAF, or gateway.
| Environment | Webhook source IP addresses |
|---|---|
| Sandbox | 27.109.125.90 |
| Production | 20.68.8.12218.207.78.3752.70.96.954.160.200.15844.219.164.167 |
You must still verify signatures as required for each webhook type after allowing these IP addresses.
Delivery
Onerway sends notifications via HTTP POST to the notifyUrl submitted when the transaction was created. The payload for each scenario is documented separately:
| Webhook | Scenario |
|---|---|
| Payment result webhook | Ordinary payments that succeeded, failed, timed out, or were canceled |
| Saved payment method result webhook | Results of saving a payment method (tokenization, txnType=BIND_CARD) |
| Subscription payment webhook | Subscription payment events such as initial subscription, renewal, and change |
| Authorization, capture, and void webhook | Pre-authorization (txnType=AUTH), capture (txnType=CAPTURE), and void (txnType=VOID) results |
| Refund result webhook | Refund results (txnType=REFUND) |
| Refund request rejection webhook | A refund request rejected by Onerway (notifyType=REFUND_AUDIT) |
Refund notifications are sent to the original transaction’s notifyUrl. Onerway sends REFUND_AUDIT only when it rejects a refund request during review. A successful cancellation of a refund request does not trigger a notification; use the Create or cancel refund response.
Confirm payment results through Webhooks or query APIs. Do not treat a redirect to returnUrl or a client-side event as confirmation that a payment succeeded. For a refund request (refundType=0), respCode=20000 means that Onerway accepted the request; it does not mean that the refund succeeded.
Verify the signature
Verify the notifications in the table above using the signature header configured for your integration: X-Rh-Signature or x-signature. Both headers use the same format and signing rules. x-signature is also sent for transactions created through the original APIs. Do not rely on the sign field in the notification body. sign is computed with only the first enabled key and may differ from the signature you calculate using your configured SECRET during key rotation. See Request signing for the verification rules and the fields excluded from verification.
Acknowledge and retries
After processing, return HTTP 200 with Content-Type: text/plain and the notification's transactionId unchanged in the response body. Without a successful response, Onerway retries at 30-minute intervals, up to 3 times.
Automatic retries reuse the cached notification body and signatures. When a transaction notification is resent manually, Onerway signs it again using the webhook signing keys enabled at the time of the resend. See Automatic retries and manual resends.
Deduplicate
A single transaction may receive multiple notifications. Handle them idempotently by transactionId: process a repeated notification with the same transactionId only once, but still acknowledge it.
Tokenization, subscription-with-binding, and pre-authorization flows with a later capture or void produce several related notifications with different transactionId values. Handle each idempotently on its own and associate them with the same payment intent or subscription contract through business identifiers such as paymentId and contractId.
Interpret the status
statusis the result of the current operation, such asSfor success andFfor failure.paymentStatusis the payment intent state, such asAafter a successful pre-authorization,Safter a successful capture, andN(closed) after a successful void.
For pre-authorization, capture, and void results, use paymentId plus paymentStatus to determine whether the funds are held, captured, or released. Process a refund result using its refund transactionId and status. See the API Reference page of each webhook for the corresponding fields and values.
Handle differences between query results and Webhooks
These rules apply to payments, refunds, and other scenarios. When a query result differs from a Webhook already received, compare results for the same transaction and operation:
- Use the Webhook result if the query returns a status other than success (
S) or failure (F), but the Webhook reports success or failure. - Otherwise, use the query result, including when the query returns success (
S) or failure (F).
Query results when needed
Once you receive a Webhook reporting success (S) or failure (F), process the corresponding payment or refund result. No confirming query is needed.
For payments, if the customer has returned to your page but no Webhook has arrived, or you need to reconcile records, you can query at increasing intervals until the query returns success (S) or failure (F), or a Webhook arrives.
For refunds, wait for a Webhook; continuous polling is not required. When you need to check progress or reconcile records, use Query refunds with the refund transaction ID or the original payment transaction ID.
For payment results, the query API depends on the integration method: the Checkout and Direct API integrations use Query transactions; the Web SDK integration calls Query payments with the paymentId saved when the payment was created.
Go-live checklist
- If your webhook endpoint restricts source IP addresses, all production webhook source IP addresses are allowed.
- The notifications in the table above are verified with
X-Rh-Signatureorx-signature, and notifications that fail verification are not processed. - For the notifications in the table above, your endpoint returns HTTP 200 with the
transactionIdafter processing and deduplicates bytransactionId. - Your webhook endpoint accepts every notification type involved in the scenarios you use.
- Success, failure, and retry scenarios are verified in the sandbox with the test cards.
Request signing
Learn how Onerway authenticates API requests with request signatures, how to generate the sign field, and how to verify webhook notifications.
Currency and amount validation
Validate transaction currency, amount precision, and payment method availability before creating a payment request.