Skip to main content
POST
/
payments
/
confirm
Confirm a payment
curl --request POST \
  --url https://v2.prod.halliday.xyz/payments/confirm \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "payment_id": "<string>",
  "state_token": "<string>",
  "owner_address": "<string>",
  "destination_address": "<string>",
  "client_redirect_url": "<string>",
  "owner_chain": "<string>",
  "client_redirect_after": "COMPLETED"
}
'
{
  "payment_id": "<string>",
  "org_id": "<string>",
  "status": "PENDING",
  "funded": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "initiate_fund_by": "2023-11-07T05:31:56Z",
  "quoted": {
    "output_amount": {
      "asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "amount": "1"
    },
    "fees": {
      "total_fees": "<string>",
      "conversion_fees": "<string>",
      "network_fees": "<string>",
      "business_fees": "<string>",
      "currency_symbol": "USD"
    },
    "route": [
      {
        "type": "ONRAMP",
        "net_effect": {
          "consume": [
            {
              "account": "USER",
              "resource": {
                "asset": "<string>",
                "property": "APPROVAL"
              },
              "amount": "<string>",
              "tx_id": "<string>"
            }
          ],
          "produce": [
            {
              "account": "USER",
              "resource": {
                "asset": "<string>",
                "property": "APPROVAL"
              },
              "amount": "<string>",
              "tx_id": "<string>"
            }
          ]
        },
        "pieces_info": [
          {
            "type": "user_fund"
          }
        ],
        "step_index": 123
      }
    ],
    "onramp": "<string>",
    "onramp_method": "CREDIT_CARD"
  },
  "fulfilled": {
    "route": [
      {
        "status": "PENDING",
        "type": "ONRAMP",
        "net_effect": {
          "consume": [
            {
              "account": "USER",
              "resource": {
                "asset": "<string>",
                "property": "APPROVAL"
              },
              "amount": "<string>",
              "tx_id": "<string>"
            }
          ],
          "produce": [
            {
              "account": "USER",
              "resource": {
                "asset": "<string>",
                "property": "APPROVAL"
              },
              "amount": "<string>",
              "tx_id": "<string>"
            }
          ]
        },
        "pieces_info": [
          {
            "type": "user_fund"
          }
        ],
        "step_index": 123,
        "transaction_hash": "<string>"
      }
    ],
    "output_amount": {
      "asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "amount": "1"
    },
    "fees": {
      "total_fees": "<string>",
      "conversion_fees": "<string>",
      "network_fees": "<string>",
      "business_fees": "<string>",
      "currency_symbol": "USD"
    },
    "onramp": "<string>",
    "onramp_method": "CREDIT_CARD"
  },
  "current_prices": {
    "USD": "1.00",
    "ethereum:0x": "4200",
    "ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": "1.00"
  },
  "price_currency": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "processing_addresses": [
    {
      "chain": "ethereum",
      "address": "<string>",
      "factory": "<string>"
    }
  ],
  "owner_chain": "<string>",
  "owner_address": "<string>",
  "destination_address": "<string>",
  "client_redirect_url": "<string>",
  "declaration": {},
  "completed_at": "2023-11-07T05:31:56Z",
  "quote_request": {
    "request": {
      "kind": "FIXED_INPUT",
      "fixed_input_amount": {
        "asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
        "amount": "1"
      },
      "output_asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "dest_address": "<string>",
      "custom_actions": {
        "actions": [
          {
            "type": "CallImmediateAction",
            "target": "<string>",
            "value": "<string>",
            "calldata": "<string>"
          }
        ],
        "user_estimated_gas": "<string>"
      }
    },
    "price_currency": "USD",
    "onramps": [
      "moonpay",
      "coinbase"
    ],
    "onramp_methods": [
      "CREDIT_CARD",
      "ACH",
      "APPLE_PAY"
    ],
    "customer_ip_address": "<string>",
    "customer_id": "<string>",
    "parent_payment_id": "<string>",
    "label": "<string>",
    "features": [
      "BETA_EDGES"
    ],
    "rev_share_name": "<string>",
    "allow_unsafe_transfer_out": true,
    "show_all_issues": true,
    "allow_unsafe_slippage": true,
    "allow_exceed_max_input_limit": true,
    "use_intent_refund": true,
    "hops": [
      "<string>"
    ]
  },
  "customer_id": "<string>",
  "label": "<string>",
  "next_instruction": {
    "type": "ONRAMP",
    "payment_id": "<string>",
    "funding_page_url": "https://app.halliday.xyz/funding/${payment_id}",
    "deposit_info": [
      {
        "deposit_token": "base:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "deposit_amount": "4.8",
        "deposit_address": "0xaddress",
        "deposit_chain": "base"
      }
    ]
  },
  "issues": [
    {
      "kind": "amount",
      "asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "given": "<string>",
      "limits": {
        "min": "<string>",
        "max": "<string>"
      },
      "source": "<string>",
      "message": "<string>",
      "reason": "TOO_LOW",
      "downstream_limits": {
        "min": "<string>",
        "max": "<string>"
      }
    }
  ],
  "parent_payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Initial payment confirmation request.

payment_id
string
required

ID of the payment from the quote to confirm

state_token
string
required

State token from the quote response

owner_address
string
required

Owner address for the payment. This is the address that the payment will be sent from.

destination_address
string
required

Destination address for the payment. This is the address that the payment will be sent to.

client_redirect_url
string<uri>

Optional URL to redirect users to after an onramp flow completes.

owner_chain
string

Optional chain for the owner address, needed when the owner operates on a specific chain.

client_redirect_after
enum<string>
default:COMPLETED

When to redirect the user to the client_redirect_url. COMPLETED waits for the full payment to finish, FUNDED redirects after funding is confirmed.

Available options:
COMPLETED,
FUNDED

Response

Payment confirmed successfully

payment_id
string
required
org_id
string
required

Organization identifier

status
enum<string>
required
Available options:
PENDING,
COMPLETE,
FAILED,
EXPIRED,
WITHDRAWN,
TAINTED,
UNCONFIRMED
funded
boolean
required

Whether the payment has been funded

created_at
string<date-time>
required
updated_at
string<date-time>
required
initiate_fund_by
string<date-time>
required

Deadline for funding the payment.

quoted
object
required
fulfilled
object
required
current_prices
object
required

Mapping of asset symbols to their unit prices

Example:
{
"USD": "1.00",
"ethereum:0x": "4200",
"ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": "1.00"
}
price_currency
string
required

Fiat asset used for pricing

Example:

"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"

processing_addresses
object[]
required
owner_chain
string
required

Chain identifier for the owner

owner_address
string
required

Address of the owner of the payment

destination_address
string
required

Address of the destination of the payment

client_redirect_url
string | null
required

Client redirect URL

declaration
object
required

Declaration object

completed_at
string<date-time>
quote_request
object

The original quote request.

customer_id
string

ID of the customer who created the payment

label
string

Optional payment label

Maximum string length: 255
next_instruction
object

Instruction payload that returns the funding pages if the payment requires funding.

Example:
{
"type": "ONRAMP",
"payment_id": "<string>",
"funding_page_url": "https://app.halliday.xyz/funding/${payment_id}",
"deposit_info": [
{
"deposit_token": "base:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"deposit_amount": "4.8",
"deposit_address": "0xaddress",
"deposit_chain": "base"
}
]
}
issues
object[]

Payment validation issues

parent_payment_id
string<uuid>

Parent payment reference