Create Payment

HTTP Method: POST
Endpoint URL: /payment
Description: Creates a new payment record.
Security: Requires both API-KEY and X-HMAC headers.

Request Headers

  • Content-Type: application/json
  • API-KEY: your_account_api_key
  • X-HMAC: your_hmac_signature

Request Body (JSON)

{
	"amount": "1000.00",
	"asset": { "short": "USDT", "network": "tron" },
	"customer": {
		"id": 12312312,
		"name": "John",
		"email": "[email protected]"
	},
	"invoice": "INV-001",
	"checkoutUrl": "https://your-shop.com/orders/40113049"
}

Example cURL

curl https://api.alppay.io/v2/payment \
	-X POST \
	-H "Content-Type: application/json" \
	-H "API-KEY: ak_live_1234567890abcdef" \
	-H "X-HMAC: your_calculated_signature" \
	-d '{"amount":"1000.00","asset":{"short":"USDT","network":"tron"},"customer":{"id":12312312,"name":"John","email":"[email protected]"},"invoice":"INV-001","checkoutUrl":"https://your-shop.com/orders/40113049"}'

Successful Response (200 OK)

{
	"id": "285d8dce-7663-4580-ba7f-8afb2f2d3292",
	"transactions": [
		{
		"paymentId": "285d8dce-7663-4580-ba7f-8afb2f2d3292",
		"txnId": "0xe7238caa68382485141be0443d6ba7efd0bd9f6bac5a624bd059acc53af1bf1d19",
		"receivedAmount": "20.00",
		"asset": {
			"short": "USDT",
			"name": "Tether",
			"logoUrl": "https://cryptologos.cc/logos/tether-usdt-logo.png",
			"network": "tron"
		},
		"destTag": null,
		"addressFrom": "0x5D8D9C7f68A46634BCEaD2a6FF166A0BdFb08540",
		"addressTo": "0x5D8D9C7f68A46634BCEaD2a6FF166A0BdFb08540",
		"date": "2025-05-20T12:34:56Z"
		}
	],
	"amount": "1000.00",
	"totalReceivedAmount": "20.00",
	"asset": {
		"short": "USDT",
		"name": "Tether",
		"logoUrl": "https://cryptologos.cc/logos/tether-usdt-logo.png",
		"network": "tron"
	},
	"addressTo": "0x5D8D9C7f68A46634BCEaD2a6FF166A0BdFb08540",
	"confirmsNeeded": 10,
	"timeout": 9000,
	"checkoutUrl": "https://your-shop.com/orders/40113049",
	"status": "OPEN",
	"customer": {
		"id": 12312312,
		"name": "John",
		"email": "[email protected]"
	},
	"merchant": {
		"id": "285d8dce-7663-4580-ba7f-8afb2f2d3292",
		"name": "Your Company",
		"siteUrl": "https://your-shop.com",
		"logoUrl": "https://your-shop.com/logo.svg",
		"email": "[email protected]"
	},
	"invoice": "INV-001",
	"paymentRedirectUrl": "https://a-pay-system.com/en/invoice?id=285d8dce-7663-4580-ba7f-8afb2f2d3292",
	"createdAt": "2025-05-20T12:34:56Z",
	"updatedAt": "2025-05-20T12:34:56Z"
}