Skip to main content

API Keys

Retrieve or create yur API Key from the dashboard. Learn more about it here.

Create a payment

Use this simple payment intent payload to create a payment for any arbitrary amount.

Currencies

Your customers can pay you with any currency of their choice, we automatically settle it for you.

Idempotency

We support idempotent requests to help you retry safely without creating duplicate payments.

Payment schema

The create invoice API supports many more parameters to adapt to your business needs, read more here.

Redirect your customer

You can pass redirect_url to send your customers to a custom link. It supports dynamic data as well.
Example payload used; metadata can be changed (or removed) to any key-value items of your choice.
POST https://api.bitgpt.xyz/invoices

{
  customer_email: "example@gmail.com",
  items: [
    {
      type: "PAYMENT_INTENT",
      currency: "GBP",
      price: "10"
    }
  ],
  metadata: {
    any_custom_key_1: "any_custom_value_1",
    any_custom_key_2: "any_custom_value_2"
  }
}
cURL
curl -X POST https://api.bitgpt.xyz/invoices \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_email": "example@gmail.com",
    "items": [
      {
        "type": "PAYMENT_INTENT",
        "currency": "GBP",
        "price": "10"
      }
    ],
    "metadata": {
      "any_custom_key_1": "any_custom_value_1",
      "any_custom_key_2": "any_custom_value_2"
    }
  }'

Redirect to checkout

Redirect the customer to https://pay.bitgpt.xyz/{response.data.id}
The invoice id at response.data.id will look like this: invoice_0197c626-8ab2-7ab6-8a20-78ae53a606d3

Handle webhooks

Webhook handling recipe

Use the recipe for webhook handling to listen to status changes and invoice completion.