UseePay API
  1. Invoices
UseePay API
  • Introduction
  • Product Overview
  • Authentication
  • Errors
  • Changelog
  • Integration
    • Get started with online payments
    • Get started with subscriptions
  • Payment Intents
    • Create a PaymentIntent
      POST
    • Retrieve a PaymentIntent
      GET
    • Update a PaymentIntent
      POST
    • Confirm a PaymentIntent
      POST
    • Cancel a PaymentIntent
      POST
    • Capture a PaymentIntent
      POST
    • List all payment intents
      GET
  • Customers
    • Create a customer
      POST
    • Retrieves a customer
      GET
    • Update a customer
      POST
    • List all customers
      GET
  • Subscriptions
    • Create a subscription
      POST
    • Retrieves a subscription
      GET
    • Update a subscription
      POST
    • List all subscriptions
      GET
    • Cancel a subscription
      POST
  • Invoices
    • Create a invoice
      POST
    • Retrieves a invoice
      GET
    • Update a invoice
      POST
    • List all invoices
      GET
    • Pay a invoice
      POST
  • Payment Methods
    • Create a payment method
    • Retrieves a payment method
    • Update a payment method
    • List all payment methods
  • Mandates
    • Create a mandate
    • Retrieves a mandate
    • Update a mandate
    • List all mandates
  • Refunds
    • Create a refund
    • Retrieves a refund
    • Update a refund
    • List all refunds
  • Webhooks
    • Webhook envents
    • Create a webhook
    • Retrieves a webhook
    • Update a webhook
    • List all webhooks
  • Payment Links
    • Create a payment link
    • Retrieves a payment link
    • Update a payment link
    • List all payment links
  • Embedded Checkout
    • Payment Elements
  • About Testing
    • Test Cards
    • ApplePay&GooglePay
  1. Invoices

Create a invoice

POST
/api/v1/invoices/create

Request

Header Params

Body Params application/json

Example
{
    "collection_method":"send_invoice"
    ,"currency":"USD"
    ,"customer_id":"{{customer-id}}"
    ,"description":"invoice desc"
    ,"metadata":{
        "youid":"your param"
    }
    ,"subscription_id":"{{subscription-id}}"
    ,"days_until_due":1
    ,"footer":"Footer to be displayed on the invoice"
 
    ,"total_amount":112
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://openapi1.uat.useepay.com/api/v1/invoices/create' \
--header 'x-merchant-no: 500000000007245' \
--header 'x-api-key: FUYTIUvjhgfytfuytwiue' \
--header 'x-app-id: www.pay.com' \
--header 'Content-Type: application/json' \
--data-raw '{
    "collection_method":"send_invoice"
    ,"currency":"USD"
    ,"customer_id":"cus_1JA7UDDQG3800"
    ,"description":"invoice desc"
    ,"metadata":{
        "youid":"your param"
    }
    ,"subscription_id":"sub_1JBQUBE5K0000"
    ,"days_until_due":1
    ,"footer":"Footer to be displayed on the invoice"
 
    ,"total_amount":112
}'

Responses

🟢200Success
application/json
Body

Example
{
    "id": "inv_1JBQRUTEC0000",
    "code": null,
    "source": null,
    "message": null,
    "currency": "JPY",
    "description": "invoice desc",
    "metadata": {
        "youid": "your param"
    },
    "status": "open",
    "footer": "Footer to be displayed on the invoice",
    "number": "invoicenum000000001",
    "merchant_no": "500000000007264",
    "app_id": "www.pay.com",
    "create_at": "2024-10-28T07:17:43Z",
    "modify_at": "2024-10-28T07:17:43Z",
    "decline_code": null,
    "doc_url": null,
    "collection_method": "send_invoice",
    "customer_id": "cus_1JA7UDDQG3800",
    "hosted_invoice_url": null,
    "payment_intent": null,
    "period_end": null,
    "period_start": null,
    "subscription_id": "sub_1JBQGL23O0000",
    "total_amount": 112
}
🟠400Bad Request
Modified at 2025-04-01 08:34:04
Previous
Cancel a subscription
Next
Retrieves a invoice
Built with