DeluxHostAPI Reference
Payments & payment methods

Capture a PayPal payment

POST
/v1/invoices/{id}/paypal/capture

Requires confirm: true. Inspect the resource before retrying an uncertain outcome. Requires Idempotency-Key. Use the same key and payload to replay a completed response. A 409 for a pending or failed attempt requires checking the resource; a new key could duplicate a charge or purchase.

Authorization

apiToken billing:pay
headerAuthorizationBearer <token>

A personal API token: Authorization: Bearer dh_live_…. See Authentication for scopes.

Scope: billing:pay

Path Parameters

id*number

Header Parameters

Idempotency-Key*string

Unique per account and operation. Reuse only for an identical request. Completed requests replay the encrypted stored response; pending or failed attempts return 409 and are never automatically rerun.

Length1 <= length <= 128

Request Body

application/json
  1. body
paypalOrderId*string
confirm*boolean

Response Body

Operation completed or accepted; asynchronous actions may still be running.

application/json
  1. response
status*string
reason?string
curl -X POST 'https://api.deluxhost.net/v1/invoices/0/paypal/capture' \  -H "Authorization: Bearer $DELUXHOST_TOKEN" \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "paypalOrderId": "string",  "confirm": true}'
Example Response
{  "status": "string",  "reason": "string"}