HomeGuidesAPI ReferenceChangelog
Log In
Guides

PaymentMethod - Creating and Re-using

PaymentMethod – Creating and Reusing in Revolv3 API

Revolv3 allows merchants to create Payment Methods and reuse them for multiple invoices and transactions. This guide explains how to:

  1. Create a Payment Method (generate a PaymentMethodId for future transactions).

  2. Use an existing Payment Method (reference a stored PaymentMethodId to process payments).

Each section includes API endpoints, request examples, and detailed explanations of request and response fields.

  1. Creating a Payment Method

A Payment Method represents a stored customer payment credential (e.g., credit card or ACH) that can be reused across multiple transactions. Merchants can either:

Create a Payment Method before creating an invoice and store the returned PaymentMethodId.

Automatically generate a Payment Method when processing an invoice.

API Endpoint for Creating a Payment Method

https://api.revolv3.com/api/PaymentMethod

Sample API Request

{
  "BillingAddress": {
    "AddressLine1": "100 Main Street",
    "AddressLine2": "",
    "City": "Santa Ana",
    "State": "CA",
    "PostalCode": "90000",
    "Country": "US"
  },
  "BillingFirstName": "John",
  "BillingLastName": "Smith",
  "CreditCard": {
    "PaymentAccountNumber": "4111111111111111",
    "ExpirationDate": "1025",
    "SecurityCode": 123
  },
  "MerchantPaymentMethodRefId": "payment-method-ref-id_hgays-213-4rf4"
}

Explanation of API Request Fields*

FieldDescription
BillingAddressObject containing the customer’s billing address.
AddressLine1, AddressLine2, City, State, PostalCode, CountryFull billing address details.
BillingFirstName, BillingLastNameThe name associated with the payment method.
CreditCard.PaymentAccountNumberThe credit card number (must be securely transmitted).
CreditCard.ExpirationDateCard expiration date (Format: MMYY).
CreditCard.SecurityCodeThe CVV/CVC security code for authentication.
MerchantPaymentMethodRefIdA unique reference assigned by the merchant for tracking the payment method.
  1. Response When Creating a Payment Method

Upon successfully creating a Payment Method, the API returns a PaymentMethodId, which can be referenced in future payment requests.

Sample API Response

{
    "paymentMethodId": 16336,
    "billingAddressId": 17683,
    "billingAddress": {
        "addressId": 17683,
        "addressLine1": "100 Main Street",
        "addressLine2": "",
        "city": "Santa Ana",
        "state": "CA",
        "postalCode": "90000",
        "phoneNumber": null,
        "email": null,
        "country": "US"
    },
    "billingFirstName": "John",
    "billingLastName": "Smith",
    "merchantPaymentMethodRefId": "payment-method-ref-id_hgays-213-4rf4",
    "paymentMethodAchDetails": null,
    "paymentMethodCreditCardDetails": {
        "binNumber": "411111",
        "paymentLast4Digit": "1111",
        "paymentExpirationDate": "1025"
    }
}

Explanation of API Response Fields

FieldDescription
paymentMethodIdThe unique ID assigned to the stored payment method (used for future transactions).
billingAddressIdID assigned to the billing address associated with the payment method.
billingAddressObject containing full billing details.
paymentMethodCreditCardDetails.binNumberThe first six digits of the stored card (Bank Identification Number).
paymentMethodCreditCardDetails.paymentLast4DigitThe last four digits of the stored card.
paymentMethodCreditCardDetails.paymentExpirationDateThe card’s expiration date in MMYY format.
merchantPaymentMethodRefIdThe merchant-provided reference ID for the payment method.
  1. Reusing an Existing Payment Method for a Transaction

Once a PaymentMethodId has been created, it can be referenced in future transactions instead of passing full payment details again.

API Endpoint for Processing a Payment with a Stored Payment Method

https://api.revolv3.com/api/Payments/sale/\{paymentMethodId\}

Sample API Request

{
    "NetworkProcessing": {
        "processingType": "initialInstallment", //initialRecurring, initialInstallment , installment, recurring
        "originalNetworkTransactionId": null
    },
    "CustomerId": null, //optional add a customer ID - otherwise no customer is created
    "Invoice": {
        "MerchantInvoiceRefId": "ABC309500654810",
        "Amount": {
            "value": 1.03
        }
    }
}

Explanation of API Request Fields

FieldDescription
NetworkProcessing.processingTypeDefines the transaction type (initialInstallment, initialRecurring).
NetworkProcessing.originalNetworkTransactionIdUsed for referencing previous transactions (set to null for new payments).
CustomerIdOptional customer identifier (set to null if not used).
Invoice.MerchantInvoiceRefIdA unique identifier for tracking the invoice.
Invoice.Amount.valueThe total transaction amount in USD.
  1. Payment Response for a Successful Transaction

When a payment is successfully processed using a stored PaymentMethodId, the API returns transaction details, including invoice status and payment authorization.

Sample API Response

{
    "customerId": null,
    "invoiceId": 186011,
    "merchantInvoiceRefId": "ABC309500654810",
    "merchantPaymentMethodRefId": null,
    "networkTransactionId": "583676276256324",
    "invoiceStatus": "Paid",
    "invoiceAttemptStatus": "Success",
    "message": "Approved",
    "amount": {
        "currency": "USD",
        "value": 1.03
    },
    "paymentMethodId": 6061,
    "paymentMethodTypeId": 1
}

Explanation of API Response Fields

FieldDescription
invoiceIdThe unique invoice ID generated by Revolv3.
merchantInvoiceRefIdThe merchant’s reference ID for tracking the invoice.
networkTransactionIdThe transaction ID assigned by the payment network.
invoiceStatusStatus of the invoice (Paid, Pending, Failed).
invoiceAttemptStatusOutcome of the payment attempt (Success, Failed).
messageA response message indicating approval or failure reason.
amount.currencyThe currency of the transaction (USD).
amount.valueThe total transaction amount processed.
paymentMethodIdThe stored Payment Method ID used for the transaction.
paymentMethodTypeIdThe type of payment method (e.g., 1 for credit card).
  1. Summary of API Calls
ActionAPI EndpointPurpose
Create a Payment MethodPOST /api/PaymentMethodGenerates a PaymentMethodId for future transactions.
Process a Payment with a Stored Payment MethodPOST /api/Payments/sale/{paymentMethodId}Charges the stored payment method without requiring full details.