# Sending Money

Source: https://docs.gocardless.com/docs/partner-integrations/sending-money

# Send Money

You'll need to provide a way for your merchants to initiate outbound payments so they can send money to their chosen recipients.

> **Info:**
> Currently, Outbound Payments APIs are limited to the UK and operate solely through the Faster
>   Payments scheme.

## Prerequisites for Outbound Payments

Before you can start sending money through GoCardless, make sure the following are in place:

- Your merchants must be fully onboarded with GoCardless.
- Outbound Payments must be enabled for each merchant. This setting is applied at the merchant level, so even if you - as a partner - have Outbound Payments enabled, you won't be able to create outbound payments on a merchant's behalf unless it's enabled for them too.
- Anyone in your merchants' organisations who will be sending money needs their own GoCardless Dashboard user account with read-write/admin permissions.
- These users must also have SMS-based 2FA turned on to be able to receive payment authorisation codes.

## How it works

The Outbound Payments API allows you to initiate payouts from a merchant's bank account to a recipient. Instead of building complex compliance flows yourself, GoCardless handles the regulatory heavy lifting, including **Strong Customer Authentication (SCA)** and **Confirmation of Payee (CoP)** through an API response model.

The flowchart below provides a **high-level overview** of the Outbound Payment Initiation process from partner apps:

![Image: Outbound Payments For Partners -> Flow](/images/docs/partner-integrations/sending-money/flowchart.png)

The overall flow consists of the following stages:

  
#### [1. Authenticate](#making-api-calls-on-behalf-of-your-merchant)

Ensure your merchant has Outbound Payments enabled and use their unique access token to make API
    requests.

  
#### [2. Initiate the payment](#outbound-payment-initiation)

Call the Create Outbound Payment API, which performs CoP and automatically determines whether
    SCA is required.

  
#### [3. Handle outcomes](#handling-outcomes)

Handle three possible outcomes: an immediate `201 Created`, a `403` requiring dashboard
    redirect, or a validation error.

  
#### [4a. Redirect (SCA required)](#what-happens-after-redirect)

Redirect the user to the GoCardless Dashboard to review payment details and enter an SMS code.

  
#### [4b. Complete payment (SCA exempt)](#outbound-payment-completion)

Display CoP results and call the Approve Outbound Payment API to send the payment.

## Making API Calls on behalf of your merchant

You must have gotten and saved merchants' access tokens after [following the OAuth flow](/docs/partner-integrations/connect-your-merchants#using-the-oauth-flow). To make an API call against a merchant's account, use the saved access token. See an example below:

```php
<?php
require 'vendor/autoload.php';

$client = new \\GoCardlessPro\\Client([
// You'll need to identify the user that the customer is paying
// and fetch their access token
'access_token' => $user->gocardlessAccessToken,
// Change me to LIVE when you're ready to go live
'environment' => \\GoCardlessPro\\Environment::SANDBOX
]);
```

```python
import os

client = gocardless_pro.Client( # You'll need to identify the user that the customer is paying # and fetch their access token
access_token=user.gocardless_access_token, # Change this to 'live' when you are ready to go live.
environment='sandbox'
)
```

```ruby
require 'gocardless_pro'

client = GoCardlessPro::Client.new(

# You'll need to identify the user that the customer is paying

# and fetch their access token

access_token: user.gocardless_access_token,

# Remove the following line when you're ready to go live

environment: :sandbox
)
```

```java
package com.gcintegration;

GoCardlessClient client = GoCardlessClient
// You'll need to identify the user that the customer is paying
// and fetch their access token
.newBuilder(CurrentUser.gocardlessAccessToken)
// Change me to LIVE when you're ready to go live
.withEnvironment(GoCardlessClient.Environment.SANDBOX)
.build();
```

```javascript
const constants = require("gocardless-nodejs/constants");

const client = gocardless(
// We recommend storing your access token in an environment
// variable for security
user.GoCardlessAccessToken,
// Change this to constants.Environments.Live when you're ready to go live
constants.Environments.Sandbox,
);
```

```net
using GoCardless;

GoCardlessClient client = GoCardlessClient.Create(
// We recommend storing your access token in an
// configuration setting for security
User["GoCardlessAccessToken"],
// Change me to LIVE when you're ready to go live
GoCardlessClient.Environment.SANDBOX
);
```

```go
package main

	"fmt"

    gocardless "github.com/gocardless/gocardless-pro-go/v6"

)

func main() 
client, err := gocardless.New(config)
if err != nil 
}
```

## Outbound Payment Initiation

To initiate outbound payment, use either the [Create Outbound Payment API](/docs/send-money/send-an-outbound-payment/create-an-outbound-payment) or the [Create Withdrawal API](/docs/send-money/send-an-outbound-payment/create-an-outbound-payment).

Refer to the [create a recipient guide](/docs/send-money/payment-account) and the [outbound payment types guide](/docs/send-money/send-an-outbound-payment/create-an-outbound-payment) for details on required parameters.

When you're initiating outbound payments from an app, the key thing to be aware of is how **Confirmation of Payee (CoP)** and **Strong Customer Authentication (SCA)** work for you.

UK regulations require UK Payment Service Providers to implement CoP. GoCardless automatically runs these checks for every outbound payment — read more about [verifications for Outbound Payments](/docs/send-money/send-an-outbound-payment/approve-an-outbound-payment).

GoCardless is responsible for carrying out SCA, so we require your app to use our SCA solution. The regulations do allow a few exemptions, and at GoCardless, we support _Trusted Beneficiary_ — see [SCA exemptions](/docs/send-money/strong-customer-authentication) for more details.

When a recipient with a full or partially matched CoP results receives their first payment with a successful SCA, they are added to a trusted list. This means future payments to this recipient will not trigger the GoCardless SCA flow.

