Payments

Create a payment

Create an online or offline payment for an invoice, payment request, or credit grant.

POST
/payments

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://api.sandbox.billingrails.com/v1/payments" \  -H "Content-Type: application/json" \  -d '{    "mode": "offline",    "account_id": "acc_IhMUl3rrZ3",    "reference_id": "PAY-REF-001",    "invoice_id": "inv_IhMUl3rrZ3"  }'
{
  "payment": {
    "object": "payment",
    "id": "pay_IhMUl3rrZ3",
    "account_id": "acc_IhMUl3rrZ3",
    "amount": 1000,
    "currency": "USD",
    "description": "Payment for invoice INV-0001",
    "reference_id": "PAY-REF-001",
    "status": "succeeded",
    "created_at": "2025-02-14T17:33:40.843Z"
  },
  "payment_link": "http://example.com"
}