Reference
Mutations

Mutations

WARNING

GetPaid GraphQL API is in alpha build and is subject to change without warning. While the overall schemas will not vary much, the fields could undergo major revision. (see GraphQL Best Practices for Versioning (opens in a new tab))

About Mutations

In a GraphQL schema, the root type has a mutation type that defines operations for changing data on the server. These operations are similar to HTTP methods such as POST, PATCH, and DELETE.

Specification

commitTransaction

This mutation commits the transaction for processing.

INPUT FIELDS

RETURN FIELDS ( CommitTransactionPayload )
NameDescription
transaction ( Transaction )

Returns a Transaction object after a successful withdrawal. The Transaction must already be in a preview state, before committing. This mutation is typically called after createTransaction has been performed.(see Registering a Withdrawal).


createTransaction

This mutation creates a new transaction.

INPUT FIELDS

RETURN FIELDS ( CreateTransactionPayload )
NameDescription
transaction ( Transaction )

Returns the transaction that was just created. If successful, the transaction returned will be in a preview state. (see Registering a Withdrawal).


createUser

Creates a new user. Typically used to sign up a new User.

INPUT FIELDS

RETURN FIELDS ( CreateUserPayload )
NameDescription
user ( User )

Returns the user that was just created.


deleteUser

Deletes an existing User.

INPUT FIELDS

RETURN FIELDS ( DeleteUserPayload )
NameDescription
message ( Message )

If the deletion is successful, returns a success message.


loginUser

Performs a User login.

INPUT FIELDS

RETURN FIELDS ( LoginPayload )
NameDescription
user ( User )

Returns the respective User record.


loginUserWithToken

This allows for an alreadty logged in User to extend their token expiry or continue to stay logged in. Requires a valid Authorization token as part of the request header.

INPUT FIELDS

  • None
RETURN FIELDS ( LoginUserWithTokenPayload )
NameDescription
linkedup ( boolean )

This is the linkedup boolean field.

token ( string )

This is the token field.

user ( User )

Returns a user.


updateBankAccount

Allows updates to a User's Bank Account information.

INPUT FIELDS

RETURN FIELDS ( UpdateBankAccountPayload )
NameDescription
bankAccount ( BankAccount )

Returns a Bank Account object.


updateProfile

Allows updates to a User's Profile information.

INPUT FIELDS

RETURN FIELDS ( UpdateProfilePayload )
NameDescription
user ( User )

Returns the relevant User record.


updateUserPassword

Allows for updates to a User's password.

INPUT FIELDS

RETURN FIELDS ( UpdateUserPasswordPayload )
NameDescription
message ( Message )

Returns a message confirming the result of the change in user password.

Last updated on January 4, 2023