GoCardlessDeveloper Docs
Create a sandbox account

Logo

View as Markdown

Logos are image uploads that, when associated with a creditor, are shown on the billing request flow payment pages.

Create a logo associated with a creditor#

POST/branding/logos

Creates a new logo associated with a creditor. If a creditor already has a logo, this will update the existing logo linked to the creditor.

We support JPG and PNG formats. Your logo will be scaled to a maximum of 300px by 40px. For more guidance on how to upload logos that will look great across your customer payment page and notification emails see here.

POST https://api.gocardless.com/branding/logos HTTP/1.1
Content-Type: application/json
{
  "logos": {
    "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAA",
    "links": {
      "creditor": "CR123"
    }
  }
}
@client.logos.create_for_creditor(
  params: {
    image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAA",
    links: {
      creditor: "CR123"
    }
  }
)
client.logos.create_for_creditor(params={
  "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAA",
  "links": {
    "creditor": "CR123"
  }
})
const logo = await client.logos.createForCreditor({
  image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAA",
  links: {
    creditor: "CR123"
  }
});
$client->logos()->createForCreditor([
  "params" => [
    "image" => "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAA",
    "links" => [
      "creditor" => "CR123"
    ]
  ]
]);
Logo logo = client.logos().createForCreditor()
  .withImage("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAA")
  .withLinksCreditor("CR123")
  .execute();
logoCreateForCreditorParams := gocardless.LogoCreateForCreditorParams{
  Image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAA",
  Links: &gocardless.LogoCreateForCreditorParamsLinks{
    Creditor: "CR123",
  },
}

logo, err := client.Logos.CreateForCreditor(ctx, logoCreateForCreditorParams)
var logoCreateForCreditorRequest = new GoCardless.Services.LogoCreateForCreditorRequest()
{
    Image = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAA",
    Links = new GoCardless.Services.LogoCreateForCreditorRequest.LogoLinks()
    {
        Creditor = "CR0123"
    }
};

var logoCreateForCreditorResponse = await client.Logos.CreateForCreditorAsync(logoCreateForCreditorRequest);
GoCardless.Resources.Logo creditorLogo = logoCreateForCreditorResponse.Logo;
Responsehttp
HTTP/1.1 201 OK
Content-Type: application/json
{
  "logos": {
    "id": "LO123"
  }
}
Request Body
logosobject
2 properties
imagestring

Base64 encoded string.

linksobject
1 properties
creditorstring

ID of the creditor the logo belongs to

Response 201

Resource created successfully

logosobject
1 properties
idstring

Unique identifier, beginning with "LO".

Errors 400401404422500
400

Bad Request

401

Unauthorised

404

Not found

422

Validation Error

500

Internal Error

Error Body
codeinteger
documentation_urlstring
errorsarray
2 properties
reasonstring
messagestring
messagestring
request_idstring
typestring
metadataobject
linksobject