Happy Business Starts Here

How to create a Payment Method for the GoCardless using Order REST API

Highlighted
Zuora Support

How to create a Payment Method for the GoCardless using Order REST API

Questions: Is it possible to create the Payment Method as part of the Create order REST API these days for GoCardless.

 

Answers:

Yes, kindly use the below API call, this call will do a complete operation which means Account Creation, Subscription Creation, and Payment Method.

 

End Point URL:

Production: POST: https://rest.zuora.com/v1/orders

Sandbox: POST: https://rest.apisandbox.zuora.com/v1/orders

 

Sample Full Payload:

 

Request:

POST: https://rest.apisandbox.zuora.com/v1/orders

{

"orderDate": "2017-01-01",

"orderNumber": "",

"newAccount": {

"billToContact": {

"address1": "1051 E Hillsdale Blvd",

"city": "Foster City",

"country": "United States",

"firstName": "John",

"lastName": "Smith",

"state": "CA",

"workEmail": "smith@example.com"

},

"billCycleDay": "0",

"currency": "EUR",

"name": "TestGoCardless",

"accountNumber": "A00000100",

"paymentGateway": "GoCardless",

"paymentMethod": {

"authGateway": "8adcd9eb73945b7101739e8393fc40c3",

"type": "SEPA",

"IBAN": "FR1420041010050500013M02606",

"accountHolderInfo": {

"accountHolderName": "Antony",

"firstName": "First Name 1112",

"lastName": "Last Name 1112",

"email": "dummy@dummyemail.com"

}

}

},

"processingOptions": {

"billingOptions": {

"targetDate": "2017-08-01"

},

"collectPayment": false,

"runBilling": false

},

"subscriptions": [

{

"orderActions": [

{

"createSubscription": {

"subscribeToRatePlans": [],

"subscriptionNumber": "A-S0000000181",

"terms": {

"autoRenew": true,

"initialTerm": {

"period": 15,

"periodType": "Month",

"startDate": "2017-01-01",

"termType": "TERMED"

},

"renewalSetting": "RENEW_WITH_SPECIFIC_TERM",

"renewalTerms": [

{

"period": 12,

"periodType": "Month"

}

]

}

},

"triggerDates": [

{

"name": "ContractEffective",

"triggerDate": "2017-01-01"

}

],

"type": "CreateSubscription"

}

]

}

]

}

Response:

{

    "success": true,
    "orderNumber": "O-00000574",
    "accountNumber": "A00000100",
    "status": "Pending",
    "subscriptionNumbers": [
        "A-S0000000181"
    ]
}

You need to use the parameter "authGateway" to specify which gateway you want the Payment Method to be authorized with else it will take the tenant's default.

I'd recommend you to add the authGateway in your call in the payment method section.

 

You can locate it here:
Go to Payment gateway Page in the UI-->>Edit Payment Gateway-->>Check the URL

AntonyS_0-1601630311678.png

 

Hopefully, the above information could help to address your inquiry, and please feel free to let me know if you need further assistance.




If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Tags (1)
OrdersAPI.PNG