Paygate Docs

Entity IDs

Map your internal identifiers to Paygate charge IDs.

Overview

Entity IDs let you attach your own identifiers — order IDs, subscription IDs, invoice numbers — to Paygate objects. This makes it easy to reconcile payments with your internal records without storing Paygate IDs in your database.

Register an entity ID

POST /v1/me/entity_ids
Authorization: Bearer sk_test_...
Content-Type: application/json
{
  "entity_id": {
    "entity_type": "order",
    "external_id": "order-9f3a1b"
  }
}

Response

{
  "id": "ei_01HXY...",
  "entity_type": "order",
  "external_id": "order-9f3a1b",
  "created_at": "2024-01-15T10:00:00.000Z"
}

List entity IDs

GET /v1/me/entity_ids
Authorization: Bearer sk_test_...

Optional filters: ?entity_type=order

Delete an entity ID

DELETE /v1/me/entity_ids/:id
Authorization: Bearer sk_test_...

Returns 204 No Content.

Common entity types

TypeExample external ID
orderorder-9f3a1b
subscriptionsub_monthly_99
invoiceinv-2024-01-001
customercust_12345
sessionsess_cart_abc

Entity types are free-form strings — use whatever naming convention matches your system.

On this page