PHPackages                             placetopay/bancolombia-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. placetopay/bancolombia-sdk

ActiveLibrary[API Development](/categories/api)

placetopay/bancolombia-sdk
==========================

A library to connect with Bancolombia APIs

1.0.0(4y ago)03.7k4[1 PRs](https://github.com/placetopay-org/bancolombia-sdk/pulls)MITPHPPHP ^7.4|^8.0

Since May 4Pushed 4y ago4 watchersCompare

[ Source](https://github.com/placetopay-org/bancolombia-sdk)[ Packagist](https://packagist.org/packages/placetopay/bancolombia-sdk)[ RSS](/packages/placetopay-bancolombia-sdk/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (6)Versions (6)Used By (0)

Bancolombia Button SDK
======================

[](#bancolombia-button-sdk)

Allows to connect with the payments button provided by Bancolombia

Docs

Installation
------------

[](#installation)

```
composer require placetopay/bancolombia-sdk
```

Usage
-----

[](#usage)

### Create an instance of the library

[](#create-an-instance-of-the-library)

Provide the configuration settings for the process, you can find the client ID in the apps page  but the secret will display only when the app is created, after that it cannot be obtained again.

Hash is the value that would be translated to commerceTransferButtonId on them. This value will be provided by them

```
$clientId = 'YOUR APP CLIENT ID';
$clientSecret = 'YOUR APP SECRET';
$hash = 'h4ShG3NER1C';
$bancolombia = \PlacetoPay\BancolombiaSDK\BancolombiaButton::load($clientId, $clientSecret, $hash);
```

### Create a new payment intent

[](#create-a-new-payment-intent)

This will return an URL in which the user should be redirected to complete the process

```
try {
    $result = $bancolombia->request([
        'reference' => 'YOUR_UNIQUE_REFERENCE',
        'description' => 'SOME TEXT TO DISPLAY',
        'amount' => 32178,
        'returnUrl' => 'URL_IN_WHICH_THE_USER_WILL_RETURN',
        'confirmationUrl' => 'URL_TO_RECEIVE_THE_CALLBACK',
    ]);

    // Gives the URL to send the user to
    $result->processUrl();
    // Gives the transfer code that identifies this session on Bancolombia
    $result->code();
    // Gives the id for the transference process
    $result->id();
} catch (\PlacetoPay\BancolombiaSDK\Exceptions\BancolombiaException $e) {
    // Handle the exception
}
```

### Handling the callback

[](#handling-the-callback)

Once a transaction is finished a POST call will be sent to the confirmation URL provided previously, to handle that you just need to make that data into an array and pass it to the SDK

```
// Assuming that you dont use any framework
$posted = $_POST;

try {
    $result = \PlacetoPay\BancolombiaSDK\BancolombiaButton::handleCallback($posted, 'THE_SECRET');
    // Handle it the same way that querying it
} catch (\PlacetoPay\BancolombiaSDK\Exceptions\BancolombiaException $e) {
    // Signature failed, do not trust this information
}
```

### Query the status of a transference

[](#query-the-status-of-a-transference)

Although you should really rely on the callback to know the state of a payment, this service also provide you with the state of the payment

```
try {
    $result = $bancolombia->query('TRANSFER_CODE');
    if ($result->isApproved()) {
        // Well, they pay you, handle it, also you can use the reference and authorization for example to link the info
        // if you require it
    }

    if ($result->isPending()) {
        // They can still pay you
    }

    if ($result->isRejected()) {
        // There will be no money, you can try it again
    }
} catch (\PlacetoPay\BancolombiaSDK\Exceptions\BancolombiaException $e) {
    // Handle the exception
}
```

### Check the health status of the button

[](#check-the-health-status-of-the-button)

Allows to check if the service is running properly

```
try {
    $result = $bancolombia->health();
    if ($result->isHealthy()) {
        // All OK
    }
} catch (\PlacetoPay\BancolombiaSDK\Exceptions\BancolombiaException $e) {
    // Handle the exception
}
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 94.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~40 days

Total

5

Last Release

1726d ago

Major Versions

0.1.3 → 1.0.02021-10-11

PHP version history (2 changes)0.1.0PHP ^7.4

1.0.0PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/188a6d118a8949533ff4154931c90b50f20e0fdebfb98831fd215a50430cfa67?d=identicon)[placetopay](/maintainers/placetopay)

---

Top Contributors

[![dnetix](https://avatars.githubusercontent.com/u/4644865?v=4)](https://github.com/dnetix "dnetix (34 commits)")[![herodez](https://avatars.githubusercontent.com/u/9168620?v=4)](https://github.com/herodez "herodez (1 commits)")[![lauana-oh](https://avatars.githubusercontent.com/u/56528319?v=4)](https://github.com/lauana-oh "lauana-oh (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/placetopay-bancolombia-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/placetopay-bancolombia-sdk/health.svg)](https://phpackages.com/packages/placetopay-bancolombia-sdk)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69735.1M159](/packages/algolia-algoliasearch-client-php)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
