generatePayMeRequest
Overview
This mutation takes in a slug (PayMe handle) and generates a payment request on behalf of a business for a specific amount. Used for pay-me page.
Special Considerations
- Only gets the first membership/account associated with the input slug.
- The slug passed in must be a Business account.
Inputs
GeneratePayMeRequestArgs
Required Data
slug: string amount: float description (optional): string
Returns
Promise<GeneratePayMeRequestResult>
A promise containing the following data:
paymentRequestId: ID
Example
Running this mutation:
mutation { generatePayMeRequest (data: { slug: "pay-me" amount: 50 description: "testing" }) { paymentRequestId } }
Gives us:
{
"data": {
"generatePayMeRequest": {
"paymentRequestId": "ckb9th6fv00cg0716rzpy15a6"
}
}
}
Common Errors
When running this mutation some of the common errors encountered include:
This PayMe Handle is not in use. (I-5101)
- The PayMe handle you requested from is not in use.
Generating payments to personal accounts is not currently supported. (I-5102)
- You can only pay a business account currently.