Build payments into your product with MyTPE Pay. Start integrating →
Logo
API reference

Bank accounts

Manage the settlement RIBs that MyTPE pays your collected funds into.

A bank account is the RIB that settlements are paid into. The account_number is the 20‑digit Algerian RIB; MyTPE derives bank_code from it. Every bank account belongs to one identification and must be accepted before it can back a payment instance.

Statuses reference

Bank account status values (pending, accepted, refused) are defined in Statuses & enums → KYC.

Endpoints

MethodPathDescription
GET/bank-accountsList bank accounts (paginated).
POST/bank-accountsCreate a bank account.
GET/bank-accounts/{id}Retrieve one bank account.
PUT/bank-accounts/{id}Update a bank account.
DELETE/bank-accounts/{id}Delete a bank account.

The bank account object

FieldTypeDescription
idstring (uuid)Unique identifier.
account_numberstring20‑digit RIB.
bank_codestringBank code derived from the RIB.
statusstringKYC status — see statuses.
reasonstring | nullReason when refused.
identification_idstring (uuid)Parent identification.
identificationobject{ id, name } when loaded.
created_at / updated_atstring (ISO 8601)Timestamps.

List bank accounts

Query parameters: search, sort_by, sort_dir, per_page.

Request
curl "https://api.mytpe.appp/api/ext/bank-accounts?per_page=15" \
  -H "X-Api-Key: $MYTPE_API_KEY" \
  -H "X-Api-Secret: $MYTPE_API_SECRET"
200 OK
{
  "data": [
    {
      "id": "2d3e4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a",
      "account_number": "00799999000123456789",
      "bank_code": "007",
      "status": "accepted",
      "reason": null,
      "identification_id": "0b1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
      "created_at": "2026-06-09T10:10:00.000000Z",
      "updated_at": "2026-06-09T11:00:00.000000Z"
    }
  ],
  "links": { "first": "...?page=1", "last": "...?page=1", "prev": null, "next": null },
  "meta": { "current_page": 1, "from": 1, "to": 1, "per_page": 15, "last_page": 1, "total": 1 }
}

Create a bank account

FieldTypeRequiredNotes
account_numberstringyesExactly 20 digits, valid RIB checksum.
identification_iduuidyesMust be an existing identification.
Request
curl -X POST https://api.mytpe.appp/api/ext/bank-accounts \
  -H "X-Api-Key: $MYTPE_API_KEY" \
  -H "X-Api-Secret: $MYTPE_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "account_number": "00799999000123456789",
    "identification_id": "0b1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f"
  }'
201 Created
{
  "data": {
    "id": "2d3e4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a",
    "account_number": "00799999000123456789",
    "bank_code": "007",
    "status": "pending",
    "reason": null,
    "identification_id": "0b1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
    "created_at": "2026-06-09T10:10:00.000000Z",
    "updated_at": "2026-06-09T10:10:00.000000Z"
  }
}

Retrieve a bank account

Request
curl https://api.mytpe.appp/api/ext/bank-accounts/2d3e4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a \
  -H "X-Api-Key: $MYTPE_API_KEY" \
  -H "X-Api-Secret: $MYTPE_API_SECRET"
200 OK
{
  "data": {
    "id": "2d3e4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a",
    "account_number": "00799999000123456789",
    "bank_code": "007",
    "status": "accepted",
    "reason": null,
    "identification_id": "0b1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
    "identification": { "id": "0b1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f", "name": "Boutique Centrale SARL" },
    "created_at": "2026-06-09T10:10:00.000000Z",
    "updated_at": "2026-06-09T11:00:00.000000Z"
  }
}

Update a bank account

Accepts the same fields as create.

Request
curl -X PUT https://api.mytpe.appp/api/ext/bank-accounts/2d3e4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a \
  -H "X-Api-Key: $MYTPE_API_KEY" \
  -H "X-Api-Secret: $MYTPE_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{ "account_number": "00811111000987654321" }'
200 OK
{
  "data": {
    "id": "2d3e4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a",
    "account_number": "00811111000987654321",
    "bank_code": "008",
    "status": "pending",
    "reason": null,
    "identification_id": "0b1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
    "created_at": "2026-06-09T10:10:00.000000Z",
    "updated_at": "2026-06-09T12:00:00.000000Z"
  }
}

Delete a bank account

Request
curl -X DELETE https://api.mytpe.appp/api/ext/bank-accounts/2d3e4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a \
  -H "X-Api-Key: $MYTPE_API_KEY" \
  -H "X-Api-Secret: $MYTPE_API_SECRET"
200 OK
{ "message": "Bank account deleted." }

A bank account that a payment instance depends on cannot be deleted while the instance exists.

On this page