Skip to main content

Documentation

Creating a Card Payment with a Network Reference ID

Create a card payment using a network reference ID.

Note

This feature is not relevant to subscriptions.

When you create a payment, you can use a network reference ID instead of the CVV inside payment_method.fields.

Reasons to create a payment with a network reference ID include:

  • While you cannot store a CVV, you can store and reuse a network reference ID.

  • Rapyd does not require 3DS authentication by default for a payment with a network reference ID.

Rapyd provides a network reference ID in the following scenarios:

  • When you create an initial payment with all of the required card fields, including cvv.

  • When you add a card payment method to a customer.

You also can use a network reference ID provided by an external card acquirer.

Prerequisites

How

The procedure is made up of the following steps:

  1. Create a Payment to Generate a Network Reference ID

  2. Create a Payment Using a Network Reference ID

Generate a Network Reference ID

Create an initial payment as described in Create Payment, with the following settings:

  • payment_method - Specify an object that contains all the required fields for a card payment method, including the cvv field.

Initial Create Payment request - partial

{
    "payment_method": {
        "type": "at_visa_card",
        "fields": {
            "number": "4111111111111111",
            "expiration_month": "12",
            "expiration_year": "23",
            "cvv": "123",
            "name": "John Doe"
        }
    },

//         . . .

}

Initial response - partial

   "data": {

//         . . .

        "payment_method_data": {

//         . . .
            "network_reference_id": "090238024661297"
        },

//         . . .

    }

For a full code example, see Payment by card on Create Payment.

The response shows:

  • In the payment_method_data object: network_reference_id - The network reference ID.

The network reference ID also appears in Webhook - Payment Succeeded.

Create a Payment Using a Network Reference ID

Prerequisites

A network reference ID generated by one of the following:

How

Create a subsequent payment with the following settings:

  • payment_method - Specify an object that contains all the required fields for the card payment method. Use the network_reference_id field instead of the cvv field.

Subsequent Create Payment request - partial

{
    "payment_method": {
        "type": "at_visa_card",
        "fields": {
            "number": "4111111111111111",
            "expiration_month": "12",
            "expiration_year": "23",
            "network_reference_id": "090238024661297",
            "name": "John Doe"
        }
    },

//         . . .

}

For a full code example, see Payment with network reference ID on Create Payment.

Note

For all subsequent payments, you must use the initial network reference ID. The response in each subsequent payment contains a different network reference ID, which you do not use.