The Grant API provides visibility into facilitated transactions created with granted payment information.
With the appropriate rights, the grantor can search for transactions that the recipient has created with granted payment information. Facilitated transaction searches behave the same as any other transaction search, but are limited to only those transactions that the recipient has created with the granted payment information. To enable facilitated transaction search, configure the connection with the recipient to include the
read_facilitated_transactions OAuth scope.
Search parameters should be relative to the recipient. The grantor cannot query against parameters unique to the payment method record stored in their vault such as
The example below fetches the number of authorized facilitated transactions for a given recipient.
gateway = Braintree::Gateway.new(:access_token => use_access_token_for_recipient) collection = gateway.transaction.search do |search| search.status.is Braintree::Transaction::Status::Authorized end number_of_facilitated_transactions = collection.maximum_size
The recipient can search for transactions created with granted payment information.
If the recipient has connected to any grantors, those grantors will show up as options for a transaction search under the Payment Method Source filter section. These grantors can be used as parameters in your search like any other transaction sources. If the recipient is connected to multiple grantors, they can include or exclude transactions created with payment methods from any combination of grantors.
A recipient can search for facilitated transactions via the API by passing the source search parameter and setting it to the grantor's OAuth application client ID. This value can be found on the OAuth Connected Apps page in the Control Panel, as well as in the facilitator details returned in transaction response objects.
The recipient can also search for disputes for facilitated transactions.
Using the Control Panel dispute search, choose Payment Method Source to specify the grantor.
When searching for disputes via the API, specify the Grantor's OAuth application client ID as the transaction source.