For your app, this means:

- **Payments that qualify for an SCA exemption** can be initiated directly through the API without redirecting.
- **Payments requiring SCA** must be initiated via a redirect to the GoCardless Dashboard so the user can complete authentication.

> **Tip: Action**
> Call Create Outbound Payment API or the Create Withdrawal API.

## Handling Outcomes

  
### Payment qualifies for an SCA exemption

If the payment qualifies for an SCA exemption, it will be initiated immediately. You'll receive a `201 Created` response with the payment details, including its ID for [tracking the payment](/docs/send-money/tracking-outbound-payments). At this point the payment has been created — the [next step is to approve it](#outbound_payment_completion) so it can be sent.

  
### Payment requires SCA

If the payment does not qualify for an SCA exemption, the API will return a `403 insufficient_permissions_continue_on_dashboard`. The error response includes a dashboard link containing all the outbound payment parameters you provided, along with an HMAC to ensure the data cannot be modified.

    
> **Warning:**
> Do not modify the dashboard link directly. If you need to change any payment parameters, you
>       must create a new API request to generate a fresh outbound payment with the updated values.

    ```http
    HTTP/1.1 403
    Content-Type: application/json
    
          }
        ],
        "documentation_url": "/docs/api-reference/responses-and-errors#invalid-api-usage",
        "type": "invalid_api_usage",
        "request_id": "89a7f8ef-7159-4b4b-8d75-14d5885d3a0b",
        "code": 403
      }
    }
    ```

    Open the provided dashboard link in a new browser tab or window — CoP display and payment approval are handled there. Payment updates are communicated back to your app via the [postMessage Web API](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage). See [what happens after redirect](#what_happens_after_redirect) and [handling postMessage events](#handle_events_from_redirect) for details.

    
> **Tip: Action**
> Redirect to the dashboard link.

  
### Errors

If you receive an error **other than** `403 insufficient_permissions_continue_on_dashboard`, it usually means the payment parameters are invalid. GoCardless always returns validation errors first, before checking whether SCA is required. For example, if a payment contains invalid parameters, you'll receive a `422` error — fix the input before redirecting the user to the dashboard.

## Outbound Payment Completion

In your app, make sure to show the CoP results to the user before they approve the payment. This helps them confirm that the payment is going to the correct recipient.

Once the user has reviewed the CoP results and is ready to proceed, call the [Approve Outbound Payment API](/docs/send-money/send-an-outbound-payment/approve-an-outbound-payment) to submit the payment to the banks.

> **Tip: Action**
> Display CoP results for the user to review, then call the [Approve Outbound Payment
>   API](/docs/send-money/send-an-outbound-payment/approve-an-outbound-payment) to submit the payment.

## What happens after redirect

Once your user is redirected to the dashboard link, they will see the _GoCardless Sign-In_ page. They must enter their GoCardless username and password.

![Image -> Sign In](/images/docs/send-money/strong-customer-authentication/screenshot_2025-10-02_at_15.28.22.png)

After successfully logging in, the user will be taken to the _Outbound Payment Review_ page, where they can view the payment details provided by your app, along with the CoP results for the payment.

![Image: Outbound Payments -> Review](/images/docs/partner-integrations/sending-money/screenshot_2025-11-24_at_18.33.10.png)

If the user is satisfied with the payment details, they can click "_Send payment_". They will then receive an SMS with an authorisation code, which they must enter to approve the payment.

![Image: Outbound Payments For Partners -> SCA dialog](/images/docs/partner-integrations/sending-money/screenshot_2025-11-24_at_18.38.01.png)

Entering the code completes SCA and approves the payment. The payment will then be submitted shortly and recorded as originating from your app.

![Image: Outbound Payments For Partners -> Success](/images/docs/partner-integrations/sending-money/screenshot_2025-11-27_at_16.24.20.png)

## Handle events from redirect

When your app opens a dashboard link in a new browser window or tab, the dashboard flow will send information back to your app using [window.opener.postMessage](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage).

#### Example:

- Your app opens a new tab (e.g., a redirect link from GoCardless):

```javascript
const gocardlessTab = window.open(gocardlessDashboardUrl, "\_blank");
```

- The dashboard flow runs in that new tab.
- When something happens (e.g., a payment is approved or errored), the dashboard sends a message back to your app:

```javascript
window.opener.postMessage(,
});
```

- Your app receives and handles the message using a message event listener.

#### How to add a Message Listener in Your App:

The GoCardless dashboard flow currently sends two types of events:

- **"success"** means SCA was completed and the payment was created. The event payload includes the outbound payment ID, which you can use to track its status if needed.
- **"failure"** can occur for several reasons, such as a failed or expired SCA or an error while creating the payment. In these cases, the dashboard flow will display an error screen explaining what went wrong.

In the page that opened the new tab, add:

```javascript
window.addEventListener("message", (event) => 

  if (event.data.eventName === "success") 

  if (event.data.eventName === "failure") 
});
```

It's possible for a user to abandon the flow before completing it by closing the tab or popup window. Because `postMessage` cannot detect when a window is closed, you'll need to use window polling if you want to track and handle this scenario in your app:

```javascript
const gocardlessTab = window.open(gocardlessDashboardUrl, "_blank");

// Check every 500ms whether popup was closed
const timer = setInterval(() => 
}, 500);
```

## What's Next?

  
#### [Import outbound payments](/docs/partner-integrations/importing-outbound-payments)

Send batches of outbound payments for merchant approval via the GoCardless dashboard.

  
#### [Webhooks for partners](/docs/partner-integrations/webhooks-for-partners)

Track payment status changes in real time with webhook events.