API Reference

Create payment

Create a pending payment and return a hosted checkout payment link.

POSThttps://api.argonpay.app/graphqlpayment

Creates a pending merchant payment and returns a hosted paymentLink. Requires an existing custodian for the API key.

Does not debit a query on create. A query is consumed later when the payment is started on-chain (hosted checkout / start flow).

Endpoint

POST https://api.argonpay.app/graphql

Mutation

GraphQL
mutation Payment($apiKey: String!, $amount: Float!) {
payment(apiKey: $apiKey, amount: $amount) {
code
message
paymentLink
transaction {
txnid
amount
status
createdAt
expiresAt
}
}
}

Arguments

NameTypeRequiredDescription
apiKeyString!YesYour API key
amountFloat!YesPayment amount

Example variables

JSON
{
"apiKey": "YOUR_API_KEY",
"amount": 25.5
}

Success shape

JSON
{
"data": {
"payment": {
"code": 200,
"message": "Transaction created successfully",
"paymentLink": "https://argonpay.app/pay?txnid=...",
"transaction": {
"txnid": "...",
"amount": 25.5,
"status": "PENDING"
}
}
}
}

Redirect your customer to paymentLink to complete network selection and deposit.

REST equivalent

See REST create payment (POST /create-payment).