Withdrawals

Submit signatures

POST/v1/withdrawals/{id}/authorizations

Records the merchant's signatures over the legs' typed data. Every signature is verified against the wallet before any is stored.

API key · or dashboard session.

Request

Shell
curl -fsS "$API/v1/withdrawals/wd_0198f80c-…/authorizations" \
  -H "Authorization: Bearer $PAYDAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "authorizations": [ { "leg_id": "wdl_0198f80c-…", "signature": "0x…" } ] }'

Response

200 OK
{
  "id": "wd_0198f80c-7777-7dc1-a369-90556a64f700",
  "status": "in_progress",
  "wallet_address": "0x1111111111111111111111111111111111111111",
  "destination": {
    "chain": { "id": "8453", "name": "Base", "native_symbol": "ETH" },
    "address": "0x000000000000000000000000000000000000d00d"
  },
  "legs": [
    {
      "id": "wdl_0198f80c-8d2f-7dc1-a369-90556a64f700",
      "kind": "bridge",
      "source_chain": { "id": "143", "name": "Monad", "native_symbol": "MON" },
      "amount": "1.234567",
      "amount_base_units": "1234567",
      "state": "awaiting_signature",
      "authorization": {
        "primary_type": "ReceiveWithAuthorization",
        "typed_data": {
          "domain": {
            "name": "USDC",
            "version": "2",
            "chainId": 143,
            "verifyingContract": "0x754704Bc059F8C67012fEd69BC8A327a5aafb603"
          },
          "primaryType": "ReceiveWithAuthorization",
          "types": {
            "EIP712Domain": [
              { "name": "name", "type": "string" },
              { "name": "version", "type": "string" },
              { "name": "chainId", "type": "uint256" },
              { "name": "verifyingContract", "type": "address" }
            ],
            "ReceiveWithAuthorization": [
              { "name": "from", "type": "address" },
              { "name": "to", "type": "address" },
              { "name": "value", "type": "uint256" },
              { "name": "validAfter", "type": "uint256" },
              { "name": "validBefore", "type": "uint256" },
              { "name": "nonce", "type": "bytes32" }
            ]
          },
          "message": {
            "from": "0x1111111111111111111111111111111111111111",
            "to": "0x2222222222222222222222222222222222222222",
            "value": "1234567",
            "validAfter": "0",
            "validBefore": "1800000000",
            "nonce": "0x18b79105e486e10f626b71939a0226c47316949b7c24ff1c397661ea861fafaa"
          }
        },
        "expires_at": "2027-01-15T08:00:00Z",
        "forwarder": "0x2222222222222222222222222222222222222222",
        "nonce_preimage": {
          "destination_domain": 6,
          "mint_recipient": "0x000000000000000000000000000000000000d00d",
          "salt": "0x0000000000000000000000000000000000000000000000000000000000000007"
        }
      },
      "transfer_tx_hash": null,
      "burn_tx_hash": null,
      "mint_tx_hash": null,
      "failure_reason": null
    },
    {
      "id": "wdl_0198f80c-8888-7dc1-a369-90556a64f700",
      "kind": "transfer",
      "source_chain": { "id": "8453", "name": "Base", "native_symbol": "ETH" },
      "amount": "12.000000",
      "amount_base_units": "12000000",
      "state": "awaiting_signature",
      "authorization": { "primary_type": "TransferWithAuthorization", "typed_data": { "…": "…" }, "expires_at": "2027-01-15T08:00:00Z", "forwarder": null, "nonce_preimage": null },
      "transfer_tx_hash": null,
      "burn_tx_hash": null,
      "mint_tx_hash": null,
      "failure_reason": null
    }
  ],
  "created_at": "2027-01-14T08:00:00Z",
  "completed_at": null,
  "cancelled_at": null,
  "failed_at": null
}

Path parameters

idwd_ idrequired

Body

authorizations[].leg_idwdl_ idrequired
authorizations[].signaturestringrequired
0x hex, 65 bytes r || s || v, over the leg's typed_data.

Response

Withdrawal; in_progress once every leg is signed.

Status codes

  • 400signature_invalid The message names the leg. Nothing was recorded.
  • 404withdrawal_leg_not_found
  • 409leg_not_awaiting_signature The leg already carries a different signature, or has moved on. Resending the same signature is a no-op.
  • 409authorization_expired 24 hours passed; create a new withdrawal.
  • 409withdrawal_finished