Payment Method
Payment Method: Grant
Availability
The Grant API is currently in a limited release.Contact us to
determine whether it's right for your needs and to request access to the API.
- Ruby
gateway = Braintree::Gateway.new(
:access_token => access_token_for_recipient
)
grant_result = gateway.payment_method.grant(
"the_payment_method_token",
:allow_vaulting => true,
:include_billing_postal_code => true
)
nonce_to_send_to_recipient = grant_result.payment_method_nonce.nonce
# ...
Arguments
shared_payment_method_token
required, StringThe alphanumeric value that references a specific payment method stored in your Vault.
Additional Parameters
:allow_vaulting
booleanWhether or not the receiving merchant may use the resulting nonce to store the payment method in their own Vault for future use.
:include_billing_postal_code
booleanIf true, any payment methods or transactions created using the nonce will include the billing postal code from your Vault record.
:revoke_after
TimeA 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
.