Activate payment

Activate a payment (public, customer-facing)

POST/v1/payments/{paymentId}/activatePublic

Path parameters

FieldTypeDescription
paymentIdrequiredstringPayment ID

Response

200 OK

FieldTypeDescription
activatedAtoptionalintegerUnix-milliseconds timestamp when the payment was activated. Null before activation.
activationFlowSecondsoptionalintegerActivation grace period in seconds before the payment window starts counting. Null when not configured.
addressoptionalstringOn-chain deposit address the customer must send funds to. Null until the payment is activated and an address is assigned.
amountoptionalstringInteger string in the asset's smallest unit.
amountReceivedoptionalstringInteger string in the asset's smallest unit.
assetoptionalAssetIDAsset the payment is denominated in, as an asset id-string (see GET /v1/assets). Null until an asset is selected.
asset values AssetID
USDT_ETHEREUMUSDT_ARBITRUMUSDT_OPTIMISMUSDT_BASEUSDT_BSCUSDT_PLASMAUSDT_POLYGONUSDC_ETHEREUMUSDC_ARBITRUMUSDCE_ARBITRUMUSDC_OPTIMISMUSDC_BASEUSDC_BSCUSDC_PLASMAUSDC_POLYGONETH_ETHEREUMETH_ARBITRUMETH_OPTIMISMETH_BASEXPL_PLASMABNB_BSCPOL_POLYGONTESTCOIN_ETHEREUMTESTCOIN_OPTIMISMTESTCOIN_PLASMATESTSTABLECOIN_ETHEREUMTESTSTABLECOIN_OPTIMISMTESTSTABLECOIN_PLASMA
createdAtoptionalintegerUnix-milliseconds timestamp when the payment was created.
expiresAtoptionalintegerUnix-milliseconds timestamp when the payment window closes; the payment expires if unpaid by then.
idoptionalstringUnique Suward identifier of the payment.
paymentWindowSecondsoptionalintegerLength of the payment window in seconds — how long the payment stays open for funding once activated.
redirectoptionalPublicRedirectResolved "return to store" redirect (base URL plus the query parameters to append) used to send the customer back after payment. Null when none was configured.
redirect fields PublicRedirect
FieldTypeDescription
queryoptionalobjectQuery parameters to append to the URL when redirecting the customer back, e.g. id, externalId, data. Empty when the redirect has no parameters.
urloptionalstringBase "return to store" URL the customer is sent back to after paying.
statusoptionalPaymentStatusEnumMain payment lifecycle status. See the status enum for the full meaning of each value.
status values PaymentStatusEnum
pendingacceptedsuccessfailed
subStatusoptionalPaymentSubStatusEnumFine-grained payment sub-status. See the sub-status enum for the full meaning of each value.
subStatus values PaymentSubStatusEnum
createdactivatedawaitingPaymentconfirmingcompletedoverpaidunderpaidexpiredcancelledpartiallyPaid
underpaymentToleranceoptionalstringInteger string in the asset's smallest unit.
updatedAtoptionalintegerUnix-milliseconds timestamp when the payment was last updated.
paymentPageUrloptionalstringAbsolute URL of the Suward-hosted checkout page where the customer pays this payment.

Errors

500 Internal Server Error— each returns { errorCode, message, args? }. Codes, retries and limits: Errors & limits

All Payments endpoints

Request

terminal
curl -X POST https://api.suward.com/v1/payments/<payment_id>/activate

Response · 200 OK

response.json
{
"activatedAt": 0,
"activationFlowSeconds": 3600,
"address": "0xabc…def",
"amount": "100000000",
"amountReceived": "100000000",
"asset": "USDT_ETHEREUM",
"createdAt": 0,
"expiresAt": 0,
"id": "obj_abc123",
"paymentWindowSeconds": 3600,
"redirect": {},
"status": "pending",
"subStatus": "created",
"underpaymentTolerance": "0",
"updatedAt": 0,
"paymentPageUrl": "string"
}

Illustrative values. Every field, type and status on this page is generated from the OpenAPI specification.

Something unclear? payments@suward.com — we treat every integration question as a documentation defect.