Transactions Submit
February 14, 2023 at 10:38 AMA mutation to submit a transaction looks like this:
mutation ($input: SubmitTransactionInput!) {
transactions {
submit(input: $input) {
transaction {
id
number
status
date
total
response {
message
}
}
}
}
}
{
"input": {
"product": "ji12sd4c0a3D0=",
"inputs": {
"accountNumber": "+13051231234",
"amount": 50
}
}
}
{
"data": {
"transactions": {
"submit": {
"transaction": {
"id": "VlVkc2R3VlBSRVU5=",
"number": "00830981",
"status": "COMPLETED",
"date": "2018-06-08T21:34:49-04:00",
"total": 50.4,
"response": {
"message": "The phone +13051231234 has been recharged successfully with $50.00."
}
}
}
}
}
}
Your API credentials must have permissions to send transactions without a valid payment method, otherwise please refer to Pay With Credit Card to fill card information to process a transaction payment.
A success transaction must have status COMPLETED
. In some cases the status PENDING
can be accepted
for transaction requiring a manual action or when take more time to process like unlocks.
The
inputs
field in the mutation is aDynamicObject
and the content depends of the product inputs. Some GraphQL tools display a warning when try to send theinputs
as is, anyway the mutation works fine. In any case you can send the inputs as a string using a JSON object notation.
Sending inputs as JSON object:
{
"input": {
"product": "ji12sd4c0a3D0=",
"inputs": "{\"accountNumber\": \"+13051231234\",\"amount\": 50}"
}
}
Phone numbers must be formatted using E.123 international notation. Spaces or others symbols to separate groups of numbers are optional.