Skip to Content
GuidesSubmitting Your First Invoice

Submitting Your First Invoice

This guide walks through the full flow: register a seller, register a buyer, create an invoice, and submit it.

1. Register a seller

bash
curl -X POST https://gateway.useyona.com/i/v1/sellers \
  -H "Authorization: Bearer sk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "partyName": "Acme Nigeria Ltd",
    "email": "billing@acme.ng",
    "phoneNumber": "+2348012345678",
    "taxNumber": "12345678-0001",
    "postalAddress": {
      "line1": "123 Commerce Street",
      "city": "Lagos",
      "state": "Lagos",
      "country": "NG"
    }
  }'

2. Register a buyer

bash
curl -X POST https://gateway.useyona.com/i/v1/buyers \
  -H "Authorization: Bearer sk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "partyName": "John Doe Enterprises",
    "email": "john@example.com",
    "phoneNumber": "+2349087654321",
    "postalAddress": {
      "line1": "456 Market Road",
      "city": "Abuja",
      "country": "NG"
    }
  }'

3. Create a draft invoice

bash
curl -X POST https://gateway.useyona.com/i/v1/invoices \
  -H "Authorization: Bearer sk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "sellerId": "SELLER_ID",
    "buyerId": "BUYER_ID",
    "invoiceNumber": "INV-2026-001",
    "invoiceDate": "2026-04-19",
    "lineItems": [{
      "description": "Consulting services",
      "hsnCode": "9983",
      "quantity": 10,
      "unitCode": "HUR",
      "unitPrice": 50000,
      "taxPercent": 7.5
    }]
  }'

4. Submit the invoice

bash
curl -X POST https://gateway.useyona.com/i/v1/invoices/INVOICE_ID/submit \
  -H "Authorization: Bearer sk_test_your_key_here"

In sandbox, the mock tax authority accepts within seconds. In production, this is irreversible.

5. Check the status

bash
curl https://gateway.useyona.com/i/v1/invoices/INVOICE_ID/status \
  -H "Authorization: Bearer sk_test_your_key_here"

Next steps

Last updated on