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 3d 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 68% 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

1676d 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

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

517.9M7](/packages/avalara-avataxclient)[commercetools/commercetools-sdk

The official PHP SDK for the commercetools Composable Commerce APIs

19281.5k](/packages/commercetools-commercetools-sdk)[alexacrm/dynamics-webapi-toolkit

Web API toolkit for Microsoft Dynamics 365 and Dynamics CRM

81324.1k1](/packages/alexacrm-dynamics-webapi-toolkit)[tamara-solution/php-sdk

Tamara PHP Client Library

10259.4k1](/packages/tamara-solution-php-sdk)

PHPackages © 2026

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