Skip to main content

Documentación

PayJustNow Connector
  • Connector name: PayJustNow

  • Payment method type: za_payjustnow_ewallet (PayJustNow Buy Now, Pay Later (BNPL). Customer is redirected to PayJustNow's hosted checkout to pay in 3 interest-free payments or over 12 months with interest. Category and flow type are configured as 'ewallet', but the actual flow is a redirect.)

  • Gateway name: PayJustNow (gateway type id: payjustnow; uses PayJustNow v3 Checkout API)

  • Supported countries and currencies: South Africa (ZA), ZAR

  • Differences between countries: Single country (South Africa) only. No country differences.

  • Aggregator merchants: a PayJustNow submerchantReference (max 64 chars) is sent when Rapyd has set payjustnow_submerchant_reference in the merchant's internal gateway config. This is set up by Rapyd operations via out-of-band onboarding tooling, not via any merchant-facing Rapyd API.

  • In Rapyd sandbox the payment is linked to the simulated gateway 'rapyd_gw', not to the real PayJustNow sandbox.

API request

Endpoint

Unique capabilities

Limitations

Create payment

POST /v1/payments

Creates a PayJustNow hosted checkout and returns redirect_url. Sends customer name (split into first/last), email, phone and optional billing address. Status is updated asynchronously by PayJustNow webhook and by Rapyd polling of PayJustNow's status endpoint.

ZAR only; customer name, email and phone number are required.

Cancel payment

DELETE /v1/payments/{payment}

Cancels the PayJustNow checkout before the customer pays. Payment moves to CAN.

Only before the checkout is paid, declined or expired.

Create refund

POST /v1/refunds

Full and partial refunds. Synchronous: the refund is Completed or Error in the same call. reason is passed to PayJustNow as the refund description.

No refund status updates after the refund request.

  • Header parameters: Standard Rapyd headers. No connector-specific headers.

  • Supported workflows

    • Redirect / BNPL hosted checkout: merchant creates the payment, redirects the customer to redirect_url, the customer signs up or logs in to PayJustNow (ID number needed), is assessed for eligibility and pays the first installment. PayJustNow then sends the customer to complete_payment_url (or error_payment_url on cancel). Although the payment category is 'ewallet', this is not a Rapyd ewallet-balance payment; it behaves like a redirect payment.

    • Payment completion is asynchronous: payment goes ACT -> CLO when PayJustNow reports PAID / PAID_PENDING_CALLBACK / COMPLETED, via PayJustNow webhook or Rapyd polling of PayJustNow's status endpoint.

    • Cancel before payment (DELETE /v1/payments/{payment}) and refund after payment (POST /v1/refunds, full or partial).

Create Payment - Body parameters

Nota

This table has many columns. Use the horizontal scroll bar below the table to move across and view all of the columns.

Field name

Parent field

Data type

Required or optional

Default value

Accepted values (enum)

Constraints

Description

Example

Provided by

amount

-

number

Required

-

-

Positive amount in ZAR. Converted to cents (x100, rounded). PayJustNow also validates against the merchant's min/max limits set at gateway installation.

Payment amount.

500

Merchant

currency

-

string

Required

-

ZAR

Only ZAR is configured for this payment.

Currency of the payment.

ZAR

Merchant

country

-

string

Optional

-

ZA

-

Country of the payment.

ZA

Merchant

payment_method

-

object

Required

-

-

-

Payment method object. Only type is needed; fields can be empty.

{"type": "za_payjustnow_ewallet", "fields": {}}

Merchant

type

payment_method

string

Required

-

za_payjustnow_ewallet

-

Payment method type.

za_payjustnow_ewallet

Merchant

complete_payment_url

-

string

Required

-

Valid URL

Required by payment's payment_options.

Where the customer is sent after completing the PayJustNow checkout.

https://merchant.example.com/success

Merchant

error_payment_url

-

string

Required

-

Valid URL

Required by payment payment_options.

Where the customer is sent if they cancel or an error occurs.

https://merchant.example.com/error

Merchant

customer

-

object or string

Required

-

Customer object or customer ID (cus_...)

Required by payment'd payment_options. Must contain name, email and phone_number.

Customer details.

{"name": "Jane Smith", "email": "jane@example.com", "phone_number": "0821234567"}

Merchant

name

customer

string

Required

-

-

Regex ^[0-9a-zA-Z ]{1,128}$ (letters, digits, spaces; max 128).

Customer full name.

Jane Smith

Merchant

email

customer

string

Required

-

Valid email

Regex limits length to 100 chars.

Customer email.

jane@example.com

Merchant

phone_number

customer

string

Required

-

-

Regex ^([0-9+ ()-]){10,20}$.

Customer phone number.

0821234567

Merchant

addresses

customer

array

Optional

-

-

Only the first address is used.

Customer addresses.

[{"line1": "1 Main Road", ...}]

Merchant

address

-

object

Optional

-

-

Used only when customer.addresses is empty.

Billing address of the payment.

{"line1": "1 Main Road", "city": "Cape Town", "state": "Western Cape", "zip": "8001", "country": "ZA"}

Merchant

line1

address / customer.addresses[]

string

Optional

"" if missing

-

-

Address line 1.

1 Main Road

Merchant

line2

address / customer.addresses[]

string

Optional

-

-

-

Address line 2.

Gardens

Merchant

city

address / customer.addresses[]

string

Optional

"" if missing

-

-

City.

Cape Town

Merchant

state

address / customer.addresses[]

string

Optional

"" if missing

-

-

Province.

Western Cape

Merchant

zip

address / customer.addresses[]

string

Optional

"" if missing

-

-

Postal code.

8001

Merchant

merchant_reference_id

-

string

Optional

-

-

-

Merchant's own order reference.

order_1234

Merchant

metadata

-

object

Optional

-

-

-

Merchant-defined data.

{"merchant_defined": true}

Merchant

expiration

-

number

Optional

-

-

Maximum expiration is 1800 seconds (30 min).

Payment expiration (Unix time).

-

Merchant

description

-

string

Optional

-

-

-

Payment description.

Order 1234

Merchant

Create Payment - Response parameters

Nota

This table has many columns. Use the horizontal scroll bar below the table to move across and view all of the columns.

Field name

Parent field

Data type

Values (enum)

Description

Example

Provided by

id

data

string

-

Rapyd payment ID. Also sent to PayJustNow as requestId and merchantOrderReference.

payment_782cf4bdfbcd20322e978c6184b691c7

Rapyd

status

data

string

ACT, CLO, ERR, CAN, EXP

Payment status. ACT right after creation.

ACT

Rapyd

redirect_url

data

string

URL

PayJustNow hosted checkout URL. Redirect the customer here.

https://sandbox.payjustnow.com/api/v2/app/checkout/v2.841.4e3d...

Gateway

next_action

data

string

pending_confirmation

Next step for the merchant.

pending_confirmation

Rapyd

original_amount

data

number

-

Requested amount.

500

Carried over

amount

data

number

-

Paid amount. 0 until paid; set from PayJustNow checkoutTotalCents/100 on completion.

0

Rapyd / Gateway

currency_code

data

string

ZAR

Currency.

ZAR

Carried over

country_code

data

string

ZA

Country.

ZA

Carried over

payment_method_type

data

string

za_payjustnow_ewallet

Payment method type.

za_payjustnow_ewallet

Carried over

payment_method_type_category

data

string

ewallet

Payment category.

ewallet

Rapyd

instructions

data

array

-

Static PayJustNow description text (Pay in 3 interest-free or over 12 months with interest).

[{"name": "instructions", "steps": [[...]]}]

Rapyd

complete_payment_url

data

string

-

Echo of the merchant success URL.

https://merchant.example.com/success

Carried over

error_payment_url

data

string

-

Echo of the merchant error URL.

https://merchant.example.com/error

Carried over

merchant_reference_id

data

string

-

Echo of the merchant reference.

order_1234

Carried over

expiration

data

number

-

Payment expiration (Unix time).

1782997015

Rapyd

paid

data

boolean

true, false

True once the payment is completed.

false

Rapyd

paid_at

data

number

-

Time of payment. Set from PayJustNow paidAt on completion.

0

Gateway

failure_code

data

string

-

Failure code.

-

Rapyd

failure_message

data

string

-

Failure message.

-

Rapyd

textual_codes / visual_codes

data

object

-

Not used by this connector.

{}

Rapyd

Cancel Payment - Path parameters

Nota

This table has many columns. Use the horizontal scroll bar below the table to move across and view all of the columns.

Field name

Parent field

Data type

Required or optional

Default value

Accepted values (enum)

Constraints

Description

Example

Provided by

payment

path

string

Required

-

-

Payment must be ACT and PayJustNow checkout status must be PENDING_ORDER or CANCELLED_BY_CONSUMER.

ID of the payment to cancel (path parameter, no body).

payment_782cf4bdfbcd20322e978c6184b691c7

Merchant

Cancel Payment - Response parameters

Nota

This table has many columns. Use the horizontal scroll bar below the table to move across and view all of the columns.

Field name

Parent field

Data type

Values (enum)

Description

Example

Provided by

id

data

string

-

Payment ID.

payment_782cf4bdfbcd20322e978c6184b691c7

Rapyd

status

data

string

CAN

Payment status after cancel.

CAN

Rapyd / Gateway

redirect_url

data

string

-

Original PayJustNow checkout URL.

https://sandbox.payjustnow.com/api/v2/app/checkout/...

Gateway

payment_method_type

data

string

za_payjustnow_ewallet

Payment.

za_payjustnow_ewallet

Carried over

Create Refund - Body parameters

Nota

This table has many columns. Use the horizontal scroll bar below the table to move across and view all of the columns.

Field name

Parent field

Data type

Required or optional

Default value

Accepted values (enum)

Constraints

Description

Example

Provided by

payment

-

string

Required

-

-

Payment must be CLO.

ID of the PayJustNow payment to refund.

payment_aa7a1ff631e826f04397f1c419ca1d4d

Merchant

amount

-

number

Optional

Full payment amount

-

Converted to cents (x100, rounded).

Refund amount. Partial refunds supported.

200

Merchant

currency

-

string

Optional

-

ZAR

-

Refund currency.

ZAR

Merchant

reason

-

string

Optional

-

-

-

Refund reason.

returned goods

Merchant

merchant_reference_id

-

string

Optional

-

-

-

Merchant's own refund reference.

merchant_ref_001

Merchant

Create Refund - Response parameters

Nota

This table has many columns. Use the horizontal scroll bar below the table to move across and view all of the columns.

Field name

Parent field

Data type

Values (enum)

Description

Example

Provided by

id

data

string

-

Rapyd refund ID. Also sent to PayJustNow as requestId and merchantRefundReference.

refund_4d82c3d979d6f7a5b7e1db34b5dc91b4

Rapyd

payment

data

string

-

Refunded payment ID.

payment_aa7a1ff631e826f04397f1c419ca1d4d

Carried over

amount

data

number

-

Refund amount.

500

Carried over

currency

data

string

ZAR

Currency.

ZAR

Carried over

status

data

string

Completed, Error

Refund status.

Completed

Rapyd / Gateway

reason

data

string

-

Echo of the reason.

returned goods

Carried over

merchant_reference_id

data

string

-

Echo of merchant reference.

merchant_ref_001

Carried over

payment_method_type

data

string

za_payjustnow_ewallet

Payment.

za_payjustnow_ewallet

Carried over

failure_reason / failure_code

data

string

-

Not populated by this connector.

-

Rapyd

This section shows how PayU Africa (Magellan API) fields, values and behavior relate to the Rapyd fields in the field mapping tables.

Migration notes
  • Create Payment - Body parameters: country description: Not needed when the payment implies the country.

  • PayU Africa (Magellan SOAP) merchants reach this payment as follows: doTransaction PAYMENT with supportedPaymentMethods=PAYJUSTNOW maps to Rapyd Create Payment; doTransaction CREDIT maps to Create Refund; getTransaction reports it as the PAYJUSTNOW payment-method variant; setTransaction maps to a Rapyd hosted checkout.

Field mapping (Rapyd field to original PayU field)
Create Payment - Body parameters

Rapyd field name

Original PayU field

amount

Basket.amountInCents (doTransaction PAYMENT)

currency

Basket.currencyCode

country

-

payment_method

AdditionalInformation.supportedPaymentMethods

type

AdditionalInformation.supportedPaymentMethods = PAYJUSTNOW (WSDL spelling PAY_JUST_NOW also accepted)

complete_payment_url

AdditionalInformation.returnUrl

error_payment_url

AdditionalInformation.cancelUrl

customer

Customer (block)

name

Customer.firstName + ' ' + Customer.lastName

email

Customer.email

phone_number

Customer.countryCode + Customer.mobile

addresses

-

address

-

line1

-

line2

-

city

-

state

-

zip

-

merchant_reference_id

AdditionalInformation.merchantReference

metadata

None

expiration

-

description

Basket.description

Accepted values mapping

Field name

Original PayU value

Rapyd value

payment_method.type

PAYJUSTNOW (WSDL spelling PAY_JUST_NOW also accepted)

za_payjustnow_ewallet

status -> resultCode

successful=true, resultCode 00

ACT or CLO

status -> resultCode

successful=false, resultCode 05, pointOfFailure ACQUIRER

ERR

status -> resultCode

successful=false, resultCode P015, pointOfFailure PAYU

CAN

status -> resultCode

successful=false, resultCode 994, pointOfFailure PAYU

EXP

status -> resultCode

successful=false, resultCode P046, pointOfFailure PAYU

any other / missing

status (create response)

-

ACT

status (create response)

-

ERR

status (after webhook/polling)

-

CLO

status (after webhook/polling)

-

ERR

status (after polling)

-

ERR

status (after webhook/polling)

-

ACT (pending)

Create Payment - Response parameters

Rapyd field name

Original PayU field

id

payUReference (indirect)

status

successful / resultCode / resultMessage / pointOfFailure

redirect_url

redirect.url

next_action

-

original_amount

-

amount

paymentMethodsUsed.amountInCents (getTransaction, PAYJUSTNOW variant)

currency_code

-

country_code

-

payment_method_type

paymentMethodsUsed (PAYJUSTNOW variant, getTransaction)

payment_method_type_category

-

instructions

-

complete_payment_url

-

error_payment_url

-

merchant_reference_id

merchantReference

expiration

-

paid

-

paid_at

-

failure_code

-

failure_message

-

textual_codes / visual_codes

-

Cancel Payment - Path parameters

Rapyd field name

Original PayU field

payment

-

Accepted values mapping

Field name

Original PayU value

Rapyd value

status (cancel)

-

CAN

status (cancel)

-

ERR (cancel fails)

Cancel Payment - Response parameters

Rapyd field name

Original PayU field

id

-

status

-

redirect_url

-

payment_method_type

-

Create Refund - Body parameters

Rapyd field name

Original PayU field

payment

AdditionalInformation.payUReference (doTransaction CREDIT)

amount

Credit amountInCents, else Basket.amountInCents

currency

Basket.currencyCode

reason

-

merchant_reference_id

AdditionalInformation.merchantReference

Accepted values mapping

Field name

Original PayU value

Rapyd value

refund status -> resultCode

successful=true, resultCode 00

Completed or Pending

refund status -> resultCode

successful=false, resultCode P046, pointOfFailure PAYU

any other (e.g. Error)

status (refund)

-

Completed (CLO)

status (refund)

-

Error (ERR)

status (refund)

-

-

Create Refund - Response parameters

Rapyd field name

Original PayU field

id

currentPayUReference (indirect)

payment

payUReference (indirect)

amount

-

currency

-

status

successful / resultCode / resultMessage

reason

-

merchant_reference_id

merchantReference

payment_method_type

-

failure_reason / failure_code

-

Create payment (POST /v1/payments)
    • Request

      • curl -X POST "https://sandboxapi.rapyd.net/v1/payments" \
         -H "access_key: <your_access_key>" \
         -H "Content-Type: application/json" \
         -H "idempotency: <unique_idempotency_key>" \
         -H "salt: <random_salt>" \
         -H "signature: <calculated_signature>" \
         -H "timestamp: <unix_timestamp>" \
         --data '{
          "amount": 500,
          "currency": "ZAR",
          "country": "ZA",
          "payment_method": {
            "type": "za_payjustnow_ewallet",
            "fields": {}
          },
          "customer": {
            "name": "Jane Smith",
            "email": "jane@example.com",
            "phone_number": "0821234567"
          },
          "address": {
            "name": "Jane Smith",
            "line1": "1 Main Road",
            "line2": "Gardens",
            "city": "Cape Town",
            "state": "Western Cape",
            "zip": "8001",
            "country": "ZA"
          },
          "complete_payment_url": "https://merchant.example.com/success",
          "error_payment_url": "https://merchant.example.com/error",
          "merchant_reference_id": "order_1234",
          "metadata": {
            "merchant_defined": true
          }
        }'
        
    • Response

      • {
          "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "11111111-2222-3333-4444-555555555555"
          },
          "data": {
            "id": "payment_0a1b2c3d4e5f60718293a4b5c6d7e8f9",
            "amount": 0,
            "original_amount": 500,
            "is_partial": false,
            "currency_code": "ZAR",
            "country_code": "ZA",
            "status": "ACT",
            "description": "",
            "merchant_reference_id": "order_1234",
            "customer_token": "cus_0a1b2c3d4e5f60718293a4b5c6d7e8f9",
            "payment_method": "other_0a1b2c3d4e5f60718293a4b5c6d7e8f9",
            "payment_method_data": {
              "id": "other_0a1b2c3d4e5f60718293a4b5c6d7e8f9",
              "type": "za_payjustnow_ewallet",
              "category": "ewallet"
            },
            "expiration": 1782997015,
            "captured": true,
            "refunded": false,
            "refunded_amount": 0,
            "redirect_url": "https://sandbox.payjustnow.com/api/v2/app/checkout/v3.841.00000000-1111-2222-3333-444444444444",
            "complete_payment_url": "https://merchant.example.com/success",
            "error_payment_url": "https://merchant.example.com/error",
            "created_at": 1782995215,
            "metadata": {
              "merchant_defined": true
            },
            "failure_code": "",
            "failure_message": "",
            "paid": false,
            "paid_at": 0,
            "visual_codes": {},
            "textual_codes": {},
            "instructions": [
              {
                "name": "instructions",
                "steps": [
                  [
                    "PayJustNow",
                    "",
                    "The clever way to pay: Pay in 3 for FREE or stretch it over 12",
                    "",
                    "Buy Now, Pay Later with PayJustNow",
                    "",
                    "..."
                  ]
                ]
              }
            ],
            "payment_method_type": "za_payjustnow_ewallet",
            "payment_method_type_category": "ewallet",
            "next_action": "pending_confirmation"
          }
        }
        
