Method: partners.purchaseorders.authorizeCharge

  • This API is used by Google to check with resellers whether a charge for a purchase order is authorized.

  • Declining a charge for a subscription-based purchase order will result in cancellation or deactivation of the subscription.

  • The request body must include a unique request ID and details of the charge.

  • The response body will indicate whether the charge is authorized and, if approved, include a purchase order ID.

  • The API uses gRPC Transcoding and requires the partner's domain name in the URL.

Currently, it is used by only YouTube partners.

Google checks with the reseller if a charge for a purchase order is authorized. If the purchase order originated from a subscription, declining the charge also cancels the originating subscription or deactivates the originating subscription line items. Note: The domain name below should be replaced with the partner domain name with the same path.

HTTP request

POST https://paymentsresellersubscription.googleapis.com/v1/{parent=partners/*}/purchaseorders:authorizeCharge

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The parent resource name, which is the identifier of the partner. It will have the format of "partners/{partner_id}".

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestId": string,
  "purchaseOrder": {
    object (PurchaseOrder)
  }
}
Fields
requestId

string

Required. A random UUID to uniquely identify the request. The idempotency key for the request. So in case of retries, requestId will be same as previous one.

purchaseOrder

object (PurchaseOrder)

Required. Details of the charge.

Response body

Contains the reseller's determination as to whether the charge should be approved.

If successful, the response body contains data with the following structure:

JSON representation
{
  "authorizationResult": enum (AuthorizationResult),
  "purchaseOrderId": string
}
Fields
authorizationResult

enum (AuthorizationResult)

Required. The reseller's authorization result for purchase order charge request.

purchaseOrderId

string

Required. Sets the id only if the authorization is approved. The id assigned by the partner for the authorized purchase order. The purchase order notification from Cloud pubsub notification message will contain the resource name with this id.