SEPA Direct Debit
Vaulting
Create
Use
Payment Method: Create
to create a payment method for an existing customer using
a payment method nonce received from the client:
- Ruby
result = gateway.payment_method.create(
:customer_id => "131866",
:payment_method_nonce => nonce_from_the_client
)
Customer: Create
with the
payment_method_nonce
parameter. Once successfully created, you can use
Transaction: Sale
with the
payment_method_token
parameter to create a transaction.
Find
Use
Payment Method: Find
to find a payment method:
- Ruby
payment_method = gateway.payment_method.find("token")
Braintree::NotFoundError
. The return value of the
Payment Method: Find
call will be a
PaymentMethod
response object.
Note
The find action will also return a link to the mandate associated with the customer's payment
method.
Delete
Use
Payment Method: Delete
to delete a payment method:
- Ruby
result = gateway.payment_method.delete("the_token")
result.success?
# true
Braintree::NotFoundError
.
- Ruby
result = gateway.payment_method.delete("the_token")
result.success?
# true
Braintree::NotFoundError
.Note
The delete action will also revoke the mandate associated with the customer's payment method.