Skip to main content
These tools support card payments on merchant websites. For the complete workflow, see Browser Pay. Examples show the name and arguments of an MCP tools/call request; successful tool data is in structuredContent.

get_credential

Get a credential for the final total on a merchant checkout page. Clink checks the wallet card and purchase authorization, returning either a credential or an Operation with next_action.

Parameters

When the user selected a card, preserve the same paymentInstrumentId on subsequent calls for this checkout. Agent Pay registration does not need to be completed separately before this call; the returned authorization flow handles it when needed. Actual card availability is determined by the wallet and tool response. Each products entry has: When supplying shippingAddress, include street_address, address_locality, address_region, address_country (two letters), postal_code, first_name, last_name, and phone_number. extended_address is optional. Use known customer information; omit the optional object if it is unavailable.

Request

Response

The response uses the Operation envelope. It may also contain: The examples below show structuredContent; IDs, URLs, card fields, and ciphertext are placeholders.
Use credential.card directly. This response only confirms issuance; it does not establish the merchant payment result.
For encrypted credentials, follow the decryption reference. For an already decrypted response, credential directly contains card, orderId, paymentExecutionDetailId, and clientReferenceId. The card fields are number, securityCode, optional expiryMonth, expiryYear, expiry, dynamicDataType, dynamicDataId, and dynamicDataExpiration (Unix epoch seconds as a string). Additional payload fields can include amount (major units), currencyCode, status, cardholderName, billingAddress, paymentExecutionId, paymentTransactionId, instructionId, and mandateId.
SUCCEEDED here confirms credential issuance, not merchant payment. A later get_operation returns the issuance state without any credential. Use confirm_result after observing the merchant outcome, or report NOT_SUBMITTED if no submission occurred.

Continuation and retries

After a user authorization or card setup link completes, repeat the checkout-facts request without the setup operationId. Follow the current next_action if setup is still pending. Before a final report, repeating the same checkout facts returns the outstanding credential. If it expired before submission, the same request can obtain a replacement for the same order. After final reporting, the same facts start a new purchase. This tool has no idempotencyKey parameter. For compatibility with an earlier response that carries CONFIRM, the schema also accepts operationId, actionId, and expectedRevision together. That form must contain no checkout fields. New integrations should use the checkout-facts flow above; if an older issuing Operation shows CONFIRM, repeat the same checkout facts to obtain the current behavior.

confirm_result

Record the Agent’s observation of a Browser Pay payment. This tool does not execute payment and does not independently verify merchant success. Do not call it for UCP Checkout or direct payments.

Parameters

failureReason accepts CARD_DECLINED, AUTHENTICATION_REQUIRED, AMOUNT_CHANGED, CREDENTIAL_EXPIRED, CREDENTIAL_LOST, MERCHANT_ERROR, BUYER_CANCELLED, or OTHER. These are alternative reporting cases for the credential above. Report success only after the merchant explicitly confirms payment.
Send the identifiers from the issuing response, not the setup operation.

Response and reporting rules

This tool returns a result report, not an Operation envelope: After UNKNOWN, inspect the existing merchant transaction and report the final outcome before report_deadline; do not pay again. Repeating the same outcome is safe, but a different final outcome after one has been recorded is refused. If messages contains paid_amount_mismatch, the reported amount differed from Clink’s record and did not overwrite it.

Errors and recovery

Browser Pay business refusals return isError: true and structuredContent.error with code and message. They do not carry next_action. Missing scopes can instead produce a text-only tool error. See common error handling.