Partners: Setting up mandates
Setting up Direct Debit mandates
Youāll need to provide a way for your users to set up Direct Debit mandates with their customers (whom weāll refer to from now on as āend customersā) so they can start collecting payments from them.
A mandate allows you to pull money from an end customerās bank account with a simple API call.
Making API Calls on behalf of your merchant
Prerequisite: We must have gotten and saved merchants' access tokens after following the steps here
To make an API call against a merchant's account, we will have to use the saved access token. See an example below:
1<?php
2require 'vendor/autoload.php';
3
4$client = new \GoCardlessPro\Client([
5 // You'll need to identify the user that the customer is paying and fetch their
6 // access token
7 'access_token' => $user->gocardlessAccessToken,
8 // Change me to LIVE when you're ready to go live
9 'environment' => \GoCardlessPro\Environment::SANDBOX
10]);Creating Mandates
Setting up Direct Debit mandates or Instant Bank Payments using a Billing Request Flow
You can read all about Billing Request Flows and the experience for your payers in ourĀ documentation here.
