CreditGuard is an Israeli payment gateway. Here you'll find the API to create token billing and one-time payment through an iframe.
Action description: retrieve iframe url. By default, the iframe is for token billing (J5), but one-time payment (J4) is also supported.
URL: http://<HOST>/paymentgateways/getRequest
- data - json object with the next properties:
- iframe - hard-coded true.
- aid - billrun account id.
- name - hard-coded CreditGuard.
- type - hard-coded account.
- ok_page - ok page to redirect after success.
- fail_page - fail page to redirect after failing.
- _t_ - current unix timestamp.
Optional fields (under data property):
- action - hard-coded single_payment [string] - if you want to use the credit card only for charge without taking it to token billing. In this case amount is mandatory.
- tokenize_on_single_payment [boolean] - make token after success single payment.
- tokenize_option - with value keepCCDetails, this will add an option in to save the credit card token in addition to payment. This option is available only on
action=single_payment
.
- amount [float] - the amount to charge. This option is available only with single_payment. If you need to charge with token billing just use pay method after collect the token.
- installments [object] - if you want to charge the credit card with installments. Installments option is available only on single_payment.
- number_of_payments (int) - the number of payments to be consider as installments. If total_amount is not received this will be the maximum installments in the iframe and the input will be editable.
- total_amount (float; optional on installments) - the total amount of the installment. Should be same of amount field above. In case total_amount is received the input of the installments will be disable for editing.
object json encoded with the following properties:
- status - 1 (success) or 0 (failed)
- details: object contains url property. The url is the iframe url.
Action description: request success token. This will check with CG (backend to backend) if the success input [transaction] is really success (3-sided hand-shake).
When the iframe return with ok-page, you'll receive txId on GET or POST. You'll need to use this txId in this API.
URL: http://<HOST>/paymentgateways/okPage
- name - hard-coded CreditGuard
- txId - the txId return on success
- aid - billrun account id
- redirect - hard-coded 0
object json encoded with the following properties:
- status - 1 (success) or 0 (failed)
- details: object contains the following properties:
- credit_card - the credit card number without the middle 8 numbers (only the first 4 and the last 4; all others asterisked).
- expiration_date - mmYY (without slash; For example: 1026).