Payment Method
Payment Method: Grant
See also the Payment Method response object.
The Grant API allows you to give another Braintree merchant controlled access to one of your customer's payment methods.
- DOTNET
var gateway = new BraintreeGateway(accessTokenForRecipient);
PaymentMethodGrantRequest grantRequest = new PaymentMethodGrantRequest()
{
AllowVaulting = false,
IncludeBillingPostalCode = true
};
Result<PaymentMethodNonce> result = gateway.PaymentMethod.Grant("the_payment_method_token", grantRequest);
PaymentMethodNonce nonceToSendToRecipient = result.Target;
// ...
Arguments
SharedPaymentMethodToken
required, stringThe alphanumeric value that references a specific payment method stored in your Vault.
Additional Parameters
AllowVaulting
booleanWhether or not the receiving merchant may use the resulting nonce to store the payment method in their own Vault for future use.
IncludeBillingPostalCode
booleanIf true, any payment methods or transactions created using the nonce will include the billing postal code from your Vault record.
RevokeAfter
DateTimeA date/time after which the grant will automatically be revoked. The time must be at least 24 hours after the grant occurs and specified to the hour (minutes and seconds should both be 0). The date/time should be in ISO 8601 format. If you wish to revoke sooner or at a specific time, use Payment Method: Revoke
.