WalletD developers
Orders

Pay an open order with one instant payment

Idempotent by order: calling it again returns the same payment.

POST/v1/orders/{orderId}/pay

Idempotent by order: calling it again returns the same payment. A payment refusal (insufficient funds, limits) leaves the order open.

Authorization

bearerAuth
AuthorizationBearer <token>

A tenant API key (sk_{env}_{id}_{secret}), a wallet user token, or an IdP access token. Which principal the credential resolves to decides the scopes it carries; see the authentication guide.

In: header

Path Parameters

orderId*string
Formatuuid

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/v1/orders/497f6eca-6276-4993-bfeb-53cbbbba6f08/pay"
{  "order": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "client_id": "5b3fa7ba-57d3-4017-a65b-d57dcd2db643",    "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea",    "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",    "status": "open",    "subtotal": 0,    "commission": 0,    "total": 0,    "payment_id": "d43b87f9-9e28-4802-8eaa-6ee91a40ea71",    "expires_at": "2019-08-24T14:15:22Z",    "restocked_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z",    "lines": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "offering_id": "a7d124b6-6a8c-44d1-9d46-4636e3f8c04e",        "variant_id": "8a2d415d-59aa-4132-bef3-011f97c4a0f6",        "title": "string",        "variant_title": "string",        "sku": "string",        "unit_amount": 0,        "quantity": 0,        "line_amount": 0,        "commission": 0      }    ]  },  "payment": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "status": "requires_capture",    "mode": "string",    "payer_user_id": "295f0b28-ae85-4d57-93b3-e87e18f208b4",    "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea",    "amount": 0,    "captured_amount": 0,    "refunded_amount": 0,    "fee": 0,    "commission": 0,    "hold_expires_at": "2019-08-24T14:15:22Z",    "line_items": [      {        "name": "string",        "amount": 0      }    ],    "created_at": "2019-08-24T14:15:22Z"  }}