Cancel payment (DELETE /v1/payments/{payment})
    • Request

      • curl -X DELETE "https://sandboxapi.rapyd.net/v1/payments/payment_0a1b2c3d4e5f60718293a4b5c6d7e8f9" \
         -H "access_key: <your_access_key>" \
         -H "Content-Type: application/json" \
         -H "salt: <random_salt>" \
         -H "signature: <calculated_signature>" \
         -H "timestamp: <unix_timestamp>"
        
    • Response

      • {
          "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "33333333-4444-5555-6666-777777777777"
          },
          "data": {
            "id": "payment_0a1b2c3d4e5f60718293a4b5c6d7e8f9",
            "amount": 0,
            "original_amount": 500,
            "currency_code": "ZAR",
            "country_code": "ZA",
            "status": "CAN",
            "merchant_reference_id": "order_1234",
            "redirect_url": "https://sandbox.payjustnow.com/api/v2/app/checkout/v3.841.00000000-1111-2222-3333-444444444444",
            "paid": false,
            "paid_at": 0,
            "failure_code": "",
            "failure_message": "",
            "payment_method_type": "za_payjustnow_ewallet",
            "payment_method_type_category": "ewallet"
          }
        }
        
Create refund (POST /v1/refunds)
    • Request

      • curl -X POST "https://sandboxapi.rapyd.net/v1/refunds" \
         -H "access_key: <your_access_key>" \
         -H "Content-Type: application/json" \
         -H "idempotency: <unique_idempotency_key>" \
         -H "salt: <random_salt>" \
         -H "signature: <calculated_signature>" \
         -H "timestamp: <unix_timestamp>" \
         --data '{
          "payment": "payment_0a1b2c3d4e5f60718293a4b5c6d7e8f9",
          "amount": 200,
          "currency": "ZAR",
          "merchant_reference_id": "refund_ref_001",
          "reason": "returned goods"
        }'
        
    • Response

      • {
          "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "22222222-3333-4444-5555-666666666666"
          },
          "data": {
            "id": "refund_0a1b2c3d4e5f60718293a4b5c6d7e8f9",
            "amount": 200,
            "payment": "payment_0a1b2c3d4e5f60718293a4b5c6d7e8f9",
            "currency": "ZAR",
            "failure_reason": "",
            "failure_code": "",
            "metadata": {},
            "reason": "returned goods",
            "status": "Completed",
            "created_at": 1782996000,
            "updated_at": 1782996003,
            "merchant_reference_id": "refund_ref_001",
            "payment_method_type": "za_payjustnow_ewallet",
            "proportional_refund": true
          }
        }