Skip to Content
OpenRoam Docs
Utility

Quote utility payments

Prices the order body with current prices, without placing an order.

POST
/v1/utility/quote

Prices the order body with current prices, without placing an order.

Takes the same body as order, with offer public IDs; a biller's own ID is not an offer (400 / 11004). Each item is priced on its own, in request order; the first failing item aborts the quote and is named at items[i], for example 409 / 11002 at items[i].inputs.maxPrice when the current price is above it. A quote reserves nothing, does not expire, submits no payment and does not check the customer's account with the biller.

Authorization

PartnerApiKey
headerX-Partner-Key<token>

Partner API Key (X-Partner-Key)

Request Body

  1. body

The body B2B utility quote and order both take.

currency?|

Order currency, the currency you are charged in, three letters in either case; the API key's currency when omitted. An unsupported code gives 400 / 10001 at currency, reason NOT_SUPPORTED, before any item is checked.

referenceId?|

Optional partner order reference, unique per partner, at most 128 characters without leading or trailing spaces. A quote validates it and ignores it.

items*array<>

1 to 5 items, each paying one bill.

Response Body

OK

  1. response

Current prices for the requested items, in request order. total is the sum of each item's unit price times its quantity. A quote reserves nothing and does not expire.

currency*string
items*array<>
total*
Example Request
curl -X POST 'https://api.sandbox.openroam.com/v1/utility/quote' \  -H 'Content-Type: application/json' \  -d '{  "currency": "USD",  "referenceId": "partner-order-42",  "items": [    {      "publicId": "utility_7tq2mw5kxr3nbv6hzc4dpe2ysa",      "quantity": 1,      "inputs": {        "accountNumber": "1234567",        "invoiceId": "invoice-1",        "maxPrice": {          "amount": 30,          "currency": "USD"        }      }    },    {      "publicId": "utility_k4hv2cq7wnz5jr3xmtb6eyl2pa",      "quantity": 1,      "inputs": {        "accountNumber": "7654321",        "value": {          "amount": 50,          "currency": "AZN"        },        "maxPrice": {          "amount": 35,          "currency": "USD"        }      }    }  ]}'
Example Response
{  "currency": "USD",  "items": [    {      "publicId": "utility_7tq2mw5kxr3nbv6hzc4dpe2ysa",      "quantity": 1,      "name": "Fixed postpaid 40 AZN",      "value": {        "amount": 40,        "currency": "AZN"      },      "price": {        "amount": 27.5,        "currency": "USD"      },      "details": {        "deliveryType": "directCredit"      }    },    {      "publicId": "utility_k4hv2cq7wnz5jr3xmtb6eyl2pa",      "quantity": 1,      "name": "Range prepaid 50 AZN",      "value": {        "amount": 50,        "currency": "AZN"      },      "price": {        "amount": 34.06,        "currency": "USD"      },      "details": {        "deliveryType": "token"      }    }  ],  "total": {    "amount": 61.56,    "currency": "USD"  }}