Use the Onerway Direct API to implement authorization and capture flows where you reserve funds on a customer's card first, then decide whether to capture or void the authorization later. This is ideal for delayed fulfillment scenarios such as hotel bookings, car rentals, or ship-on-order workflows.
Because you directly handle cardholder data (CHD), this integration requires PCI DSS compliance.
| Constraint | Detail |
|---|---|
| Supported card types | Credit Card, Debit Card |
| Capture window | Capture within 3 days after authorization; uncaptured authorizations auto-expire |
| Void eligibility | Only before capture, void, or expiration |
AUTH request. Onerway places a hold on the customer's card without transferring funds.status=R, redirect the customer to redirectUrl. The final result arrives via webhook.Send a payment request with txnType set to AUTH. All other parameters are the same as a standard Direct Card PaymentPayments API.
| Parameter | Standard payment | Authorization |
|---|---|---|
txnType | SALE | AUTH |
subProductType | DIRECT | DIRECT (unchanged) |
productType | CARD | CARD (unchanged) |
status | Meaning | Action |
|---|---|---|
S | Authorization succeeded | Store transactionId for capture or void |
R | 3DS required | Redirect customer to redirectUrl; await webhook for final result |
F | Authorization failed | Check reason field for details |
Send a CAPTURE request to transfer the reserved funds. Reference the original authorization via originTransactionId.
| Parameter | Required | Description |
|---|---|---|
merchantNo | Yes | Your merchant number |
merchantTxnId | Yes | A new unique transaction ID for this capture |
originTransactionId | Yes | transactionId from the original AUTH webhook |
txnType | Yes | CAPTURE |
sign | Yes | Request signature |
{
"merchantNo": "800209",
"merchantTxnId": "capture_1721288823000",
"originTransactionId": "1815983598810308608",
"txnType": "CAPTURE",
"sign": "your_calculated_signature"
}
{
"respCode": "20000",
"respMsg": "Success",
"data": {
"transactionId": "1813842908840075264",
"orderAmount": "200.00",
"orderCurrency": "USD",
"status": "P"
}
}
The sync response returns status=P (pending). The final result arrives via webhook notification.
If you no longer need to capture the funds, send a VOID request to release the hold immediately. Common scenarios:
| Parameter | Required | Description |
|---|---|---|
merchantNo | Yes | Your merchant number |
merchantTxnId | Yes | A new unique transaction ID for this void |
originTransactionId | Yes | transactionId from the original AUTH webhook |
txnType | Yes | VOID |
sign | Yes | Request signature |
{
"merchantNo": "800209",
"merchantTxnId": "void_1721288823000",
"originTransactionId": "1815983598810308608",
"txnType": "VOID",
"sign": "your_calculated_signature"
}
{
"respCode": "20000",
"respMsg": "Success",
"data": {
"transactionId": "1921498535157956608",
"orderAmount": "200.00",
"orderCurrency": "USD",
"status": "P"
}
}
The sync response returns status=P (pending). The final result arrives via webhook notification.
| Error Code | Description | Solution |
|---|---|---|
13032 | Capture or void already carried out | Verify transaction status before retrying. If already captured, use refund instead. |
70002 | Unknown decline | Contact Onerway support |
transactionId from the AUTH webhook — you need it for both capture and void