Activate payment
Activate a payment (public, customer-facing)
POST
/v1/payments/{paymentId}/activatePublicPath parameters
| Field | Type | Description |
|---|---|---|
paymentIdrequired | string | Payment ID |
Response
200 OK
| Field | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
activatedAtoptional | integer | Unix-milliseconds timestamp when the payment was activated. Null before activation. | |||||||||
activationFlowSecondsoptional | integer | Activation grace period in seconds before the payment window starts counting. Null when not configured. | |||||||||
addressoptional | string | On-chain deposit address the customer must send funds to. Null until the payment is activated and an address is assigned. | |||||||||
amountoptional | string | Integer string in the asset's smallest unit. | |||||||||
amountReceivedoptional | string | Integer string in the asset's smallest unit. | |||||||||
assetoptional | AssetID | Asset the payment is denominated in, as an asset id-string (see GET /v1/assets). Null until an asset is selected. | |||||||||
| |||||||||||
createdAtoptional | integer | Unix-milliseconds timestamp when the payment was created. | |||||||||
expiresAtoptional | integer | Unix-milliseconds timestamp when the payment window closes; the payment expires if unpaid by then. | |||||||||
idoptional | string | Unique Suward identifier of the payment. | |||||||||
paymentWindowSecondsoptional | integer | Length of the payment window in seconds — how long the payment stays open for funding once activated. | |||||||||
redirectoptional | PublicRedirect | Resolved "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. | |||||||||
| |||||||||||
| Field | Type | Description |
|---|---|---|
queryoptional | object | Query parameters to append to the URL when redirecting the customer back, e.g. id, externalId, data. Empty when the redirect has no parameters. |
urloptional | string | Base "return to store" URL the customer is sent back to after paying. |
statusoptionalstatus values PaymentStatusEnum
pendingacceptedsuccessfailedsubStatusoptionalsubStatus values PaymentSubStatusEnum
createdactivatedawaitingPaymentconfirmingcompletedoverpaidunderpaidexpiredcancelledpartiallyPaidunderpaymentToleranceoptionalupdatedAtoptionalpaymentPageUrloptionalErrors
500 Internal Server Error— each returns { errorCode, message, args? }. Codes, retries and limits: Errors & limits
Request
curl -X POST https://api.suward.com/v1/payments/<payment_id>/activateconst response = await fetch('https://api.suward.com/v1/payments/<payment_id>/activate', { method: 'POST',});const data = await response.json();package main import ( "fmt" "io" "net/http") func main() { req, _ := http.NewRequest("POST", "https://api.suward.com/v1/payments/<payment_id>/activate", nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}import requests, os response = requests.post( 'https://api.suward.com/v1/payments/<payment_id>/activate',)data = response.json()Response · 200 OK
{ "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.