HomeAPI DocumentationPayment Processapi/UserPayment

10.1. api/UserPayment

This API call is used to submit items from a user’s basket for payment. You have three payment type options that you can submit. These are:

•    Invoice – If the client allows users to pay for an item by invoice. An invoice request will be generated and created in Rubi to be submitted to the client’s accounting integration (if applicable). A booking confirmation email will be sent to the user, noting that they will receive an invoice in due course.

•    CardPayment – If the client allows users to pay by card, you can submit this option. This will return details such as the TransactionID, which can be used in the subsequent payment result call, like the api/StripeResult API call.

•    Confirm – If the total items in the user’s basket equals 0.00. A booking confirmation email will automatically be sent to the user.

Parameters To Submit

All parameters below highlighted with “*” cannot be submitted as blank values.

Parameter Parameter Help Parameter Data Type
uid* Contact’s uid. String – Max 50 chars
PaymentType* Submit payment type of either "Invoice", "CardPayment" or "Confirm" ("Confirm" should only be used where the items total = 0.00). String – Max 20 chars
PaymentItems* An array of ItemGUIDs returned from UserBasket. Process “Bookings” and “Subscriptions” separately. String
Address1* First line of the contact’s address if the contact has a personal address different to main Company/Organisation address. String – Max 75 chars
Address2 Second line of the contact’s address if the contact has a personal address different to main Company/Organisation address. String – Max 75 chars
Address3 Third line of the contact’s address if the contact has a personal address different to main Company/Organisation address. String – Max 75 chars
Address4* Fourth line of the contact’s address if the contact has a personal address different to main Company/Organisation address. String – Max 75 chars
County* County the contact resides if the contact has a personal address different to main Company/Organisation address. String – Provide ListValue from api/PortalList “County”
Postcode* Postcode of the contact’s address if the contact has a personal address different to main Company/Organisation address. String – Max 15 chars
Country* Country where the contact resides if the contact has a personal address different to main Company/Organisation address. String – Provide ListValue from api/PortalList “Country”
EmailAddress* Contact’s email address. String – Max 250 chars
PONumber Transaction PO Number. String – Max 100 chars
MobCountry* Contact’s telephone country code. String – Max 5 chars
Mob* Contact’s telephone number. String – Max 25 chars

 

Return Response

This API call will return in the ResponseMessage an array of the following fields.

Field Field Help
TransactionID Value can be passed to the client’s Card Payment Processing provider. For matching up transactions in Rubi.
TransactionType The value will match the PaymentType provided when calling the method.
ItemGUID The value will match the value provided when calling the method.
ItemTotal The value will be the total value of the item, including any applicable VAT/tax.
ItemDetail String value to describe what the item is.
ItemStatus Will return either the Booking or Subscription status.
Address1 The value will match the value provided when calling the method.
Address2 “”
Address3 “”
Address4 “”
County “”
Postcode “”
Country “”
EmailAddress “”
PONumber “”
MobCountry “”
Mob “”
EmailSubject Will have an email subject for generating emails to send to the end-user (applies to Invoice or Confirm items only).
EmailBody Will have an email body for generating emails to send to the end-user (applies to Invoice or Confirm items only).
EmailBCC Will have an email bcc array for generating emails to send to the end-user (applies to Invoice or Confirm items only).
EmailAttachments Will have an attachments array for generating emails to send to end-user (applies to Invoice or Confirm items only).

 

IMPORTANT: Card Payments will return a single array with the total value for the card payment. The TransactionID and other details returned, including the ItemTotal, can then be passed to the card payment provider for authorisation.

By default, booking confirmation emails are sent following the success of this API call. This applies to the Payment Types of Invoice and Confirm. If you would prefer emails not to be sent from RubiCRM, please contact us.

This page was: Helpful | Not Helpful