createPaymentMethod

This mutation allows the user to create a payment method.

Sample mutation

mutation{
  createPaymentMethod(orgID:"8fb128bd-f55d-4bcc-8b6c-0beb684e4d4e" input:{
    paymentType:CreditCard
    creditCardData:{
      keyID:"key1"
      encryptedData:"1"
      billingDetails:{
        name:"Tony Green"
        city:"Lemberg"
        address1:"Shop"
        address2:"1"
        country:"PL"
        district:"MZ"
        postalCode:"848585"
      }
      expirationYear:2025
      expirationMonth:4
      metadata:{
        email:"[email protected]"
        phoneNumber:"+146952354765"
      }
    }
  }){
    ... on CreditCardPaymentMethodOutput{
      id
      type
      status
      network
      last4Digit
      metadata{
        email
        phoneNumber
      }
      billingDetails{
        address1
        address2
        name
        country
        district
        city
        postalCode
      }
    }
  }
}

Arguments

Name

Type

Description

Required

orgID

UUID1

The organization ID.

Yes

input

Object

The input to create payment method.

Yes

Return

Name

Type

Description

PaymentMethodOutput

Object

Contains information from CreditCardPaymentMethodOutput, ACHPaymentMethodOutput ,and WirePaymentMethodOutput.