0
votes

We are using AuthOnlyTransaction, and later PriorAuthCaptureTransaction transaction types to authorize and capture order charges.

We would like to add a subscription option, which would follow the same scenario - user funds are first authorized, then captured.

There is currently a way to Create ARB Subscription from Transaction in the Sanbox GUI, Sandbox > Unsettled Transactions > Pick on auth-only transaction > Click "Create ARB Subscription from Transaction":

enter image description here

How can we create an ARB Subscription for an authorized charge from the API?

1

1 Answers

1
votes

You can create a customer profile and payment profile using the CIM API when you first get your authorization. Then once you are ready to create the subscription you can create it using those profile IDs.

Here is sample XML:

<?xml version="1.0" encoding="utf-8"?>
<ARBCreateSubscriptionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
    <merchantAuthentication>
        <name>API_USERNAME</name>
        <transactionKey>API_TRANSACTION_KEY</transactionKey>
    </merchantAuthentication>
    <refId>Sample</refId>
    <subscription>
        <name>Sample subscription</name>
        <paymentSchedule>
            <interval>
                <length>1</length>
                <unit>months</unit>
            </interval>
            <startDate>2020-08-30</startDate>
            <totalOccurrences>12</totalOccurrences>
            <trialOccurrences>1</trialOccurrences>
        </paymentSchedule>
        <amount>10.00</amount>
        <trialAmount>0.00</trialAmount>
        <profile>
            <customerProfileId>12345678</customerProfileId>
            <customerPaymentProfileId>987654342</customerPaymentProfileId>
        </profile>
    </subscription>
</ARBCreateSubscriptionRequest>