Method: partners.purchaseorders.authorizeCharge
Stay organized with collections
Save and categorize content based on your preferences.
Currently, it is used by only YouTube partners.
Used by Google to check with reseller whether a charge for purchase order is authorized. If the purchase order is originated from a subscription, declining the charge will also cancel the originating subscription, or deactivate the originating subscription line items.
Note: The domain name should be replaced with the partner domain name with same path as here.
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
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.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-12 UTC.
[null,null,["Last updated 2025-03-12 UTC."],[[["\u003cp\u003eThis API is used by Google to check with resellers whether a charge for a purchase order is authorized.\u003c/p\u003e\n"],["\u003cp\u003eDeclining a charge for a subscription-based purchase order will result in cancellation or deactivation of the subscription.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must include a unique request ID and details of the charge.\u003c/p\u003e\n"],["\u003cp\u003eThe response body will indicate whether the charge is authorized and, if approved, include a purchase order ID.\u003c/p\u003e\n"],["\u003cp\u003eThe API uses gRPC Transcoding and requires the partner's domain name in the URL.\u003c/p\u003e\n"]]],["This document details the process for a reseller to authorize a purchase order charge via a Google API. The `POST` request is sent to `https://paymentsresellersubscription.googleapis.com/v1/{parent=partners/*}/purchaseorders:authorizeCharge`, with the `parent` path parameter indicating the partner ID. The request body requires a unique `requestId` and `purchaseOrder` details. The response contains an `authorizationResult` (approved/declined) and a `purchaseOrderId` if approved. Declining a charge from a subscription will also cancel it.\n"],null,["# Method: partners.purchaseorders.authorizeCharge\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.AuthorizePurchaseOrderChargeResponse.SCHEMA_REPRESENTATION)\n\nCurrently, it is used by only **YouTube** partners.\n\nUsed by Google to check with reseller whether a charge for purchase order is authorized. If the purchase order is originated from a subscription, declining the charge will also cancel the originating subscription, or deactivate the originating subscription line items. \n\nNote: The domain name should be replaced with the partner domain name with same path as here.\n\n### HTTP request\n\n`POST https://paymentsresellersubscription.googleapis.com/v1/{parent=partners/*}/purchaseorders:authorizeCharge`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The parent resource name, which is the identifier of the partner. It will have the format of \"partners/{partner_id}\". |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"requestId\": string, \"purchaseOrder\": { object (/payments/reseller/subscription/reference/rest/v1/partners.purchaseorders#PurchaseOrder) } } ``` |\n\n| Fields ||\n|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `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. |\n| `purchaseOrder` | `object (`[PurchaseOrder](/payments/reseller/subscription/reference/rest/v1/partners.purchaseorders#PurchaseOrder)`)` Required. Details of the charge. |\n\n### Response body\n\nThe reseller's determination as to whether the charge should be approved.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"authorizationResult\": enum (/payments/reseller/subscription/reference/rest/v1/AuthorizationResult), \"purchaseOrderId\": string } ``` |\n\n| Fields ||\n|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `authorizationResult` | `enum (`[AuthorizationResult](/payments/reseller/subscription/reference/rest/v1/AuthorizationResult)`)` Required. The reseller's authorization result for purchase order charge request. |\n| `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. |"]]