Payment Methods
Use addPaymentMethod to create a new payment method for a customer. You can then use the paymentMethod ID in mutations that require a payment method.
Example
mutation {
addPaymentMethod(
customer: "TWVyY2hhbnRDdXN0b21lci05ODFmYzVjMy1jNjYwLTQyMzAtYTgzNi0xM2EyOWZlMjRiOWY="
paymentMethodType: "mtn_momo"
ownership: first_party
fields: [
{ identifier: "name", value: "Jane Doe" }
{ identifier: "phone_number", value: "0246977890" }
]
) {
id
value # Friendly label (e.g., “Jane - 0246977890”)
fields {
identifier
value
}
}
}Arguments
customer
ID!
Yes
Global ID of the customer who owns the payment method.
paymentMethodType
String!
Yes
Identifier of the rail to add (MoMo, bank transfer, etc.). Payment rails.
fields
[P2PPaymentMethodFieldInput!]!
Yes
Key–value pairs that capture the details required by the rail. Filling fields.
ownership
P2PPaymentMethodOwnership
No
Enum indicating if the payment method is first_party or third_party
Filling fields
Call
p2pPaymentMethodTypesto list available payment rails.Render inputs for each
fielddefinition in the chosen payment rail.Collect the user’s answers and map them to
{ identifier, value }objects.
Example for “GH · MTN Mobile Money”:
Last updated