Billing Request With Action

Create a Billing Request with Actions

Creates a billing request and completes any specified actions in a single request. This endpoint allows you to create a billing request and immediately complete actions such as collecting customer details, bank account details, or other required actions.

<p class="restricted-notice"><strong>Restricted</strong>: this endpoint is restricted to [GoCardless Pro](https://gocardless.com/pricing) and [GoCardless Enterprise](https://gocardless.com/pricing) accounts with the [custom payment pages upgrade](https://hub.gocardless.com/s/article/Custom-payment-pages).</p> <p class="notice"><strong>Note</strong>: to modify data on an already created billing request, call individual action endpoints. Calling this endpoint creates a new billing request everytime.</p> <p class="notice--warning"><strong>Warning</strong>: ACH/PAD is not supported on this endpoint.</p>
post/billing_requests/create_with_actions

Request

  • Base URL
    https://api.gocardless.com
  • Auth
    HTTP bearer

Headers

GoCardless-Versionstring required

Request body

Example request

{
  "billing_request_with_actions": {
    "mandate_request": {
      "currency": "GBP",
      "scheme": "bacs",
      "reference": "REF-123",
      "description": "Top-up Payment"
    },
    "payment_request": {
      "description": "Top-up Payment",
      "currency": "GBP",
      "scheme": "faster_payments",
      "reference": "some-custom-ref"
    },
    "links": {
      "customer": "CU123",
      "customer_bank_account": "BA123",
      "creditor": "CR123"
    },
    "actions": {
      "collect_customer_details": {
        "customer": {
          "email": "user@example.com",
          "given_name": "Frank",
          "family_name": "Osborne",
          "company_name": "Hamilton Trading Ltd.",
          "language": "en",
          "phone_number": "+64 4 817 9999"
        },
        "customer_billing_detail": {
          "address_line1": "221B Baker Street",
          "address_line2": "Marylebone",
          "address_line3": "City of Westminster",
          "city": "London",
          "region": "Greater London",
          "postal_code": "NW1 6XE",
          "country_code": "GB",
          "swedish_identity_number": "556564-5404",
          "danish_identity_number": "2205506218",
          "ip_address": "127.0.0.1"
        }
      },
      "collect_bank_account": {
        "account_number": "55779911",
        "branch_code": "20-00-00",
        "iban": "GB60BARC20000055779911",
        "country_code": "GB",
        "currency": "EUR",
        "account_holder_name": "Billie Jean",
        "account_type": "savings",
        "account_number_suffix": "00"
      },
      "select_institution": {
        "institution": "monzo",
        "country_code": "GB"
      },
      "bank_authorisation_redirect_uri": "https://pay.gocardless.com/obauth/BAU123"
    }
  }
}

Response

Resource created successfully

Example response

{
  "billing_request_with_actions": {
    "billing_requests": {
      "id": "BRQ123",
      "created_at": "2015-01-01T12:00:00.000Z",
      "status": "pending",
      "account_information_request": {
        "country_code": "GB"
      },
      "mandate_request": {
        "description": "Top-up Payment",
        "currency": "GBP",
        "scheme": "bacs"
      },
      "payment_request": {
        "description": "Top-up Payment",
        "currency": "GBP",
        "scheme": "faster_payments",
        "amount": 1000,
        "app_fee": 100,
        "reference": "some-custom-ref"
      },
      "subscription_request": {
        "amount": 1000,
        "currency": "USD",
        "interval_unit": "monthly",
        "interval": 1,
        "app_fee": 100,
        "count": 5,
        "day_of_month": 28,
        "month": "january",
        "name": "12 month subscription",
        "payment_reference": "GOLDPLAN",
        "start_date": "2014-10-21"
      },
      "instalment_schedule_request": {
        "name": "Invoice 4404",
        "currency": "USD",
        "total_amount": 1000,
        "payment_reference": "GOLDPLAN",
        "app_fee": 100,
        "instalments_with_dates": [
          {
            "amount": 250,
            "charge_date": "2020-11-03"
          }
        ],
        "instalments_with_schedule": {
          "start_date": "2014-10-21",
          "interval": 1,
          "interval_unit": "monthly",
          "amounts": [
            1000
          ]
        }
      },
      "actions": [
        {
          "type": "collect_bank_account",
          "status": "pending",
          "required": true,
          "completes_actions": [
            "collect_bank_account"
          ],
          "requires_actions": [
            "collect_bank_account"
          ],
          "available_currencies": [
            "GBP"
          ],
          "available_country_codes": [
            "GB"
          ],
          "institution_guess_status": "pending"
        }
      ],
      "resources": {
        "customer": {
          "id": "CU123",
          "created_at": "2014-01-01T12:00:00.000Z",
          "email": "user@example.com",
          "given_name": "Frank",
          "family_name": "Osborne",
          "company_name": "Hamilton Trading Ltd.",
          "language": "en",
          "phone_number": "+64 4 817 9999"
        },
        "customer_billing_detail": {
          "id": "CU123",
          "created_at": "2014-01-01T12:00:00.000Z",
          "address_line1": "221B Baker Street",
          "address_line2": "Marylebone",
          "address_line3": "City of Westminster",
          "city": "London",
          "region": "Greater London",
          "postal_code": "NW1 6XE",
          "country_code": "GB",
          "swedish_identity_number": "556564-5404",
          "danish_identity_number": "2205506218",
          "ip_address": "127.0.0.1"
        },
        "customer_bank_account": {
          "id": "BA123",
          "created_at": "2014-01-01T12:00:00.000Z",
          "account_holder_name": "Billie Jean",
          "account_number_ending": "1234",
          "account_type": "savings",
          "country_code": "GB",
          "currency": "EUR",
          "bank_name": "BARCLAYS BANK PLC",
          "enabled": true,
          "bank_account_token": "bat_f975ab3c-ecee-47a1-9590-5bb1d56fa113",
          "payer_name_verification_result": "full"
        }
      },
      "links": {
        "customer": "CU123",
        "creditor": "CR123",
        "organisation": "OR123",
        "customer_bank_account": "BA123",
        "account_information_request": "AIR123",
        "payment_request": "PRQ123",
        "payment_request_payment": "PM123",
        "mandate_request": "MRQ123",
        "mandate_request_mandate": "MD123",
        "subscription_request": "SBR123",
        "subscription_request_subscription": "SB123",
        "instalment_schedule_request": "ISR123",
        "instalment_schedule_request_instalment_schedule": "IS123",
        "payment_provider": "PP123"
      }
    },
    "bank_authorisations": {
      "id": "BAU123",
      "redirect_uri": "https://my-website.com/abc/callback",
      "url": "https://pay.gocardless.com/obauth/BAU123",
      "qr_code_url": "https://pay.gocardless.com/obauth/BAU123/qr_code",
      "last_visited_at": "2020-01-01T12:00:00.000Z",
      "authorised_at": "2020-01-01T12:00:00.000Z",
      "links": {
        "billing_request": "BRQ123",
        "institution": "monzo"
      }
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.